[Galago-commits] r2460 - in trunk/notification-daemon: . src themes/bubble themes/standard

galago-commits at freedesktop.org galago-commits at freedesktop.org
Sun Jan 22 13:29:29 PST 2006


Author: chipx86
Date: 2006-01-22 13:29:22 -0800 (Sun, 22 Jan 2006)
New Revision: 2460

Modified:
   trunk/notification-daemon/ChangeLog
   trunk/notification-daemon/autogen.sh
   trunk/notification-daemon/src/daemon.c
   trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.c
   trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.h
   trunk/notification-daemon/themes/standard/theme.c
Log:
- Patch by Rodney Dawes to fix a problem with keeping a pointer to the hints table in the themes. We no longer store the whole table, but rather only the parts of it we care about. This fixes a crash.
- This patch also updates the required automake version to 1.9, to be compatible with the new intltool and to use a more recent gnome-common.


Modified: trunk/notification-daemon/ChangeLog
===================================================================
--- trunk/notification-daemon/ChangeLog	2006-01-22 21:24:04 UTC (rev 2459)
+++ trunk/notification-daemon/ChangeLog	2006-01-22 21:29:22 UTC (rev 2460)
@@ -1,3 +1,17 @@
+Sun Jan 22 13:27:29 PST 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* src/daemon.c:
+	* themes/bubble/eggnotificationbubblewidget.c:
+	* themes/bubble/eggnotificationbubblewidget.h:
+	* themes/standard/theme.c:
+	* autogen.sh:
+	  - Patch by Rodney Dawes to fix a problem with keeping a pointer to
+	    the hints table in the themes. We no longer store the whole table,
+	    but rather only the parts of it we care about. This fixes a crash.
+	  - This patch also updates the required automake version to 1.9, to
+	    be compatible with the new intltool and to use a more recent
+	    gnome-common.
+
 Sun Jan 22 13:23:51 PST 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* src/daemon.c:

Modified: trunk/notification-daemon/autogen.sh
===================================================================
--- trunk/notification-daemon/autogen.sh	2006-01-22 21:24:04 UTC (rev 2459)
+++ trunk/notification-daemon/autogen.sh	2006-01-22 21:29:22 UTC (rev 2460)
@@ -5,6 +5,7 @@
 test -z "$srcdir" && srcdir=.
 
 PKG_NAME="Notification Daemon"
+REQUIRED_AUTOMAKE_VERSION=1.9
 
 (test -f $srcdir/configure.ac \
   && test -d $srcdir/src) || {

Modified: trunk/notification-daemon/src/daemon.c
===================================================================
--- trunk/notification-daemon/src/daemon.c	2006-01-22 21:24:04 UTC (rev 2459)
+++ trunk/notification-daemon/src/daemon.c	2006-01-22 21:29:22 UTC (rev 2460)
@@ -725,6 +725,7 @@
 	}
 
 	theme_set_notification_text(nw, summary, body);
+	theme_set_notification_hints(nw, hints);
 
 	/*
 	 *XXX This needs to handle file URIs and all that.

Modified: trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.c
===================================================================
--- trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.c	2006-01-22 21:24:04 UTC (rev 2459)
+++ trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.c	2006-01-22 21:29:22 UTC (rev 2460)
@@ -1205,6 +1205,9 @@
 egg_notification_bubble_widget_set_hints (EggNotificationBubbleWidget *bubble_widget,
 					  GHashTable *hints)
 {
-	bubble_widget->hints = hints;
+  GValue *data;
+
+  data = g_hash_table_lookup (hints, "urgency");
+  if (data)
+    bubble_widget->urgency = g_value_get_uchar (data);
 }
-

Modified: trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.h
===================================================================
--- trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.h	2006-01-22 21:24:04 UTC (rev 2459)
+++ trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.h	2006-01-22 21:29:22 UTC (rev 2460)
@@ -76,7 +76,8 @@
   GdkColor bg_end_gradient;
   GdkColor border_color;
 
-	GHashTable *hints;
+  /* The Urgency level of the notification */
+  guchar urgency;
 
   /* drawing instructions */
   struct _DrawingPipeline dp;

Modified: trunk/notification-daemon/themes/standard/theme.c
===================================================================
--- trunk/notification-daemon/themes/standard/theme.c	2006-01-22 21:24:04 UTC (rev 2459)
+++ trunk/notification-daemon/themes/standard/theme.c	2006-01-22 21:29:22 UTC (rev 2460)
@@ -23,8 +23,9 @@
 	GdkGC *gc;
 	GdkPoint arrow_points[7];
 	GdkRegion *window_region;
-	GHashTable *hints;
 
+	guchar urgency;
+
 	UrlClickedCb url_clicked;
 
 } WindowData;
@@ -194,9 +195,14 @@
 set_notification_hints(GtkWindow *nw, GHashTable *hints)
 {
 	WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
+	GValue *value;
+
 	g_assert(windata != NULL);
 
-	windata->hints = hints;
+	value = (GValue *)g_hash_table_lookup(hints, "urgency");
+
+	if (value)
+		windata->urgency = g_value_get_uchar(value);
 }
 
 void



More information about the galago-commits mailing list