From 4a01ee16a0d53d3120f37e24cdfb345528e6a187 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 7 Jan 2013 09:35:30 +0000 Subject: [PATCH] add option for disabling icons in menus ticket #2168 SVN revision: 82333 --- ChangeLog | 4 ++++ NEWS | 3 +++ src/bin/e_config.h | 3 ++- src/bin/e_configure_option.c | 1 + src/bin/e_menu.c | 2 +- src/modules/conf_menus/e_int_config_menus.c | 7 ++++++- 6 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60c090847..efda88464 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-01-07 Mike Blumenkrantz + + * Added option for disabling icons in menus + 2013-01-07 Thomas Petazzoni * Fix build with uClibc. diff --git a/NEWS b/NEWS index cb9db0970..5a1932ac3 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,9 @@ Additions: * Added e_configure_option API * Added D-Bus notification to systray module * Added D-Bus menu support + Config: + * Added option for disabling icons in menus + Deprecations: * diff --git a/src/bin/e_config.h b/src/bin/e_config.h index 9956ce7f7..0d585e720 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -38,7 +38,7 @@ typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme; /* increment this whenever a new set of config values are added but the users * config doesn't need to be wiped - simply new values need to be put in */ -#define E_CONFIG_FILE_GENERATION 1 +#define E_CONFIG_FILE_GENERATION 2 #define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION) struct _E_Config @@ -173,6 +173,7 @@ struct _E_Config int menu_eap_comment_show; // GUI int menu_favorites_show; // GUI int menu_apps_show; // GUI + Eina_Bool menu_icons_hide; // GUI int menu_gadcon_client_toplevel; // GUI int fullscreen_policy; // GUI const char *exebuf_term_cmd; // GUI diff --git a/src/bin/e_configure_option.c b/src/bin/e_configure_option.c index ce330f47c..db92adca5 100644 --- a/src/bin/e_configure_option.c +++ b/src/bin/e_configure_option.c @@ -1702,6 +1702,7 @@ e_configure_option_init(void) OPT_ADD(BOOL, transient.desktop, _("Transient windows follow desk change of their child"), _("border"), _("transient"), _("placement"), _("vdesk")); OPT_ADD(BOOL, transient.iconify, _("Transient windows follow iconification of their child"), _("border"), _("transient"), _("iconif")); + OPT_ADD(BOOL, menu_icons_hide, _("Disable icons in menus"), _("menu"), _("image")); OPT_ADD(BOOL, menu_eap_name_show, _("Application menus shows Name field"), _("menu")); OPT_HELP("This information is taken from the related .desktop file"); OPT_ADD(BOOL, menu_eap_generic_show, _("Application menus shows Generic field"), _("menu")); diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c index 276e8dab1..0630af064 100644 --- a/src/bin/e_menu.c +++ b/src/bin/e_menu.c @@ -1516,7 +1516,7 @@ no_submenu_item: evas_object_pass_events_set(o, 1); e_box_pack_end(mi->container_object, o); } - if ((mi->icon) || (mi->realize_cb.func)) + if ((!e_config->menu_icons_hide) && ((mi->icon) || (mi->realize_cb.func))) { int icon_w = 0, icon_h = 0; diff --git a/src/modules/conf_menus/e_int_config_menus.c b/src/modules/conf_menus/e_int_config_menus.c index 7c0108912..8d504cde1 100644 --- a/src/modules/conf_menus/e_int_config_menus.c +++ b/src/modules/conf_menus/e_int_config_menus.c @@ -3,7 +3,7 @@ /* local structures */ struct _E_Config_Dialog_Data { - int show_favs, show_apps; + int show_favs, show_apps, hide_icons; int show_name, show_generic, show_comment; int menu_gadcon_client_toplevel; double scroll_speed, fast_mouse_move_threshhold; @@ -61,6 +61,7 @@ _fill_data(E_Config_Dialog_Data *cfdata __UNUSED__) cfdata->default_system_menu = NULL; cfdata->show_favs = e_config->menu_favorites_show; cfdata->show_apps = e_config->menu_apps_show; + cfdata->hide_icons = e_config->menu_icons_hide; cfdata->show_name = e_config->menu_eap_name_show; cfdata->show_generic = e_config->menu_eap_generic_show; cfdata->show_comment = e_config->menu_eap_comment_show; @@ -298,6 +299,8 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data 0.5, 0.0); ol = e_widget_list_add(evas, 0, 0); + ow = e_widget_check_add(evas, _("Disable icons in menus"), &(cfdata->hide_icons)); + e_widget_list_object_append(ol, ow, 1, 0, 0.5); ow = e_widget_label_add(evas, _("Menu Scroll Speed")); e_widget_list_object_append(ol, ow, 1, 0, 0.5); ow = e_widget_slider_add(evas, 1, 0, _("%5.0f pixels/s"), 0, 20000, 100, @@ -325,6 +328,7 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) { e_config->menu_favorites_show = cfdata->show_favs; e_config->menu_apps_show = cfdata->show_apps; + e_config->menu_icons_hide = cfdata->hide_icons; e_config->menu_eap_name_show = cfdata->show_name; e_config->menu_eap_generic_show = cfdata->show_generic; e_config->menu_eap_comment_show = cfdata->show_comment; @@ -377,6 +381,7 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda return ((e_config->menu_favorites_show != cfdata->show_favs) || (e_config->menu_apps_show != cfdata->show_apps) || + (e_config->menu_icons_hide != !!cfdata->hide_icons) || (e_config->menu_eap_name_show != cfdata->show_name) || (e_config->menu_eap_generic_show != cfdata->show_generic) || (e_config->menu_eap_comment_show != cfdata->show_comment) ||