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.
This commit is contained in:
Stefan Schmidt 2014-11-13 10:36:20 +01:00 committed by Mike Blumenkrantz
parent 7dbea1c1f1
commit 93c69f69ea
6 changed files with 65 additions and 3 deletions

View File

@ -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)

View File

@ -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";
}
}
}
}

View File

@ -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);

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB