diff options
author | Simon Quigley <tsimonq2@ubuntu.com> | 2017-11-25 13:35:48 -0600 |
---|---|---|
committer | Simon Quigley <tsimonq2@ubuntu.com> | 2017-11-25 13:35:48 -0600 |
commit | 628a525ae2961f0461172613a0675dab6754c65e (patch) | |
tree | 9c16631a75cf703771196cabf274ee9eef9723d8 /shell/stock.c | |
parent | ab16195359ad146263dbd7b5ea2d94316caee627 (diff) | |
parent | 11e616945340e87a1f567ab92e6dfac3068875b1 (diff) |
Update upstream source from tag 'upstream/0.5.1+git20171103'
Update to upstream version '0.5.1+git20171103'
with Debian dir 12de6f1245697675c1d76dc1085c08844d715cb0
Diffstat (limited to 'shell/stock.c')
-rw-r--r-- | shell/stock.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/stock.c b/shell/stock.c index ad1a0135..86d66778 100644 --- a/shell/stock.c +++ b/shell/stock.c @@ -38,6 +38,8 @@ static GtkIconFactory *icon_factory; void stock_icon_register(gchar * filename, gchar * stock_id) { +#if GTK_CHECK_VERSION(3, 0, 0) +#else GtkIconSet *icon_set; GtkIconSource *icon_source; @@ -52,10 +54,13 @@ void stock_icon_register(gchar * filename, gchar * stock_id) gtk_icon_factory_add(icon_factory, stock_id, icon_set); gtk_icon_set_unref(icon_set); +#endif } void stock_icon_register_pixbuf(GdkPixbuf * pixbuf, gchar * stock_id) { +#if GTK_CHECK_VERSION(3, 0, 0) +#else GtkIconSet *icon_set; GtkIconSource *icon_source; @@ -69,6 +74,7 @@ void stock_icon_register_pixbuf(GdkPixbuf * pixbuf, gchar * stock_id) gtk_icon_factory_add(icon_factory, stock_id, icon_set); gtk_icon_set_unref(icon_set); +#endif } void stock_icons_init(void) @@ -78,14 +84,20 @@ void stock_icons_init(void) DEBUG("initializing stock icons"); +#if GTK_CHECK_VERSION(3, 0, 0) +#else icon_factory = gtk_icon_factory_new(); +#endif for (i = 0; i < n_stock_icons; i++) { stock_icon_register(stock_icons[i].filename, stock_icons[i].stock_id); } +#if GTK_CHECK_VERSION(3, 0, 0) +#else gtk_icon_factory_add_default(icon_factory); +#endif g_object_unref(icon_factory); } |