gnome-desktop r5086 - trunk/libgnome-desktop



Author: ssp
Date: Sat May 17 03:46:10 2008
New Revision: 5086
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5086&view=rev

Log:
Fri May 16 23:39:26 2008  Sïren Sandmann  <sandmann redhat com>

	* gnome-bg.c (gnome_bg_set_uri): Set the URI mtime here to prevent
	loops where someone setting the same URI in the changed callback
	causes the changed callback to be emitted.

	* gnome-bg.c (blend): Coding style fix.



Modified:
   trunk/libgnome-desktop/ChangeLog
   trunk/libgnome-desktop/gnome-bg.c

Modified: trunk/libgnome-desktop/gnome-bg.c
==============================================================================
--- trunk/libgnome-desktop/gnome-bg.c	(original)
+++ trunk/libgnome-desktop/gnome-bg.c	Sat May 17 03:46:10 2008
@@ -411,6 +411,7 @@
 		g_free (bg->uri);
 		
 		bg->uri = tmp;
+		bg->uri_mtime = get_mtime (bg->uri);
 		
 		clear_cache (bg);
 		
@@ -507,7 +508,7 @@
 	
 	scaled = get_scaled_pixbuf (
 		placement, pixbuf, dest_width, dest_height, &x, &y, &w, &h);
-	
+
 	switch (placement) {
 	case GNOME_BG_PLACEMENT_TILED:
 		pixbuf_tile (scaled, dest);
@@ -1032,14 +1033,16 @@
 	GdkPixbuf *tmp;
 
 	if (gdk_pixbuf_get_width (p2) != gdk_pixbuf_get_width (p1) ||
-            gdk_pixbuf_get_height (p2) != gdk_pixbuf_get_height (p1))
-          tmp = gdk_pixbuf_scale_simple (p2, 
-                                         gdk_pixbuf_get_width (p1),
-                                         gdk_pixbuf_get_height (p1),
-                                         GDK_INTERP_BILINEAR);
-        else
-          tmp = g_object_ref (p2);
-
+            gdk_pixbuf_get_height (p2) != gdk_pixbuf_get_height (p1)) {
+		tmp = gdk_pixbuf_scale_simple (p2, 
+					       gdk_pixbuf_get_width (p1),
+					       gdk_pixbuf_get_height (p1),
+					       GDK_INTERP_BILINEAR);
+	}
+        else {
+		tmp = g_object_ref (p2);
+	}
+	
 	pixbuf_blend (tmp, result, 0, 0, -1, -1, 0, 0, alpha);
         
         g_object_unref (tmp);	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]