[Xfce4-commits] [xfce/xfce4-panel] 01/01: Remove more references to GtkStock (Bug #13528)
noreply at xfce.org
noreply at xfce.org
Wed Jun 21 22:02:35 CEST 2017
This is an automated email from the git hooks/post-receive script.
o c h o s i 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 xfce/xfce4-panel.
commit 830356520568220f9971f4a9ecf2347a61a0b137
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Jun 21 22:02:02 2017 +0200
Remove more references to GtkStock (Bug #13528)
---
libxfce4panel/xfce-panel-plugin.c | 36 +++++++++++++++++++++++++++++++-----
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index d36cfc0..72ab727 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -1173,23 +1173,31 @@ xfce_panel_plugin_menu_get (XfcePanelPlugin *plugin)
{
/* properties item */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- item = gtk_image_menu_item_new_from_stock (GTK_STOCK_PROPERTIES, NULL);
+ item = gtk_image_menu_item_new_with_mnemonic (_("_Properties"));
G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_connect_swapped (G_OBJECT (item), "activate",
G_CALLBACK (xfce_panel_plugin_show_configure), plugin);
g_object_set_qdata (G_OBJECT (menu), item_properties, item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+ image = gtk_image_new_from_icon_name ("gtk-properties", GTK_ICON_SIZE_MENU);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+G_GNUC_END_IGNORE_DEPRECATIONS
if (PANEL_HAS_FLAG (plugin->priv->flags, PLUGIN_FLAG_SHOW_CONFIGURE))
gtk_widget_show (item);
/* about item */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- item = gtk_image_menu_item_new_from_stock (GTK_STOCK_ABOUT, NULL);
+ item = gtk_image_menu_item_new_with_mnemonic (_("_About"));
G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_connect_swapped (G_OBJECT (item), "activate",
G_CALLBACK (xfce_panel_plugin_show_about), plugin);
g_object_set_qdata (G_OBJECT (menu), item_about, item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+ image = gtk_image_new_from_icon_name ("gtk-about", GTK_ICON_SIZE_MENU);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+G_GNUC_END_IGNORE_DEPRECATIONS
if (PANEL_HAS_FLAG (plugin->priv->flags, PLUGIN_FLAG_SHOW_ABOUT))
gtk_widget_show (item);
@@ -1219,13 +1227,19 @@ G_GNUC_END_IGNORE_DEPRECATIONS
/* remove */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- item = gtk_image_menu_item_new_from_stock (GTK_STOCK_REMOVE, NULL);
+ item = gtk_image_menu_item_new_with_mnemonic (_("_Remove"));
G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_connect_swapped (G_OBJECT (item), "activate",
G_CALLBACK (xfce_panel_plugin_menu_remove), plugin);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
+ image = gtk_image_new_from_icon_name ("gtk-remove", GTK_ICON_SIZE_MENU);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ gtk_widget_show (image);
+
/* separator */
item = gtk_separator_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
@@ -1299,22 +1313,34 @@ G_GNUC_END_IGNORE_DEPRECATIONS
/* help item */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- item = gtk_image_menu_item_new_from_stock (GTK_STOCK_HELP, NULL);
+ item = gtk_image_menu_item_new_with_mnemonic (_("_Help"));
G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_connect_swapped (G_OBJECT (item), "activate",
G_CALLBACK (xfce_panel_plugin_menu_panel_help), plugin);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item);
gtk_widget_show (item);
+ image = gtk_image_new_from_icon_name ("gtk-help", GTK_ICON_SIZE_MENU);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ gtk_widget_show (image);
+
/* about item */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- item = gtk_image_menu_item_new_from_stock (GTK_STOCK_ABOUT, NULL);
+ item = gtk_image_menu_item_new_with_mnemonic (_("About"));
G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_connect_swapped (G_OBJECT (item), "activate",
G_CALLBACK (xfce_panel_plugin_menu_panel_about), plugin);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item);
gtk_widget_show (item);
+ image = gtk_image_new_from_icon_name ("help-about", GTK_ICON_SIZE_MENU);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ gtk_widget_show (image);
+
/* set panel menu */
plugin->priv->menu = GTK_MENU (menu);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list