[Xfce4-commits] [xfce/xfce4-panel] 01/03: Switch to GtkIconTheme (Bug #14125)
noreply at xfce.org
noreply at xfce.org
Tue Jan 2 21:21:54 CET 2018
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 3e87296e7229f3e100b11ba29fb1c870a26fc9db
Author: Olivier Duchateau <duchateau.olivier at gmail.com>
Date: Wed Dec 27 06:56:51 2017 +0100
Switch to GtkIconTheme (Bug #14125)
---
libxfce4panel/xfce-panel-image.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/libxfce4panel/xfce-panel-image.c b/libxfce4panel/xfce-panel-image.c
index 306d914..747bc88 100644
--- a/libxfce4panel/xfce-panel-image.c
+++ b/libxfce4panel/xfce-panel-image.c
@@ -501,10 +501,12 @@ xfce_panel_image_draw (GtkWidget *widget,
XfcePanelImagePrivate *priv = XFCE_PANEL_IMAGE (widget)->priv;
gint source_width, source_height;
gint dest_x, dest_y;
- GtkIconSource *source;
GdkPixbuf *rendered = NULL;
GdkPixbuf *pixbuf = priv->cache;
GtkStyleContext *context;
+ GdkScreen *screen;
+ GtkIconTheme *icon_theme;
+ GtkIconInfo *icon_info;
if (G_LIKELY (pixbuf != NULL))
{
@@ -520,10 +522,10 @@ xfce_panel_image_draw (GtkWidget *widget,
if (!gtk_widget_is_sensitive (widget))
{
- source = gtk_icon_source_new ();
- gtk_icon_source_set_pixbuf (source, pixbuf);
- rendered = gtk_render_icon_pixbuf (context, source, -1);
- gtk_icon_source_free (source);
+ screen = gtk_widget_get_screen (widget);
+ icon_theme = gtk_icon_theme_get_for_screen (screen);
+ icon_info = gtk_icon_info_new_for_pixbuf (icon_theme, pixbuf);
+ rendered = gtk_icon_info_load_icon (icon_info, NULL);
if (G_LIKELY (rendered != NULL))
pixbuf = rendered;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list