Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/modules/temperature Modified Files: Makefile.am e_mod_main.c e_mod_main.h module_icon.png Added Files: module.eap Log Message: add icon provision for gadcon classes and label provider functions. also add all the data, update and add new icons etc. etc. =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/temperature/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- Makefile.am 20 Apr 2006 11:30:25 -0000 1.7 +++ Makefile.am 9 May 2006 13:02:48 -0000 1.8 @@ -4,6 +4,7 @@ # data files for the module filesdir = $(libdir)/enlightenment/modules/$(MODULE) files_DATA = \ +module.eap \ module_icon.png EXTRA_DIST = $(files_DATA) @@ -11,7 +12,7 @@ # the module .so file INCLUDES = -I. \ -I$(top_srcdir) \ - -I$(top_srcdir)/$(MODULE) \ + -I$(top_srcdir)/src/modules/$(MODULE) \ -I$(top_srcdir)/src/bin \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/modules \ =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/temperature/e_mod_main.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- e_mod_main.c 21 Apr 2006 15:54:11 -0000 1.57 +++ e_mod_main.c 9 May 2006 13:02:48 -0000 1.58 @@ -15,13 +15,15 @@ static E_Gadcon_Client *_gc_init(E_Gadcon *gc, char *name, char *id, char *style); static void _gc_shutdown(E_Gadcon_Client *gcc); static void _gc_orient(E_Gadcon_Client *gcc); +static char *_gc_label(void); +static Evas_Object *_gc_icon(Evas *evas); /* and actually define the gadcon class that this module provides (just 1) */ static const E_Gadcon_Client_Class _gadcon_class = { GADCON_CLIENT_CLASS_VERSION, "temperature", { - _gc_init, _gc_shutdown, _gc_orient + _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon } }; /**/ @@ -96,6 +98,25 @@ e_gadcon_client_aspect_set(gcc, 16, 16); e_gadcon_client_min_size_set(gcc, 16, 16); } + +static char * +_gc_label(void) +{ + return _("Temperature"); +} + +static Evas_Object * +_gc_icon(Evas *evas) +{ + Evas_Object *o; + char buf[4096]; + + o = edje_object_add(evas); + snprintf(buf, sizeof(buf), "%s/module.eap", + e_module_dir_get(temperature_config->module)); + edje_object_file_set(o, buf, "icon"); + return o; +} /**/ /***************************************************************************/ @@ -385,6 +406,9 @@ temperature_config->temperature_check_timer = ecore_timer_add(temperature_config->poll_time, _temperature_cb_check, NULL); + + temperature_config->module = m; + e_gadcon_provider_register(&_gadcon_class); return 1; } =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/temperature/e_mod_main.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- e_mod_main.h 20 Apr 2006 11:30:25 -0000 1.18 +++ e_mod_main.h 9 May 2006 13:02:48 -0000 1.19 @@ -20,6 +20,7 @@ char *sensor_name; Unit units; /* just config state */ + E_Module *module; E_Config_Dialog *config_dialog; Evas_List *instances; E_Menu *menu; =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/temperature/module_icon.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvs0oAVDT and /tmp/cvsKfwYBL differ ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs