r3244 - in trunk/src/target/OM-2007.2/applications/openmoko-today2: . src

chris at sita.openmoko.org chris at sita.openmoko.org
Mon Oct 22 19:24:08 CEST 2007


Author: chris
Date: 2007-10-22 19:24:07 +0200 (Mon, 22 Oct 2007)
New Revision: 3244

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
Log:
        * src/today-main.c: (bg_size_allocate_cb):
        Check the size against the last allocated size, or we can get into
        semi-infinite loops


Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog	2007-10-22 17:03:26 UTC (rev 3243)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog	2007-10-22 17:24:07 UTC (rev 3244)
@@ -1,5 +1,11 @@
 2007-10-22  Chris Lord  <chris at openedhand.com>
 
+	* src/today-main.c: (bg_size_allocate_cb):
+	Check the size against the last allocated size, or we can get into
+	semi-infinite loops
+
+2007-10-22  Chris Lord  <chris at openedhand.com>
+
 	* src/today-main.c: (today_create_home_page):
 	No need to connect_after on event box signals
 

Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c	2007-10-22 17:03:26 UTC (rev 3243)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c	2007-10-22 17:24:07 UTC (rev 3244)
@@ -75,9 +75,15 @@
 bg_size_allocate_cb (GtkWidget *widget, GtkAllocation *allocation,
 		     TodayData *data)
 {
+	static gint width = 0, height = 0;
+	
 	/* Re-scale wallpaper */
-	gconf_client_notify (gconf_client_get_default (),
-		GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_WALLPAPER);
+	if ((width != allocation->width) || (height != allocation->height)) {
+		width = allocation->width;
+		height = allocation->height;
+		gconf_client_notify (gconf_client_get_default (),
+			GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_WALLPAPER);
+	}
 }
 
 static GtkWidget *





More information about the commitlog mailing list