Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/modules/ibar 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/ibar/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- Makefile.am 20 Apr 2006 11:30:24 -0000 1.9 +++ Makefile.am 9 May 2006 13:02:47 -0000 1.10 @@ -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,10 +12,9 @@ # 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 \ @e_cflags@ pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/ibar/e_mod_main.c,v retrieving revision 1.113 retrieving revision 1.114 diff -u -3 -r1.113 -r1.114 --- e_mod_main.c 23 Apr 2006 06:56:22 -0000 1.113 +++ e_mod_main.c 9 May 2006 13:02:47 -0000 1.114 @@ -10,13 +10,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, "ibar", { - _gc_init, _gc_shutdown, _gc_orient + _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon } }; /**/ @@ -204,13 +206,31 @@ e_gadcon_client_aspect_set(gcc, 16, 16); e_gadcon_client_min_size_set(gcc, 16, 16); } + +static char * +_gc_label(void) +{ + return _("IBar"); +} + +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(ibar_config->module)); + edje_object_file_set(o, buf, "icon"); + return o; +} /**/ /***************************************************************************/ /***************************************************************************/ /**/ -// FIXME: ibar specific calls here static IBar * _ibar_new(Evas *evas, char *dir) { @@ -296,13 +316,11 @@ Evas_Coord w, h; evas_object_geometry_get(b->o_box, NULL, NULL, &w, &h); - printf("BOX %ix%i\n", w, h); if (e_box_orientation_get(b->o_box)) w = h; else h = w; e_box_freeze(b->o_box); - printf("RESIZNE %i %i\n", w, h); for (l = b->icons; l; l = l->next) { ic = l->data; @@ -513,7 +531,6 @@ switch (ch) { case E_APP_ADD: - printf("ADD! %3.4f\n", ecore_time_get()); if (e_app_is_parent(b->apps, a)) { E_App *a2, *a_before = NULL; @@ -554,7 +571,6 @@ } break; case E_APP_DEL: - printf("DEL! %3.4f\n", ecore_time_get()); if (e_app_is_parent(b->apps, a)) { IBar_Icon *ic; @@ -570,7 +586,6 @@ } break; case E_APP_CHANGE: - printf("CHANGE! %3.4f\n", ecore_time_get()); if (e_app_is_parent(b->apps, a)) { IBar_Icon *ic; @@ -586,7 +601,6 @@ } break; case E_APP_ORDER: - printf("ORDER! %3.4f\n", ecore_time_get()); if (a == b->apps) { _ibar_empty(b); @@ -1114,7 +1128,7 @@ }; EAPI void * -e_modapi_init(E_Module *module) +e_modapi_init(E_Module *m) { conf_item_edd = E_CONFIG_DD_NEW("IBar_Config_Item", Config_Item); #undef T @@ -1146,12 +1160,14 @@ ibar_config->items = evas_list_append(ibar_config->items, ci); } + ibar_config->module = m; + e_gadcon_provider_register(&_gadcon_class); return 1; } EAPI int -e_modapi_shutdown(E_Module *module) +e_modapi_shutdown(E_Module *m) { e_gadcon_provider_unregister(&_gadcon_class); @@ -1186,7 +1202,7 @@ } EAPI int -e_modapi_save(E_Module *module) +e_modapi_save(E_Module *m) { Evas_List *l, *l2; @@ -1208,17 +1224,17 @@ } EAPI int -e_modapi_info(E_Module *module) +e_modapi_info(E_Module *m) { char buf[4096]; - snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(module)); - module->icon_file = strdup(buf); + snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(m)); + m->icon_file = strdup(buf); return 1; } EAPI int -e_modapi_about(E_Module *module) +e_modapi_about(E_Module *m) { e_module_dialog_show(_("Enlightenment IBar Module"), _("This is the IBar Application Launcher bar module for Enlightenment.<br>" =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/ibar/e_mod_main.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- e_mod_main.h 20 Apr 2006 11:30:24 -0000 1.32 +++ e_mod_main.h 9 May 2006 13:02:47 -0000 1.33 @@ -10,12 +10,13 @@ struct _Config { /* saved * loaded config values */ - Evas_List *items; + Evas_List *items; /* just config state */ + E_Module *module; E_Config_Dialog *config_dialog; - Evas_List *instances; - E_Menu *menu; - Evas_List *handlers; + Evas_List *instances; + E_Menu *menu; + Evas_List *handlers; }; struct _Config_Item =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/ibar/module_icon.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvsgJSv65 and /tmp/cvs4ZzQSW 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