From 05d1d3ca7fedda82eff13abffd085235d2440797 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Wed, 23 May 2018 22:48:21 -0400 Subject: [PATCH] xrandr-applet-popup: show icon only if "menus-have-icons" is not turned off --- plugins/xrandr/msd-xrandr-manager.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/xrandr/msd-xrandr-manager.c b/plugins/xrandr/msd-xrandr-manager.c index 42229235e..7cdaf699a 100644 --- a/plugins/xrandr/msd-xrandr-manager.c +++ b/plugins/xrandr/msd-xrandr-manager.c @@ -1725,6 +1725,7 @@ make_menu_item_for_output_title (MsdXrandrManager *manager, MateRROutputInfo *ou GdkRGBA color; gchar *css, *color_string, *theme_name; GtkSettings *settings; + GSettings *icon_settings; struct MsdXrandrManagerPrivate *priv = manager->priv; @@ -1750,7 +1751,11 @@ make_menu_item_for_output_title (MsdXrandrManager *manager, MateRROutputInfo *ou gtk_widget_set_margin_top (label, OUTPUT_TITLE_ITEM_BORDER + OUTPUT_TITLE_ITEM_PADDING); gtk_widget_set_margin_bottom (label, OUTPUT_TITLE_ITEM_BORDER + OUTPUT_TITLE_ITEM_PADDING); - gtk_container_add (GTK_CONTAINER (box), image); + /*Load the icon unless the user has icons in menus turned off*/ + icon_settings = g_settings_new ("org.mate.interface"); + if (g_settings_get_boolean (icon_settings, "menus-have-icons")){ + gtk_container_add (GTK_CONTAINER (box), image); + } gtk_container_add (GTK_CONTAINER (box), label); gtk_container_add (GTK_CONTAINER (item), box);