forked from enlightenment/enlightenment
use e_util_strcmp, set current gadcon style menu item to disabled, only use default style as menu item if current style not set
ticket #2023 SVN revision: 81226
This commit is contained in:
parent
558894792f
commit
a658db2782
|
@ -1760,13 +1760,12 @@ e_gadcon_client_util_menu_items_append(E_Gadcon_Client *gcc, E_Menu *menu_gadget
|
||||||
e_util_menu_item_theme_icon_set(mi, "enlightenment/plain");
|
e_util_menu_item_theme_icon_set(mi, "enlightenment/plain");
|
||||||
e_menu_item_radio_group_set(mi, 1);
|
e_menu_item_radio_group_set(mi, 1);
|
||||||
e_menu_item_radio_set(mi, 1);
|
e_menu_item_radio_set(mi, 1);
|
||||||
if ((gcc->style) &&
|
if (!e_util_strcmp(gcc->style, E_GADCON_CLIENT_STYLE_PLAIN))
|
||||||
(!strcmp(gcc->style, E_GADCON_CLIENT_STYLE_PLAIN)))
|
|
||||||
e_menu_item_toggle_set(mi, 1);
|
e_menu_item_toggle_set(mi, 1);
|
||||||
else if ((gcc->client_class->default_style) &&
|
else if ((!gcc->style) &&
|
||||||
(!strcmp(gcc->client_class->default_style,
|
(!e_util_strcmp(gcc->client_class->default_style, E_GADCON_CLIENT_STYLE_PLAIN)))
|
||||||
E_GADCON_CLIENT_STYLE_PLAIN)))
|
|
||||||
e_menu_item_toggle_set(mi, 1);
|
e_menu_item_toggle_set(mi, 1);
|
||||||
|
e_menu_item_disabled_set(mi, mi->toggle);
|
||||||
e_menu_item_callback_set(mi, _e_gadcon_client_cb_menu_style_plain, gcc);
|
e_menu_item_callback_set(mi, _e_gadcon_client_cb_menu_style_plain, gcc);
|
||||||
|
|
||||||
mi = e_menu_item_new(mo);
|
mi = e_menu_item_new(mo);
|
||||||
|
@ -1774,13 +1773,12 @@ e_gadcon_client_util_menu_items_append(E_Gadcon_Client *gcc, E_Menu *menu_gadget
|
||||||
e_util_menu_item_theme_icon_set(mi, "enlightenment/inset");
|
e_util_menu_item_theme_icon_set(mi, "enlightenment/inset");
|
||||||
e_menu_item_radio_group_set(mi, 1);
|
e_menu_item_radio_group_set(mi, 1);
|
||||||
e_menu_item_radio_set(mi, 1);
|
e_menu_item_radio_set(mi, 1);
|
||||||
if ((gcc->style) &&
|
if (!e_util_strcmp(gcc->style, E_GADCON_CLIENT_STYLE_INSET))
|
||||||
(!strcmp(gcc->style, E_GADCON_CLIENT_STYLE_INSET)))
|
|
||||||
e_menu_item_toggle_set(mi, 1);
|
e_menu_item_toggle_set(mi, 1);
|
||||||
else if ((gcc->client_class->default_style) &&
|
else if ((!gcc->style) &&
|
||||||
(!strcmp(gcc->client_class->default_style,
|
(!e_util_strcmp(gcc->client_class->default_style, E_GADCON_CLIENT_STYLE_INSET)))
|
||||||
E_GADCON_CLIENT_STYLE_INSET)))
|
|
||||||
e_menu_item_toggle_set(mi, 1);
|
e_menu_item_toggle_set(mi, 1);
|
||||||
|
e_menu_item_disabled_set(mi, mi->toggle);
|
||||||
e_menu_item_callback_set(mi, _e_gadcon_client_cb_menu_style_inset, gcc);
|
e_menu_item_callback_set(mi, _e_gadcon_client_cb_menu_style_inset, gcc);
|
||||||
|
|
||||||
mi = e_menu_item_new(menu_gadget);
|
mi = e_menu_item_new(menu_gadget);
|
||||||
|
|
Loading…
Reference in New Issue