Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release-src > by-pkgid > 838409f06098f25972c735bffbbada7c > files > 1

gparted-0.33.0-2.mga7.src.rpm

From 56d8533addbfb2642fb77d17360f9c41f1eaa254 Mon Sep 17 00:00:00 2001
From: Luca Bacci <luca.bacci982@gmail.com>
Date: Tue, 26 Mar 2019 10:50:54 +0100
Subject: [PATCH] Always show menu images (!32)

There is a GtkSetting [1] that controls whether images in menus are
shown or not.  On some distributions / desktops it is enabled by default
and on others it is disabled by default.  To force show images in menus
set the 'always-show-image' property to true in Gtk::ImageMenuItems [2].

References:

[1] Gtk3 Reference Documentation - Settings/gtk-menu-images
    https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-menu-images

[2] Gtk3 Reference Documentation - GtkImageMenuItem
    https://developer.gnome.org/gtk3/stable/GtkImageMenuItem.html#gtk-image-menu-item-set-always-show-image

Closes !32 - Always show menu images
---
 src/MenuHelpers.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/MenuHelpers.cc b/src/MenuHelpers.cc
index feec5fed..722bd4cd 100644
--- a/src/MenuHelpers.cc
+++ b/src/MenuHelpers.cc
@@ -85,6 +85,7 @@ ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
 	set_image(image_widget);
 	set_label(label);
 	set_use_underline(true);
+	set_always_show_image(true);
 
 	show_all();
 }
@@ -101,6 +102,7 @@ ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
 	set_image(image_widget);
 	set_label(label);
 	set_use_underline(true);
+	set_always_show_image(true);
 
 	show_all();
 }
@@ -116,6 +118,7 @@ ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
 	set_image(image_widget);
 	set_label(label);
 	set_use_underline(true);
+	set_always_show_image(true);
 
 	show_all();
 }
@@ -140,6 +143,7 @@ StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
 
 	set_use_stock();
 	set_label(stock_id.get_string());
+	set_always_show_image(true);
 
 	show_all();
 }
@@ -159,6 +163,7 @@ StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
 
 	set_use_stock();
 	set_label(stock_id.get_string());
+	set_always_show_image(true);
 
 	show_all();
 }
@@ -172,6 +177,7 @@ StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
 
 	set_use_stock();
 	set_label(stock_id.get_string());
+	set_always_show_image(true);
 
 	show_all();
 }
-- 
2.21.0