[Xfce4-commits] [panel-plugins/xfce4-places-plugin] 10/30: Ignore GtkImageMenuItem deprecations
noreply at xfce.org
noreply at xfce.org
Mon Apr 22 12:08:01 CEST 2019
This is an automated email from the git hooks/post-receive script.
b l u e s a b r 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-places-plugin.
commit 2bc8996defe0a40834bdfa2eed04427fab98f038
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Apr 20 07:36:51 2019 -0400
Ignore GtkImageMenuItem deprecations
---
panel-plugin/view.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/panel-plugin/view.c b/panel-plugin/view.c
index d51ec9a..c17adea 100644
--- a/panel-plugin/view.c
+++ b/panel-plugin/view.c
@@ -520,7 +520,9 @@ pview_add_menu_item(PlacesView *view, PlacesBookmark *bookmark)
view->needs_separator = FALSE;
}
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
item = gtk_image_menu_item_new_with_label(bookmark->label);
+ G_GNUC_END_IGNORE_DEPRECATIONS
/* try to set icon */
if(view->cfg->show_icons && bookmark->icon != NULL){
@@ -529,7 +531,9 @@ pview_add_menu_item(PlacesView *view, PlacesBookmark *bookmark)
if(G_LIKELY(pb != NULL)){
image = gtk_image_new_from_pixbuf(pb);
g_object_unref(pb);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
}
@@ -634,11 +638,15 @@ pview_update_menu(PlacesView *pd)
/* Search for files */
if(pd->cfg->search_cmd != NULL && *pd->cfg->search_cmd != '\0'){
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GtkWidget *search_item = gtk_image_menu_item_new_with_mnemonic(_("Search for Files"));
-
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
if(pd->cfg->show_icons){
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GtkWidget *search_image = gtk_image_new_from_icon_name("system-search", GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(search_item), search_image);
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
gtk_menu_shell_append(GTK_MENU_SHELL(pd->menu), search_item);
@@ -669,7 +677,9 @@ pview_update_menu(PlacesView *pd)
gtk_widget_show(separator);
if(pd->cfg->show_icons){
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
clear_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_CLEAR, NULL);
+ G_GNUC_END_IGNORE_DEPRECATIONS
}else{
GtkStockItem clear_stock_item;
gtk_stock_lookup(GTK_STOCK_CLEAR, &clear_stock_item);
@@ -687,13 +697,15 @@ pview_update_menu(PlacesView *pd)
G_CALLBACK(pview_cb_recent_items_clear), recent_menu);
}
-
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
recent_item = gtk_image_menu_item_new_with_label(_("Recent Documents"));
if(pd->cfg->show_icons){
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(recent_item),
gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU));
}
-
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
gtk_menu_item_set_submenu(GTK_MENU_ITEM(recent_item), recent_menu);
gtk_widget_show(recent_menu);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list