summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/e_ilist.c22
-rw-r--r--src/bin/e_int_config_fonts.c12
-rw-r--r--src/bin/e_widget_ilist.c17
3 files changed, 32 insertions, 19 deletions
diff --git a/src/bin/e_ilist.c b/src/bin/e_ilist.c
index ee99971223..e23a4cb4e8 100644
--- a/src/bin/e_ilist.c
+++ b/src/bin/e_ilist.c
@@ -222,9 +222,26 @@ e_ilist_selected_set(Evas_Object *obj, int n)
EAPI int
e_ilist_selected_get(Evas_Object *obj)
{
+ Evas_List *l;
+ int i, j;
+
API_ENTRY return -1;
if (!sd->items) return -1;
- return sd->selected;
+ if (!sd->multi_select)
+ return sd->selected;
+ else
+ {
+ j = -1;
+ for (i = 0, l = sd->items; l; l = l->next, i++)
+ {
+ E_Ilist_Item *li;
+
+ li = l->data;
+ if (!li) continue;
+ if (li->selected) j = i;
+ }
+ return j;
+ }
}
EAPI const char *
@@ -468,6 +485,9 @@ e_ilist_multi_select(Evas_Object *obj, int n)
{
edje_object_signal_emit(si->o_base, "e,state,unselected", "e");
si->selected = 0;
+ if (si->func_hilight) si->func_hilight(si->data, si->data2);
+ if (sd->selector) return;
+ if (si->func) si->func(si->data, si->data2);
return;
}
si->selected = 1;
diff --git a/src/bin/e_int_config_fonts.c b/src/bin/e_int_config_fonts.c
index c445e0ab92..332117e47f 100644
--- a/src/bin/e_int_config_fonts.c
+++ b/src/bin/e_int_config_fonts.c
@@ -573,13 +573,23 @@ _ilist_font_cb_change(void *data, Evas_Object *obj)
}
indx = e_widget_ilist_selected_get(cfdata->gui.class_list);
+ if (indx < 0)
+ {
+ e_widget_disabled_set(cfdata->gui.enabled, 1);
+ e_widget_disabled_set(cfdata->gui.font, 1);
+ e_widget_disabled_set(cfdata->gui.size, 1);
+ e_widget_check_checked_set(cfdata->gui.enabled, 0);
+ if (cfdata->gui.font_list)
+ e_widget_ilist_unselect(cfdata->gui.font_list);
+ return;
+ }
+
tc = evas_list_nth(cfdata->text_classes, indx);
cfdata->cur_index = indx;
e_widget_disabled_set(cfdata->gui.enabled, 0);
e_widget_disabled_set(cfdata->gui.font, !tc->enabled);
e_widget_disabled_set(cfdata->gui.size, !tc->enabled);
-
e_widget_check_checked_set(cfdata->gui.enabled, tc->enabled);
if (cfdata->gui.font_list)
{
diff --git a/src/bin/e_widget_ilist.c b/src/bin/e_widget_ilist.c
index 75e136b502..c2b45f2a0f 100644
--- a/src/bin/e_widget_ilist.c
+++ b/src/bin/e_widget_ilist.c
@@ -235,25 +235,8 @@ EAPI void
e_widget_ilist_clear(Evas_Object *obj)
{
E_Widget_Data *wd;
-/*
- int mw, mh, vw, vh, w, h;
- */
wd = e_widget_data_get(obj);
e_ilist_clear(wd->o_ilist);
-
- /*
- e_ilist_min_size_get(wd->o_ilist, &mw, &mh);
- evas_object_resize(wd->o_ilist, mw, mh);
- e_scrollframe_child_viewport_size_get(wd->o_scrollframe, &vw, &vh);
- evas_object_geometry_get(wd->o_scrollframe, NULL, NULL, &w, &h);
- if (mw > vw)
- {
- Evas_Coord wmw, wmh;
-
- e_widget_min_size_get(obj, &wmw, &wmh);
- e_widget_min_size_set(obj, mw + (w - vw), wmh);
- }
- */
}
EAPI int