summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavio Ceolin <flavio.ceolin@gmail.com>2014-05-23 00:42:36 -0300
committerFlavio Ceolin <flavio.ceolin@gmail.com>2014-05-23 00:42:36 -0300
commitdbd9bd8ce714a168ab20d2e359372e03082fe4e0 (patch)
tree2839c3f4d4029a77dcbc866b5cf4ab1644433a6c
parentba8266999b502d1ef5dbc79e6f2b06ba978f76a9 (diff)
Adding applicaton icon
-rw-r--r--.gitignore2
-rw-r--r--Makefile.am8
-rw-r--r--data/icons/epulse.pngbin0 -> 19745 bytes
-rw-r--r--data/xml/epulse.desktop9
-rw-r--r--src/bin/main_window.c10
5 files changed, 27 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 80d6bdd..84c1157 100644
--- a/.gitignore
+++ b/.gitignore
@@ -69,7 +69,7 @@ stamp-h1
69*.edj 69*.edj
70*.eet 70*.eet
71src/bin/epulse 71src/bin/epulse
72*.desktop 72module.desktop
73po/Makefile.in.in 73po/Makefile.in.in
74po/Makevars.template 74po/Makevars.template
75po/POTFILES 75po/POTFILES
diff --git a/Makefile.am b/Makefile.am
index 7978f0b..290c76f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,7 +74,15 @@ SUBDIRS = po
74 74
75include Makefile_Theme.am 75include Makefile_Theme.am
76 76
77iconsdir = $(datadir)/icons
78icons_DATA = data/icons/epulse.png
79
80desktopdir = $(datadir)/applications
81desktop_DATA = data/xml/epulse.desktop
82
77EXTRA_DIST += \ 83EXTRA_DIST += \
84 $(icons_DATA) \
85 $(desktop_DATA) \
78 mksnapshot \ 86 mksnapshot \
79 mksubmit \ 87 mksubmit \
80 autogen.sh 88 autogen.sh
diff --git a/data/icons/epulse.png b/data/icons/epulse.png
new file mode 100644
index 0000000..3db381c
--- /dev/null
+++ b/data/icons/epulse.png
Binary files differ
diff --git a/data/xml/epulse.desktop b/data/xml/epulse.desktop
new file mode 100644
index 0000000..f590cc2
--- /dev/null
+++ b/data/xml/epulse.desktop
@@ -0,0 +1,9 @@
1[Desktop Entry]
2Encoding=UTF-8
3Type=Application
4Name=Epulse
5Comment=A module to control audio volume and streams.
6Icon=epulse
7Exec=epulse
8Categories=System;Sound;
9StartupWMClass=epulse
diff --git a/src/bin/main_window.c b/src/bin/main_window.c
index cb55c1c..c596e7d 100644
--- a/src/bin/main_window.c
+++ b/src/bin/main_window.c
@@ -66,7 +66,8 @@ Evas_Object *
66main_window_add(void) 66main_window_add(void)
67{ 67{
68 Main_Window *mw; 68 Main_Window *mw;
69 Evas_Object *tmp, *box; 69 Evas_Object *tmp, *box, *icon;
70 char buf[4096];
70 71
71 elm_theme_extension_add(NULL, EPULSE_THEME); 72 elm_theme_extension_add(NULL, EPULSE_THEME);
72 mw = calloc(1, sizeof(Main_Window)); 73 mw = calloc(1, sizeof(Main_Window));
@@ -84,6 +85,13 @@ main_window_add(void)
84 elm_win_title_set(tmp, _("Efl Volume Control")); 85 elm_win_title_set(tmp, _("Efl Volume Control"));
85 mw->win = tmp; 86 mw->win = tmp;
86 87
88 icon = evas_object_image_add(evas_object_evas_get(mw->win));
89 snprintf(buf, sizeof(buf), "%s/icons/terminology.png",
90 elm_app_data_dir_get());
91 evas_object_image_file_set(icon, buf, NULL);
92 elm_win_icon_object_set(mw->win, icon);
93 elm_win_icon_name_set(mw->win, "epulse");
94
87 tmp = elm_bg_add(mw->win); 95 tmp = elm_bg_add(mw->win);
88 evas_object_size_hint_weight_set(tmp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 96 evas_object_size_hint_weight_set(tmp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
89 evas_object_size_hint_align_set(tmp, EVAS_HINT_FILL, EVAS_HINT_FILL); 97 evas_object_size_hint_align_set(tmp, EVAS_HINT_FILL, EVAS_HINT_FILL);