forked from enlightenment/enlightenment
move gadcon orientation icon setting code to e_util function
SVN revision: 76305
This commit is contained in:
parent
60c4343df4
commit
10a6ce56f6
|
@ -1548,3 +1548,62 @@ e_util_binding_match(const Eina_List *bindlist, Ecore_Event_Key *ev, unsigned in
|
|||
if (num) *num = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_util_gadcon_orient_icon_set(E_Gadcon_Orient orient, Evas_Object *obj)
|
||||
{
|
||||
switch (orient)
|
||||
{
|
||||
case E_GADCON_ORIENT_LEFT:
|
||||
e_util_icon_theme_set(obj, "preferences-position-left");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_RIGHT:
|
||||
e_util_icon_theme_set(obj, "preferences-position-right");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_TOP:
|
||||
e_util_icon_theme_set(obj, "preferences-position-top");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_BOTTOM:
|
||||
e_util_icon_theme_set(obj, "preferences-position-bottom");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_TL:
|
||||
e_util_icon_theme_set(obj, "preferences-position-top-left");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_TR:
|
||||
e_util_icon_theme_set(obj, "preferences-position-top-right");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_BL:
|
||||
e_util_icon_theme_set(obj, "preferences-position-bottom-left");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_BR:
|
||||
e_util_icon_theme_set(obj, "preferences-position-bottom-right");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_LT:
|
||||
e_util_icon_theme_set(obj, "preferences-position-left-top");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_RT:
|
||||
e_util_icon_theme_set(obj, "preferences-position-right-top");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_LB:
|
||||
e_util_icon_theme_set(obj, "preferences-position-left-bottom");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_RB:
|
||||
e_util_icon_theme_set(obj, "preferences-position-right-bottom");
|
||||
break;
|
||||
|
||||
default:
|
||||
e_util_icon_theme_set(obj, "enlightenment");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,6 @@ EAPI Eina_Bool e_util_fullscreen_any(void);
|
|||
EAPI const char *e_util_time_str_get(long int seconds);
|
||||
EAPI void e_util_size_debug_set(Evas_Object *obj, Eina_Bool enable);
|
||||
EAPI Efreet_Desktop *e_util_terminal_desktop_get(void);
|
||||
|
||||
EAPI void e_util_gadcon_orient_icon_set(E_Gadcon_Orient orient, Evas_Object *obj);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -176,60 +176,7 @@ _ilist_item_new(E_Config_Dialog_Data *cfdata, Eina_Bool append, E_Shelf *es)
|
|||
evas_object_data_set(es->o_base, "cfdata", cfdata);
|
||||
|
||||
ob = e_icon_add(evas_object_evas_get(cfdata->o_list));
|
||||
switch (es->cfg->orient)
|
||||
{
|
||||
case E_GADCON_ORIENT_LEFT:
|
||||
e_util_icon_theme_set(ob, "preferences-position-left");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_RIGHT:
|
||||
e_util_icon_theme_set(ob, "preferences-position-right");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_TOP:
|
||||
e_util_icon_theme_set(ob, "preferences-position-top");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_BOTTOM:
|
||||
e_util_icon_theme_set(ob, "preferences-position-bottom");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_TL:
|
||||
e_util_icon_theme_set(ob, "preferences-position-top-left");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_TR:
|
||||
e_util_icon_theme_set(ob, "preferences-position-top-right");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_BL:
|
||||
e_util_icon_theme_set(ob, "preferences-position-bottom-left");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_BR:
|
||||
e_util_icon_theme_set(ob, "preferences-position-bottom-right");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_LT:
|
||||
e_util_icon_theme_set(ob, "preferences-position-left-top");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_RT:
|
||||
e_util_icon_theme_set(ob, "preferences-position-right-top");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_LB:
|
||||
e_util_icon_theme_set(ob, "preferences-position-left-bottom");
|
||||
break;
|
||||
|
||||
case E_GADCON_ORIENT_CORNER_RB:
|
||||
e_util_icon_theme_set(ob, "preferences-position-right-bottom");
|
||||
break;
|
||||
|
||||
default:
|
||||
e_util_icon_theme_set(ob, "enlightenment");
|
||||
break;
|
||||
}
|
||||
e_util_gadcon_orient_icon_set(es->cfg->orient, ob);
|
||||
if (append)
|
||||
e_widget_ilist_append(cfdata->o_list, ob, buf,
|
||||
_ilist_cb_selected, es, buf);
|
||||
|
|
Loading…
Reference in New Issue