[Xfce4-commits] [apps/xfce4-terminal] 01/01: Resolve "return from incompatible pointer type" warnings
noreply at xfce.org
noreply at xfce.org
Thu Mar 29 16:14:25 CEST 2018
This is an automated email from the git hooks/post-receive script.
f 2 4 0 4 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 apps/xfce4-terminal.
commit 6587747f01420be784c16bf0361f9d77255e6838
Author: Igor <f2404 at yandex.ru>
Date: Thu Mar 29 10:13:56 2018 -0400
Resolve "return from incompatible pointer type" warnings
---
terminal/terminal-image-loader.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/terminal/terminal-image-loader.c b/terminal/terminal-image-loader.c
index 1caf26c..da35e23 100644
--- a/terminal/terminal-image-loader.c
+++ b/terminal/terminal-image-loader.c
@@ -393,17 +393,15 @@ terminal_image_loader_load (TerminalImageLoader *loader,
/* check for a cached version */
for (lp = loader->cache; lp != NULL; lp = lp->next)
{
+ gint w, h;
pixbuf = GDK_PIXBUF (lp->data);
- if (gdk_pixbuf_get_height (pixbuf) == height
- && gdk_pixbuf_get_width (pixbuf) == width)
- {
- return g_object_ref (G_OBJECT (pixbuf));
- }
- else if (gdk_pixbuf_get_height (pixbuf) >= height
- && gdk_pixbuf_get_width (pixbuf) >= width
- && loader->style == TERMINAL_BACKGROUND_STYLE_TILED)
+ w = gdk_pixbuf_get_width (pixbuf);
+ h = gdk_pixbuf_get_height (pixbuf);
+
+ if ((w == width && h == height) ||
+ (w >= width && h >= height && loader->style == TERMINAL_BACKGROUND_STYLE_TILED))
{
- return g_object_ref (G_OBJECT (pixbuf));
+ return GDK_PIXBUF (g_object_ref (G_OBJECT (pixbuf)));
}
}
@@ -436,7 +434,7 @@ terminal_image_loader_load (TerminalImageLoader *loader,
loader->cache = g_slist_prepend (loader->cache, pixbuf);
- return g_object_ref (G_OBJECT (pixbuf));
+ return GDK_PIXBUF (g_object_ref (G_OBJECT (pixbuf)));
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list