add option for disabling icons in menus

ticket #2168


SVN revision: 82333
This commit is contained in:
Mike Blumenkrantz 2013-01-07 09:35:30 +00:00
parent 59ba1738ab
commit 4a01ee16a0
6 changed files with 17 additions and 3 deletions

View File

@ -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.

3
NEWS
View File

@ -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:
*

View File

@ -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

View File

@ -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"));

View File

@ -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;

View File

@ -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) ||