Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mbar
Dir : e_modules/mbar Modified Files: e_mod_main.c e_mod_config.c e_mod_config_point.c Log Message: Allow setting exec to empty. - Basically this copies the name field into exec so that e app change callback doesn't delete it. =================================================================== RCS file: /cvs/e/e_modules/mbar/e_mod_main.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- e_mod_main.c 6 Apr 2006 23:03:26 -0000 1.17 +++ e_mod_main.c 7 Apr 2006 09:12:31 -0000 1.18 @@ -421,6 +421,7 @@ } break; case E_APP_DEL: + printf("Change Del\n"); if (e_app_is_parent(mb->apps, a)) { MBar_Icon *ic; @@ -432,6 +433,7 @@ } break; case E_APP_CHANGE: + printf("App Change\n"); if (e_app_is_parent(mb->apps, a)) { MBar_Icon *ic; @@ -458,6 +460,7 @@ } break; case E_APP_ORDER: + printf("App Order\n"); if (a == mb->apps) { for (ll = mb->apps->subapps; ll; ll = ll->next) @@ -473,6 +476,7 @@ } break; case E_APP_EXEC: + printf("App Exec\n"); if (e_app_is_parent(mb->apps, a)) { MBar_Icon *ic; @@ -2008,8 +2012,11 @@ { if (ic->app->exe) { - e_zone_app_exec(ic->mbb->gmc->zone, ic->app); - e_exehist_add("mbar", ic->app->exe); + if (!strstr(ic->app->exe, ic->app->name)) + { + e_zone_app_exec(ic->mbb->gmc->zone, ic->app); + e_exehist_add("mbar", ic->app->exe); + } } } } =================================================================== RCS file: /cvs/e/e_modules/mbar/e_mod_config.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- e_mod_config.c 5 Apr 2006 17:48:49 -0000 1.3 +++ e_mod_config.c 7 Apr 2006 09:12:31 -0000 1.4 @@ -84,8 +84,11 @@ { Evas_Object *o, *ob, *of, *ot, *il; Evas_List *l; + MBar *mb; char buf[4096]; + mb = cfd->data; + o = e_widget_list_add(evas, 0, 0); ob = e_widget_check_add(evas, _("Show Follower"), &(cfdata->follower)); e_widget_list_object_append(o, ob, 1, 1, 0.5); @@ -97,9 +100,9 @@ ot = e_widget_table_add(evas, 0); il = e_widget_ilist_add(evas, 32, 32, NULL); e_widget_min_size_set(il, 100, 130); - if (cfdata->apps->subapps) + if (mb->apps->subapps) { - for (l = cfdata->apps->subapps; l; l = l->next) + for (l = mb->apps->subapps; l; l = l->next) { E_App *app; Evas_Object *ic; @@ -115,11 +118,11 @@ e_widget_ilist_go(il); e_widget_table_object_append(ot, il, 0, 0, 3, 3, 1, 0, 1, 0); - ob = e_widget_button_add(evas, _("New Point"), NULL, _new_point, il, cfdata); + ob = e_widget_button_add(evas, _("New Point"), NULL, _new_point, il, cfd); e_widget_table_object_append(ot, ob, 0, 3, 1, 1, 1, 0, 1, 0); - ob = e_widget_button_add(evas, _("Edit Point"), NULL, _edit_point, il, cfdata); + ob = e_widget_button_add(evas, _("Edit Point"), NULL, _edit_point, il, cfd); e_widget_table_object_append(ot, ob, 1, 3, 1, 1, 1, 0, 1, 0); - ob = e_widget_button_add(evas, _("Delete Point"), NULL, _delete_point, il, cfdata); + ob = e_widget_button_add(evas, _("Delete Point"), NULL, _delete_point, il, cfd); e_widget_table_object_append(ot, ob, 2, 3, 1, 1, 1, 0, 1, 0); e_widget_framelist_object_append(of, ot); @@ -217,37 +220,42 @@ { E_App *app; Evas_Object *il; - E_Config_Dialog_Data *cfdata; - - cfdata = data2; - + E_Config_Dialog *cfd; + MBar *mb; + + cfd = data2; il = data; + mb = cfd->data; + app = e_app_raw_new(); - point_edit_show(cfdata->con, app, cfdata->apps, il); + point_edit_show(cfd->cfdata->con, app, mb->apps, il); } static void _edit_point(void *data, void *data2) { Evas_Object *il; - E_Config_Dialog_Data *cfdata; + E_Config_Dialog *cfd; Evas_List *l; + MBar *mb; const char *name; il = data; - cfdata = data2; + cfd = data2; + mb = cfd->data; + name = e_widget_ilist_selected_label_get(il); if (!name) return; - for (l = cfdata->apps->subapps; l; l = l->next) + for (l = mb->apps->subapps; l; l = l->next) { E_App *app; app = l->data; if (!strcmp(app->name, name)) { - point_edit_show(cfdata->con, app); + point_edit_show(cfd->cfdata->con, app, mb->apps, il); break; } } @@ -257,17 +265,20 @@ _delete_point(void *data, void *data2) { Evas_Object *il; - E_Config_Dialog_Data *cfdata; + E_Config_Dialog *cfd; Evas_List *l; + MBar *mb; const char *name; il = data; - cfdata = data2; + cfd = data2; + mb = cfd->data; + name = e_widget_ilist_selected_label_get(il); if (!name) return; - for (l = cfdata->apps->subapps; l; l = l->next) + for (l = mb->apps->subapps; l; l = l->next) { E_App *app; =================================================================== RCS file: /cvs/e/e_modules/mbar/e_mod_config_point.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- e_mod_config_point.c 7 Apr 2006 00:52:15 -0000 1.3 +++ e_mod_config_point.c 7 Apr 2006 09:12:31 -0000 1.4 @@ -88,15 +88,20 @@ { /*- BASIC -*/ IFDUP(cfdata->editor->eap->name, cfdata->name); - IFDUP(cfdata->editor->eap->exe, cfdata->exe); + if (cfdata->editor->eap->exe) + IFDUP(cfdata->editor->eap->exe, cfdata->exe); + else + IFDUP(cfdata->editor->eap->name, cfdata->exe); + IFDUP(cfdata->editor->eap->generic, cfdata->generic); IFDUP(cfdata->editor->eap->comment, cfdata->comment); //IFDUP(cfdata->editor->eap->icon_class, cfdata->iclass); IFDUP(cfdata->editor->eap->path, cfdata->path); cfdata->startup_notify = cfdata->editor->eap->startup_notify; cfdata->wait_exit = cfdata->editor->eap->wait_exit; + cfdata->is_new = 0; - if (!cfdata->editor->eap->path) + if (!cfdata->path) cfdata->is_new = 1; } @@ -162,8 +167,13 @@ if (cfdata->name) eap->name = evas_stringshare_add(cfdata->name); + if (cfdata->exe) eap->exe = evas_stringshare_add(cfdata->exe); + else + if (cfdata->name) + eap->exe = evas_stringshare_add(cfdata->name); + if (cfdata->image) eap->image = evas_stringshare_add(cfdata->image); if (cfdata->generic) ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs