Enlightenment CVS committal Author : essiene Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_config.c e_gadcon.c e_gadcon.h Log Message: * $XXX [xxxxxxxxxx] default view (plain or inset) of a gadget should be able to be specified by the gadcon client so when it is added it can also supply an initial style mode. This first commit, sets up the infrastructure. See the collab mail describing how this works. The next patch shall simply update the core modules to use this. Then comes the modules in e_modules =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_config.c,v retrieving revision 1.185 retrieving revision 1.186 diff -u -3 -r1.185 -r1.186 --- e_config.c 26 Jul 2006 15:04:42 -0000 1.185 +++ e_config.c 9 Aug 2006 06:08:36 -0000 1.186 @@ -1120,9 +1120,9 @@ CFG_GADCON_CLIENT("start", "default", 800, 32, 0, NULL, 0, 0); CFG_GADCON_CLIENT("pager", "default", 800, 120, - 32, "inset", 0, 0); + 32, NULL, 0, 0); CFG_GADCON_CLIENT("ibar", "default", 800, 200, - 400 - (16 / 2), "inset", 1, 0); + 400 - (16 / 2), NULL, 1, 0); CFG_GADCON_CLIENT("temperature", "default", 800, 32, 800 - (5 * 32), NULL, 0, 0); CFG_GADCON_CLIENT("cpufreq", "default", 800, 32, @@ -1132,25 +1132,25 @@ CFG_GADCON_CLIENT("clock", "default", 800, 32, 800 - (2 * 32), NULL, 0, 0); CFG_GADCON_CLIENT("ibox", "default", 800, 200, - 400 - (1 * 32), "inset", 1, 0); + 400 - (1 * 32), NULL, 1, 0); /* additional shelves for up to 3 more heads by default */ CFG_GADCON("shelf", "1"); CFG_GADCON_CLIENT("pager", "default2", 800, 120, - 0, "inset", 0, 0); + 0, NULL, 0, 0); CFG_GADCON_CLIENT("ibox", "default", 800, 200, - 400 - (1 * 32), "inset", 1, 0); + 400 - (1 * 32), NULL, 1, 0); CFG_GADCON("shelf", "2"); CFG_GADCON_CLIENT("pager", "default3", 800, 120, - 0, "inset", 0, 0); + 0, NULL, 0, 0); CFG_GADCON_CLIENT("ibox", "default", 800, 200, - 400 - (1 * 32), "inset", 1, 0); + 400 - (1 * 32), NULL, 1, 0); CFG_GADCON("shelf", "3"); CFG_GADCON_CLIENT("pager", "default4", 800, 120, - 0, "inset", 0, 0); + 0, NULL, 0, 0); CFG_GADCON_CLIENT("ibox", "default", 800, 200, - 400 - (1 * 32), "inset", 1, 0); + 400 - (1 * 32), NULL, 1, 0); } IFCFGEND; =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_gadcon.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- e_gadcon.c 28 Jul 2006 11:31:50 -0000 1.35 +++ e_gadcon.c 9 Aug 2006 06:08:36 -0000 1.36 @@ -228,8 +228,15 @@ { E_Gadcon_Client *gcc; - gcc = cc->func.init(gc, cf_gcc->name, cf_gcc->id, + if(!cf_gcc->style) + { + gcc = cc->func.init(gc, cf_gcc->name, cf_gcc->id, + cc->default_style); + } + else + gcc = cc->func.init(gc, cf_gcc->name, cf_gcc->id, cf_gcc->style); + if (gcc) { gcc->client_class = cc; @@ -866,7 +873,7 @@ gcc = data; gc = gcc->gadcon; if (gcc->style) evas_stringshare_del(gcc->style); - gcc->style = NULL; + gcc->style = evas_stringshare_add(E_GADCON_CLIENT_STYLE_PLAIN); _e_gadcon_client_save(gcc); e_gadcon_unpopulate(gc); e_gadcon_populate(gc); @@ -881,7 +888,7 @@ gcc = data; gc = gcc->gadcon; if (gcc->style) evas_stringshare_del(gcc->style); - gcc->style = evas_stringshare_add("inset"); + gcc->style = evas_stringshare_add(E_GADCON_CLIENT_STYLE_INSET); _e_gadcon_client_save(gcc); e_gadcon_unpopulate(gc); e_gadcon_populate(gc); @@ -990,7 +997,8 @@ e_util_menu_item_edje_icon_set(mi, "enlightenment/plain"); e_menu_item_radio_group_set(mi, 1); e_menu_item_radio_set(mi, 1); - if (!gcc->style) e_menu_item_toggle_set(mi, 1); + if ((gcc->style) && (!strcmp(gcc->style, E_GADCON_CLIENT_STYLE_PLAIN))) + e_menu_item_toggle_set(mi, 1); e_menu_item_callback_set(mi, _e_gadcon_client_cb_menu_style_plain, gcc); mi = e_menu_item_new(mn); @@ -998,7 +1006,7 @@ e_util_menu_item_edje_icon_set(mi, "enlightenment/plain"); e_menu_item_radio_group_set(mi, 1); e_menu_item_radio_set(mi, 1); - if ((gcc->style) && (!strcmp(gcc->style, "inset"))) + if ((gcc->style) && (!strcmp(gcc->style, E_GADCON_CLIENT_STYLE_INSET))) e_menu_item_toggle_set(mi, 1); e_menu_item_callback_set(mi, _e_gadcon_client_cb_menu_style_inset, gcc); =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_gadcon.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- e_gadcon.h 15 Jun 2006 07:24:10 -0000 1.23 +++ e_gadcon.h 9 Aug 2006 06:08:36 -0000 1.24 @@ -29,6 +29,9 @@ E_GADCON_ORIENT_CORNER_RB } E_Gadcon_Orient; +#define E_GADCON_CLIENT_STYLE_PLAIN "plain" +#define E_GADCON_CLIENT_STYLE_INSET "inset" + typedef struct _E_Gadcon E_Gadcon; typedef struct _E_Gadcon_Client E_Gadcon_Client; typedef struct _E_Gadcon_Client_Class E_Gadcon_Client_Class; @@ -93,6 +96,7 @@ Evas_Object *(*icon) (Evas *evas); /* All members below are part of version 2 */ } func; + char *default_style; }; struct _E_Gadcon_Client ------------------------------------------------------------------------- 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