bugfix: comp matching correctly edits in place and doesn't crash

This commit is contained in:
Mike Blumenkrantz 2014-01-30 10:44:28 -05:00
parent cd6fcead3e
commit d1fb844db0
1 changed files with 15 additions and 16 deletions

View File

@ -230,7 +230,6 @@ _edit_ok(void *d1, void *d2)
Match_Config *m = d1; Match_Config *m = d1;
Evas_Object *dia, *bg, *of = d2; Evas_Object *dia, *bg, *of = d2;
Evas_Object *il; Evas_Object *il;
int n;
if (m->title || m->name || m->clas || m->role) if (m->title || m->name || m->clas || m->role)
{ {
@ -266,22 +265,22 @@ _edit_ok(void *d1, void *d2)
m->match.argb = m->argb; m->match.argb = m->argb;
m->match.fullscreen = m->fullscreen; m->match.fullscreen = m->fullscreen;
m->match.modal = m->modal; m->match.modal = m->modal;
il = m->cfd->cfdata->edit_il; il = m->cfd->cfdata->edit_il;
if (il == m->cfd->cfdata->popups_il) {
m->cfd->cfdata->popups = eina_list_append(m->cfd->cfdata->popups, m); const Eina_List *l;
else if (il == m->cfd->cfdata->borders_il) E_Ilist_Item *ili;
m->cfd->cfdata->borders = eina_list_append(m->cfd->cfdata->borders, m);
else if (il == m->cfd->cfdata->overrides_il) EINA_LIST_FOREACH(e_widget_ilist_items_get(il), l, ili)
m->cfd->cfdata->overrides = eina_list_append(m->cfd->cfdata->overrides, m); {
else if (il == m->cfd->cfdata->menus_il) char *txt;
m->cfd->cfdata->menus = eina_list_append(m->cfd->cfdata->menus, m);
else if (il == m->cfd->cfdata->objects_il) if (e_widget_ilist_item_data_get(ili) != m) continue;
m->cfd->cfdata->objects = eina_list_append(m->cfd->cfdata->objects, m); txt = _match_label_get(m);
_match_ilist_append(il, m, -1, 0); e_ilist_item_label_set(ili, txt);
n = e_widget_ilist_count(il); free(txt);
e_widget_ilist_nth_show(il, n - 1, 0); break;
e_widget_ilist_selected_set(il, n - 1); }
}
} }
bg = evas_object_data_get(of, "bg"); bg = evas_object_data_get(of, "bg");
dia = evas_object_data_get(of, "dia"); dia = evas_object_data_get(of, "dia");