grim/guifications2

merge of '4a62265b9cf803ce9031d0c369ca16a35a2ba5e2'
org.guifications.gf2
2009-04-05, Gary Kramlich
06a23c9632d5
merge of '4a62265b9cf803ce9031d0c369ca16a35a2ba5e2'
and '4efa66b5f2ee9d5ace3cfbf8d3854650493bd51f'
--- a/ChangeLog Fri Jul 04 15:53:42 2008 -0400
+++ b/ChangeLog Sun Apr 05 02:34:45 2009 -0400
@@ -4,6 +4,7 @@
grimmy.
* Memory leak fixes
* Added a new notification "new-emails" for handling multiple new emails.
+ * Gave priority to use_gtk over a background image in themes.
Version 2.16 12/16/07:
* Really fixed the G_GNUC_NULL_TERMINATED errors on non-Windows platforms.
--- a/src/gf_notification.c Fri Jul 04 15:53:42 2008 -0400
+++ b/src/gf_notification.c Sun Apr 05 02:34:45 2009 -0400
@@ -95,17 +95,22 @@
if(data)
notification->use_gtk = atoi(data);
- data = xmlnode_get_attrib(node, "background");
- if(data)
- notification->background = g_strdup(data);
+ /* if we're supposed to use the gtktheme, look for the width and height
+ * attributes. If not, look for the background attribute.
+ */
+ if(notification->use_gtk) {
+ data = xmlnode_get_attrib(node, "width");
+ if(data)
+ notification->width = atoi(data);
- data = xmlnode_get_attrib(node, "width");
- if(data)
- notification->width = atoi(data);
-
- data = xmlnode_get_attrib(node, "height");
- if(data)
- notification->height = atoi(data);
+ data = xmlnode_get_attrib(node, "height");
+ if(data)
+ notification->height = atoi(data);
+ } else {
+ data = xmlnode_get_attrib(node, "background");
+ if(data)
+ notification->background = g_strdup(data);
+ }
data = xmlnode_get_attrib(node, "alias");
if(data)