[Xfce4-commits] <xfce4-panel:master> Optimize loading icons from absolute paths.
Nick Schermer
noreply at xfce.org
Tue Dec 28 13:18:01 CET 2010
Updating branch refs/heads/master
to 82bbb2b7ca6348d6e3b5ef14cd653f9383f7f298 (commit)
from 32fcc728f3c902c686c4439d404cafd5241fdd9c (commit)
commit 82bbb2b7ca6348d6e3b5ef14cd653f9383f7f298
Author: Nick Schermer <nick at xfce.org>
Date: Tue Dec 28 13:16:20 2010 +0100
Optimize loading icons from absolute paths.
libxfce4panel/xfce-panel-convenience.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libxfce4panel/xfce-panel-convenience.c b/libxfce4panel/xfce-panel-convenience.c
index ed4e681..dc26ff8 100644
--- a/libxfce4panel/xfce-panel-convenience.c
+++ b/libxfce4panel/xfce-panel-convenience.c
@@ -166,13 +166,15 @@ xfce_panel_pixbuf_from_source (const gchar *source,
if (G_UNLIKELY (g_path_is_absolute (source)))
{
- pixbuf = gdk_pixbuf_new_from_file (source, &error);
+ pixbuf = gdk_pixbuf_new_from_file_at_scale (source, size, size, TRUE, &error);
if (G_UNLIKELY (pixbuf == NULL))
{
g_message ("Failed to load image \"%s\": %s",
source, error->message);
g_error_free (error);
}
+
+ return pixbuf;
}
else
{
More information about the Xfce4-commits
mailing list