Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/battery


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/battery/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- Makefile.am 20 Apr 2006 11:30:24 -0000      1.8
+++ Makefile.am 9 May 2006 13:02:47 -0000       1.9
@@ -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/battery/e_mod_main.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -3 -r1.74 -r1.75
--- e_mod_main.c        21 Apr 2006 15:54:11 -0000      1.74
+++ e_mod_main.c        9 May 2006 13:02:47 -0000       1.75
@@ -29,13 +29,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,
      "battery",
      {
-       _gc_init, _gc_shutdown, _gc_orient
+        _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon
      }
 };
 /**/
@@ -125,6 +127,25 @@
    e_gadcon_client_aspect_set(gcc, 16, 16);
    e_gadcon_client_min_size_set(gcc, 16, 16);
 }
+
+static char *
+_gc_label(void)
+{
+   return _("Battery");
+}
+
+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(battery_config->module));
+   edje_object_file_set(o, buf, "icon");
+   return o;
+}
 /**/
 /***************************************************************************/
 
@@ -1369,6 +1390,8 @@
    battery_config->battery_prev_battery = -1;
    battery_config->battery_check_timer = 
ecore_timer_add(battery_config->poll_time,
                                                 _battery_cb_check, NULL);
+   battery_config->module = m;
+   
    e_gadcon_provider_register(&_gadcon_class);
    return 1;
 }
===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/battery/e_mod_main.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- e_mod_main.h        20 Apr 2006 11:30:24 -0000      1.21
+++ e_mod_main.h        9 May 2006 13:02:47 -0000       1.22
@@ -18,6 +18,7 @@
    double           poll_time;
    int              alarm;
    /* 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/battery/module_icon.png,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
Binary files /tmp/cvsGgs7jD and /tmp/cvsvJOJ4s 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

Reply via email to