discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=93c69f69ea0197b3921871ce2e09f7c40d4f7b6e

commit 93c69f69ea0197b3921871ce2e09f7c40d4f7b6e
Author: Stefan Schmidt <[email protected]>
Date:   Thu Nov 13 10:36:20 2014 +0100

    modules/geolocation: Add module theme and icons.
    
    This is likely to change a bit until it stabilize so we keep the theme
    with the module for now.
---
 src/modules/Makefile_geolocation.mk              |  10 ++++-
 src/modules/geolocation/e-module-geolocation.edc |  52 +++++++++++++++++++++++
 src/modules/geolocation/e-module-geolocation.edj | Bin 9300 -> 0 bytes
 src/modules/geolocation/e_mod_main.c             |   6 ++-
 src/modules/geolocation/images/location_off.png  | Bin 0 -> 2491 bytes
 src/modules/geolocation/images/location_on.png   | Bin 0 -> 2381 bytes
 6 files changed, 65 insertions(+), 3 deletions(-)

diff --git a/src/modules/Makefile_geolocation.mk 
b/src/modules/Makefile_geolocation.mk
index 450d613..1eebb16 100644
--- a/src/modules/Makefile_geolocation.mk
+++ b/src/modules/Makefile_geolocation.mk
@@ -1,14 +1,22 @@
 EXTRA_DIST += src/modules/geolocation/module.desktop.in \
-src/modules/geolocation/e-module-geolocation.edj
+src/modules/geolocation/e-module-geolocation.edc \
+src/modules/tiling/images/location_on.png \
+src/modules/tiling/images/location_off.png
 if USE_MODULE_GEOLOCATION
 geolocationdir = $(MDIR)/geolocation
 geolocation_DATA = src/modules/geolocation/e-module-geolocation.edj \
                 src/modules/geolocation/module.desktop
+CLEANFILES += src/modules/geolocation/e-module-geolocation.edj
 
 
 geolocationpkgdir = $(MDIR)/geolocation/$(MODULE_ARCH)
 geolocationpkg_LTLIBRARIES = src/modules/geolocation/module.la
 
+GEOLOCATION_EDJE_FLAGS = $(EDJE_FLAGS) -id 
$(top_srcdir)/src/modules/geolocation/images
+
+src/modules/geolocation/%.edj: src/modules/geolocation/%.edc Makefile
+       $(EDJE_CC) $(GEOLOCATION_EDJE_FLAGS) $< $@
+
 src_modules_geolocation_module_la_LIBADD = $(MOD_LIBS)
 src_modules_geolocation_module_la_CPPFLAGS = $(MOD_CPPFLAGS)
 src_modules_geolocation_module_la_LDFLAGS = $(MOD_LDFLAGS)
diff --git a/src/modules/geolocation/e-module-geolocation.edc 
b/src/modules/geolocation/e-module-geolocation.edc
new file mode 100644
index 0000000..b56f5b2
--- /dev/null
+++ b/src/modules/geolocation/e-module-geolocation.edc
@@ -0,0 +1,52 @@
+images {
+   image: "location_off.png" COMP;
+   image: "location_on.png" COMP;
+}
+collections {
+   group {
+      name: "icon";
+      parts {
+        part {
+           name: "image";
+           mouse_events: 0;
+           description {
+              state: "default" 0.0;
+              aspect: 1.0 1.0;
+              aspect_preference: BOTH;
+              image.normal: "location_on.png";
+           }
+        }
+      }
+   }
+   group { name: "e/modules/geolocation/main";
+      min: 16 16;
+      max: 160 160;
+      parts {
+         part { name: "in_use";
+            description { state: "default" 0.0;
+               rel1.relative: (4/160) (4/160);
+               rel2.relative: (156/160) (156/160);
+               aspect: 1.0 1.0; aspect_preference: BOTH;
+               image.normal: "location_off.png";
+               max: 152 152;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "location_on.png";
+            }
+         }
+      }
+      programs {
+         program {
+            signal: "e,state,location_on"; source: "e";
+            action: STATE_SET "visible" 0.0;
+            target: "in_use";
+         }
+         program {
+            signal: "e,state,location_off"; source: "e";
+            action: STATE_SET "default" 0.0;
+            target: "in_use";
+         }
+      }
+   }
+}
diff --git a/src/modules/geolocation/e-module-geolocation.edj 
b/src/modules/geolocation/e-module-geolocation.edj
deleted file mode 100644
index ef1cafa..0000000
Binary files a/src/modules/geolocation/e-module-geolocation.edj and /dev/null 
differ
diff --git a/src/modules/geolocation/e_mod_main.c 
b/src/modules/geolocation/e_mod_main.c
index a582548..bfba790 100644
--- a/src/modules/geolocation/e_mod_main.c
+++ b/src/modules/geolocation/e_mod_main.c
@@ -320,12 +320,14 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
    Evas_Object *o;
    E_Gadcon_Client *gcc;
    Instance *inst;
+   char buf[4096];
 
    inst = E_NEW(Instance, 1);
 
    o = edje_object_add(gc->evas);
-   e_theme_edje_object_set(o, "base/theme/modules/geolocation",
-                           "e/modules/geolocation/main");
+   snprintf(buf, sizeof(buf), "%s/e-module-geolocation.edj",
+           e_module_dir_get(geolocation_module));
+   edje_object_file_set(o, buf, "e/modules/geolocation/main");
    evas_object_show(o);
 
    gcc = e_gadcon_client_new(gc, name, id, style, o);
diff --git a/src/modules/geolocation/images/location_off.png 
b/src/modules/geolocation/images/location_off.png
new file mode 100644
index 0000000..b87b5d4
Binary files /dev/null and b/src/modules/geolocation/images/location_off.png 
differ
diff --git a/src/modules/geolocation/images/location_on.png 
b/src/modules/geolocation/images/location_on.png
new file mode 100644
index 0000000..6bdc3eb
Binary files /dev/null and b/src/modules/geolocation/images/location_on.png 
differ

-- 


Reply via email to