[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 03/04: Support more icon themes in configuration dialog.

noreply at xfce.org noreply at xfce.org
Mon Jan 27 23:14:19 CET 2020


This is an automated email from the git hooks/post-receive script.

g   o   t   t   c   o   d   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 80f2761e3afe0c3bbf7de84f0ddd496b4b022f82
Author: Graeme Gott <graeme at gottcode.org>
Date:   Mon Jan 27 08:31:05 2020 -0500

    Support more icon themes in configuration dialog.
---
 panel-plugin/configuration-dialog.cpp | 37 ++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/configuration-dialog.cpp b/panel-plugin/configuration-dialog.cpp
index a1ab2d3..bc71e56 100644
--- a/panel-plugin/configuration-dialog.cpp
+++ b/panel-plugin/configuration-dialog.cpp
@@ -601,7 +601,16 @@ GtkWidget* ConfigurationDialog::init_appearance_tab()
 
 	// Add option to show as icons
 	m_show_as_icons = gtk_radio_button_new_with_mnemonic(NULL, _("Show as _icons"));
-	gtk_button_set_image(GTK_BUTTON(m_show_as_icons), gtk_image_new_from_icon_name("view-app-grid-symbolic", GTK_ICON_SIZE_DND));
+	{
+		gchar* icons[] = {
+			g_strdup("view-list-icons"),
+			g_strdup("view-grid"),
+			NULL
+		};
+		GIcon* gicon = g_themed_icon_new_from_names(icons, -1);
+		gtk_button_set_image(GTK_BUTTON(m_show_as_icons), gtk_image_new_from_gicon(gicon, GTK_ICON_SIZE_DND));
+		g_object_unref(gicon);
+	}
 	gtk_button_set_image_position(GTK_BUTTON(m_show_as_icons), GTK_POS_TOP);
 	gtk_button_set_always_show_image(GTK_BUTTON(m_show_as_icons), true);
 	gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(m_show_as_icons), false);
@@ -609,7 +618,18 @@ GtkWidget* ConfigurationDialog::init_appearance_tab()
 
 	// Add option to show as list
 	m_show_as_list = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(m_show_as_icons), _("Show as lis_t"));
-	gtk_button_set_image(GTK_BUTTON(m_show_as_list), gtk_image_new_from_icon_name("view-list-symbolic", GTK_ICON_SIZE_DND));
+	m_show_as_icons = gtk_radio_button_new_with_mnemonic(NULL, _("Show as _icons"));
+	{
+		gchar* icons[] = {
+			g_strdup("view-list-compact"),
+			g_strdup("view-list-details"),
+			g_strdup("view-list"),
+			NULL
+		};
+		GIcon* gicon = g_themed_icon_new_from_names(icons, -1);
+		gtk_button_set_image(GTK_BUTTON(m_show_as_list), gtk_image_new_from_gicon(gicon, GTK_ICON_SIZE_DND));
+		g_object_unref(gicon);
+	}
 	gtk_button_set_image_position(GTK_BUTTON(m_show_as_list), GTK_POS_TOP);
 	gtk_button_set_always_show_image(GTK_BUTTON(m_show_as_list), true);
 	gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(m_show_as_list), false);
@@ -617,7 +637,18 @@ GtkWidget* ConfigurationDialog::init_appearance_tab()
 
 	// Add option to show as tree
 	m_show_as_tree = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(m_show_as_list), _("Show as t_ree"));
-	gtk_button_set_image(GTK_BUTTON(m_show_as_tree), gtk_image_new_from_icon_name("pan-end-symbolic", GTK_ICON_SIZE_DND));
+	m_show_as_icons = gtk_radio_button_new_with_mnemonic(NULL, _("Show as _icons"));
+	{
+		gchar* icons[] = {
+			g_strdup("view-list-tree"),
+			g_strdup("view-list-details"),
+			g_strdup("pan-end"),
+			NULL
+		};
+		GIcon* gicon = g_themed_icon_new_from_names(icons, -1);
+		gtk_button_set_image(GTK_BUTTON(m_show_as_tree), gtk_image_new_from_gicon(gicon, GTK_ICON_SIZE_DND));
+		g_object_unref(gicon);
+	}
 	gtk_button_set_image_position(GTK_BUTTON(m_show_as_tree), GTK_POS_TOP);
 	gtk_button_set_always_show_image(GTK_BUTTON(m_show_as_tree), true);
 	gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(m_show_as_tree), false);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list