summaryrefslogtreecommitdiff
path: root/src/lib/elm_toolbar.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-02-23 17:12:35 +0000
committerTom Hacohen <tom@stosb.com>2015-02-23 17:16:21 +0000
commita59591b3116cbbe61c9de139244f51cadb9d775c (patch)
treee8e05891dc095efd2afc51eed586a818fb816f58 /src/lib/elm_toolbar.c
parent65649998f43ad1d52c4536afa6861ee3e44e62d0 (diff)
Fix code to conform to recent Eo changes.
Diffstat (limited to 'src/lib/elm_toolbar.c')
-rw-r--r--src/lib/elm_toolbar.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 95fbcf203..c418ced7c 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -417,11 +417,12 @@ _resize_job(void *data)
417 else 417 else
418 { 418 {
419 Elm_Object_Item *menu_it; 419 Elm_Object_Item *menu_it;
420 Eina_Bool tmp;
420 421
421 menu_it = elm_menu_item_add 422 menu_it = elm_menu_item_add
422 (menu, NULL, it->icon_str, it->label, 423 (menu, NULL, it->icon_str, it->label,
423 _elm_toolbar_item_menu_cb, it); 424 _elm_toolbar_item_menu_cb, it);
424 Eina_Bool disabled = eo_do(EO_OBJ(it), elm_wdg_item_disabled_get()); 425 Eina_Bool disabled = eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get());
425 eo_do(menu_it, elm_wdg_item_disabled_set(disabled)); 426 eo_do(menu_it, elm_wdg_item_disabled_set(disabled));
426 if (it->o_menu) 427 if (it->o_menu)
427 elm_menu_clone(it->o_menu, menu, menu_it); 428 elm_menu_clone(it->o_menu, menu, menu_it);
@@ -966,9 +967,10 @@ _resize_cb(void *data,
966EOLIAN static void 967EOLIAN static void
967_elm_toolbar_item_elm_widget_item_disable(Eo *eo_toolbar, Elm_Toolbar_Item_Data *toolbar_it) 968_elm_toolbar_item_elm_widget_item_disable(Eo *eo_toolbar, Elm_Toolbar_Item_Data *toolbar_it)
968{ 969{
970 Eina_Bool tmp;
969 const char* emission; 971 const char* emission;
970 972
971 if (eo_do(eo_toolbar, elm_wdg_item_disabled_get())) 973 if (eo_do_ret(eo_toolbar, tmp, elm_wdg_item_disabled_get()))
972 emission = "elm,state,disabled"; 974 emission = "elm,state,disabled";
973 else 975 else
974 emission = "elm,state,enabled"; 976 emission = "elm,state,enabled";
@@ -1033,10 +1035,11 @@ _item_select(Elm_Toolbar_Item_Data *it)
1033{ 1035{
1034 Evas_Object *obj; 1036 Evas_Object *obj;
1035 Eina_Bool sel; 1037 Eina_Bool sel;
1038 Eina_Bool tmp;
1036 1039
1037 ELM_TOOLBAR_DATA_GET(WIDGET(it), sd); 1040 ELM_TOOLBAR_DATA_GET(WIDGET(it), sd);
1038 1041
1039 if (eo_do(EO_OBJ(it), elm_wdg_item_disabled_get()) || (it->separator) || (it->object)) 1042 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()) || (it->separator) || (it->object))
1040 return; 1043 return;
1041 sel = it->selected; 1044 sel = it->selected;
1042 1045
@@ -1176,6 +1179,7 @@ _item_theme_hook(Evas_Object *obj,
1176 Evas_Coord mw = -1, mh = -1; 1179 Evas_Coord mw = -1, mh = -1;
1177 Evas_Object *view = VIEW(it); 1180 Evas_Object *view = VIEW(it);
1178 const char *style; 1181 const char *style;
1182 Eina_Bool tmp;
1179 1183
1180 ELM_TOOLBAR_DATA_GET(obj, sd); 1184 ELM_TOOLBAR_DATA_GET(obj, sd);
1181 1185
@@ -1193,7 +1197,7 @@ _item_theme_hook(Evas_Object *obj,
1193 if (it->icon) 1197 if (it->icon)
1194 elm_widget_signal_emit(it->icon, "elm,state,selected", "elm"); 1198 elm_widget_signal_emit(it->icon, "elm,state,selected", "elm");
1195 } 1199 }
1196 if (eo_do(EO_OBJ(it), elm_wdg_item_disabled_get())) 1200 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
1197 { 1201 {
1198 edje_object_signal_emit(view, "elm,state,disabled", "elm"); 1202 edje_object_signal_emit(view, "elm,state,disabled", "elm");
1199 if (it->icon) 1203 if (it->icon)
@@ -2212,10 +2216,11 @@ static char *
2212_access_state_cb(void *data, Evas_Object *obj EINA_UNUSED) 2216_access_state_cb(void *data, Evas_Object *obj EINA_UNUSED)
2213{ 2217{
2214 Elm_Toolbar_Item_Data *it = (Elm_Toolbar_Item_Data *)data; 2218 Elm_Toolbar_Item_Data *it = (Elm_Toolbar_Item_Data *)data;
2219 Eina_Bool tmp;
2215 2220
2216 if (it->separator) 2221 if (it->separator)
2217 return strdup(E_("Separator")); 2222 return strdup(E_("Separator"));
2218 else if (eo_do(EO_OBJ(it), elm_wdg_item_disabled_get())) 2223 else if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
2219 return strdup(E_("State: Disabled")); 2224 return strdup(E_("State: Disabled"));
2220 else if (it->selected) 2225 else if (it->selected)
2221 return strdup(E_("State: Selected")); 2226 return strdup(E_("State: Selected"));
@@ -2264,8 +2269,9 @@ _access_activate_cb(void *data EINA_UNUSED,
2264{ 2269{
2265 ELM_TOOLBAR_ITEM_DATA_GET(item, it); 2270 ELM_TOOLBAR_ITEM_DATA_GET(item, it);
2266 ELM_TOOLBAR_DATA_GET(WIDGET(it), sd); 2271 ELM_TOOLBAR_DATA_GET(WIDGET(it), sd);
2272 Eina_Bool tmp;
2267 2273
2268 if (eo_do(item, elm_wdg_item_disabled_get())) return; 2274 if (eo_do_ret(item, tmp, elm_wdg_item_disabled_get())) return;
2269 2275
2270 if (it->selected && (sd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS)) 2276 if (it->selected && (sd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS))
2271 { 2277 {
@@ -3625,7 +3631,8 @@ _elm_toolbar_item_state_set(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item
3625 } 3631 }
3626 if (item->icon) 3632 if (item->icon)
3627 { 3633 {
3628 if (eo_do(EO_OBJ(item), elm_wdg_item_disabled_get())) 3634 Eina_Bool tmp;
3635 if (eo_do_ret(EO_OBJ(item), tmp, elm_wdg_item_disabled_get()))
3629 elm_widget_signal_emit(item->icon, "elm,state,disabled", "elm"); 3636 elm_widget_signal_emit(item->icon, "elm,state,disabled", "elm");
3630 else 3637 else
3631 elm_widget_signal_emit(item->icon, "elm,state,enabled", "elm"); 3638 elm_widget_signal_emit(item->icon, "elm,state,enabled", "elm");