diff --git a/src/modules/Makefile_geolocation.mk b/src/modules/Makefile_geolocation.mk index 450d61329..1eebb16e4 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 000000000..b56f5b2f0 --- /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 ef1cafaf0..000000000 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 a58254859..bfba790cd 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 000000000..b87b5d4a9 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 000000000..6bdc3ebe0 Binary files /dev/null and b/src/modules/geolocation/images/location_on.png differ