Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/modules/ibar Modified Files: e_mod_config.c e_mod_main.c e_mod_main.h Log Message: move bar directory down 1 level so all "bar" dirs are in their own domain - makes listing available bar dirs, managing them and so on much simpler and cleaner. also add label popups to ibar (finally). =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/ibar/e_mod_config.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- e_mod_config.c 20 Apr 2006 11:30:24 -0000 1.21 +++ e_mod_config.c 10 May 2006 07:42:39 -0000 1.22 @@ -7,6 +7,7 @@ struct _E_Config_Dialog_Data { char *dir; + int show_label; }; /* Protos */ @@ -46,6 +47,7 @@ cfdata->dir = strdup(ci->dir); else cfdata->dir = strdup(""); + cfdata->show_label = ci->show_label; } static void * @@ -71,19 +73,21 @@ static Evas_Object * _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) { - Evas_Object *o, *of, *ol; + Evas_Object *o, *of, *ol, *ob; Ecore_List *dirs; char *home, buf[4096], *file; int selnum = -1; - o = e_widget_framelist_add(evas, _("Selected Bar Source"), 0); + o = e_widget_list_add(evas, 0, 0); + + of = e_widget_framelist_add(evas, _("Selected Bar Source"), 0); ol = e_widget_tlist_add(evas, &(cfdata->dir)); - e_widget_min_size_set(ol, 160, 200); - e_widget_framelist_object_append(o, ol); + e_widget_min_size_set(ol, 160, 160); + e_widget_framelist_object_append(of, ol); home = e_user_homedir_get(); - snprintf(buf, sizeof(buf), "%s/.e/e/applications", home); + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar", home); dirs = ecore_file_ls(buf); if (dirs) @@ -94,7 +98,7 @@ while ((file = ecore_list_next(dirs))) { if (file[0] == '.') continue; - snprintf(buf, sizeof(buf), "%s/.e/e/applications/%s", home, file); + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s", home, file); if (ecore_file_is_dir(buf)) { e_widget_tlist_append(ol, file, NULL, NULL, file); @@ -109,6 +113,12 @@ e_widget_tlist_go(ol); if (selnum >= 0) e_widget_tlist_selected_set(ol, selnum); + + e_widget_list_object_append(o, of, 1, 1, 0.5); + + ob = e_widget_check_add(evas, _("Show Icon Label"), &(cfdata->show_label)); + e_widget_list_object_append(o, ob, 1, 1, 0.5); + return o; } @@ -121,6 +131,7 @@ if (ci->dir) evas_stringshare_del(ci->dir); ci->dir = NULL; if (cfdata->dir) ci->dir = evas_stringshare_add(cfdata->dir); + ci->show_label = cfdata->show_label; _ibar_config_update(); e_config_save_queue(); return 1; =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/ibar/e_mod_main.c,v retrieving revision 1.114 retrieving revision 1.115 diff -u -3 -r1.114 -r1.115 --- e_mod_main.c 9 May 2006 13:02:47 -0000 1.114 +++ e_mod_main.c 10 May 2006 07:42:39 -0000 1.115 @@ -53,6 +53,7 @@ int drop_before; E_App *apps; Evas_List *icons; + int show_label; }; struct _IBar_Icon @@ -126,9 +127,10 @@ inst = E_NEW(Instance, 1); ci = _ibar_config_item_get(id); - if (!ci->dir) ci->dir = evas_stringshare_add("bar"); + if (!ci->dir) ci->dir = evas_stringshare_add("default"); inst->dir = evas_stringshare_add(ci->dir); b = _ibar_new(gc->evas, ci->dir); + b->show_label = ci->show_label; b->inst = inst; inst->ibar = b; o = b->o_box; @@ -249,7 +251,7 @@ homedir = e_user_homedir_get(); if (homedir) { - snprintf(buf, sizeof(buf), "%s/.e/e/applications/%s", homedir, dir); + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s", homedir, dir); free(homedir); } } @@ -281,6 +283,7 @@ Evas_List *l; E_App *a; + if (!b->apps) return; for (l = b->apps->subapps; l; l = l->next) { a = l->data; @@ -360,6 +363,7 @@ } ci = E_NEW(Config_Item, 1); ci->id = evas_stringshare_add(id); + ci->show_label = 1; ibar_config->items = evas_list_append(ibar_config->items, ci); return ci; } @@ -403,6 +407,7 @@ _ibar_resize_handle(inst->ibar); _gc_orient(inst->gcc); } + inst->ibar->show_label = ci->show_label; } } @@ -450,6 +455,7 @@ ic->o_holder = edje_object_add(evas_object_evas_get(b->o_box)); e_theme_edje_object_set(ic->o_holder, "base/theme/modules/ibar", "modules/ibar/icon"); + edje_object_part_text_set(ic->o_holder, "label", a->name); evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_MOUSE_IN, _ibar_cb_icon_mouse_in, ic); evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_MOUSE_OUT, _ibar_cb_icon_mouse_out, ic); evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_MOUSE_DOWN, _ibar_cb_icon_mouse_down, ic); @@ -462,6 +468,7 @@ ic->o_holder2 = edje_object_add(evas_object_evas_get(b->o_box)); e_theme_edje_object_set(ic->o_holder2, "base/theme/modules/ibar", "modules/ibar/icon_overlay"); + edje_object_part_text_set(ic->o_holder2, "label", a->name); evas_object_layer_set(ic->o_holder2, 9999); evas_object_pass_events_set(ic->o_holder2, 1); evas_object_show(ic->o_holder2); @@ -710,6 +717,8 @@ ev = event_info; ic = data; _ibar_icon_signal_emit(ic, "active", ""); + if (ic->ibar->show_label) + _ibar_icon_signal_emit(ic, "label_active", ""); } static void @@ -721,6 +730,8 @@ ev = event_info; ic = data; _ibar_icon_signal_emit(ic, "passive", ""); + if (ic->ibar->show_label) + _ibar_icon_signal_emit(ic, "label_passive", ""); } static void @@ -1137,6 +1148,7 @@ #define D conf_item_edd E_CONFIG_VAL(D, T, id, STR); E_CONFIG_VAL(D, T, dir, STR); + E_CONFIG_VAL(D, T, show_label, INT); conf_edd = E_CONFIG_DD_NEW("IBar_Config", Config); #undef T @@ -1155,7 +1167,8 @@ ci = E_NEW(Config_Item, 1); ci->id = evas_stringshare_add("0"); - ci->dir = evas_stringshare_add("bar"); + ci->dir = evas_stringshare_add("default"); + ci->show_label = 1; ibar_config->items = evas_list_append(ibar_config->items, ci); } =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/ibar/e_mod_main.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- e_mod_main.h 9 May 2006 13:02:47 -0000 1.33 +++ e_mod_main.h 10 May 2006 07:42:39 -0000 1.34 @@ -23,6 +23,7 @@ { char *id; char *dir; + int show_label; }; EAPI extern E_Module_Api e_modapi; ------------------------------------------------------- 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