[Galago-commits] r2879 - in trunk/notification-daemon: . src

galago-commits at freedesktop.org galago-commits at freedesktop.org
Thu Jul 13 00:51:13 PDT 2006


Author: chipx86
Date: 2006-07-13 00:51:10 -0700 (Thu, 13 Jul 2006)
New Revision: 2879

Modified:
   trunk/notification-daemon/AUTHORS
   trunk/notification-daemon/ChangeLog
   trunk/notification-daemon/NEWS
   trunk/notification-daemon/src/daemon.c
Log:
Patch by felix-at-hsgheli.de that fixes a crash when gtk_icon_info_get_base_size() returns 0, which happens on some icon themes. This closes ticket #61.


Modified: trunk/notification-daemon/AUTHORS
===================================================================
--- trunk/notification-daemon/AUTHORS	2006-07-13 07:45:34 UTC (rev 2878)
+++ trunk/notification-daemon/AUTHORS	2006-07-13 07:51:10 UTC (rev 2879)
@@ -4,6 +4,7 @@
 
 Contributors:
 	Rodney Dawes <dobey at novell.com>
+	felix at hsgheli.de
 
 Translators:
 	Dutch - Wouter Bolsterlee <uws+gnome at xs4all.nl>

Modified: trunk/notification-daemon/ChangeLog
===================================================================
--- trunk/notification-daemon/ChangeLog	2006-07-13 07:45:34 UTC (rev 2878)
+++ trunk/notification-daemon/ChangeLog	2006-07-13 07:51:10 UTC (rev 2879)
@@ -1,3 +1,12 @@
+Thu Jul 13 00:50:05 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* src/daemon.c:
+	* AUTHORS:
+	* NEWS:
+	  - Patch by felix-at-hsgheli.de that fixes a crash when
+	    gtk_icon_info_get_base_size() returns 0, which happens on some icon
+	    themes. This closes ticket #61.
+
 Wed Jul 12 03:27:39 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* src/daemon.c:

Modified: trunk/notification-daemon/NEWS
===================================================================
--- trunk/notification-daemon/NEWS	2006-07-13 07:45:34 UTC (rev 2878)
+++ trunk/notification-daemon/NEWS	2006-07-13 07:51:10 UTC (rev 2879)
@@ -2,6 +2,8 @@
 	* A notification's timeout will now pause while the mouse is hovering over
 	  the notification. This allows users to respond to notifications without
 	  it suddenly disappearing before the user clicks. (Ticket #73)
+	* Fixed a crash under some icon themes where the base size of an icon
+	  was being returned as 0. (Bug #61)
 	* Added a Dutch translation from Wouter Bolsterlee. (Bug #55)
 
 version 0.3.5 (26-April-2006):

Modified: trunk/notification-daemon/src/daemon.c
===================================================================
--- trunk/notification-daemon/src/daemon.c	2006-07-13 07:45:34 UTC (rev 2878)
+++ trunk/notification-daemon/src/daemon.c	2006-07-13 07:51:10 UTC (rev 2879)
@@ -1001,11 +1001,16 @@
 
 			if (icon_info != NULL)
 			{
-				pixbuf = gtk_icon_theme_load_icon(
-					theme, icon,
-					MIN(IMAGE_SIZE, gtk_icon_info_get_base_size(icon_info)),
-					GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
+				gint icon_size = MIN(IMAGE_SIZE,
+									 gtk_icon_info_get_base_size(icon_info));
 
+				if (icon_size == 0)
+					icon_size = IMAGE_SIZE;
+
+				pixbuf = gtk_icon_theme_load_icon(theme, icon, icon_size,
+												  GTK_ICON_LOOKUP_USE_BUILTIN,
+												  NULL);
+
 				gtk_icon_info_free(icon_info);
 			}
 



More information about the galago-commits mailing list