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

galago-commits at freedesktop.org galago-commits at freedesktop.org
Fri Jan 13 11:45:56 PST 2006


Author: chipx86
Date: 2006-01-13 11:45:52 -0800 (Fri, 13 Jan 2006)
New Revision: 2427

Modified:
   trunk/notification-daemon/AUTHORS
   trunk/notification-daemon/ChangeLog
   trunk/notification-daemon/src/engines.c
   trunk/notification-daemon/src/engines.h
   trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.c
   trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.h
   trunk/notification-daemon/themes/bubble/theme.c
   trunk/notification-daemon/themes/standard/theme.c
Log:
Patch by Rodney Dawes to add support for passing hints to the notification engines. This will allow engines to theme based on urgency levels and other such data.


Modified: trunk/notification-daemon/AUTHORS
===================================================================
--- trunk/notification-daemon/AUTHORS	2006-01-12 22:29:16 UTC (rev 2426)
+++ trunk/notification-daemon/AUTHORS	2006-01-13 19:45:52 UTC (rev 2427)
@@ -1 +1,6 @@
-John (J5) Palmieri  <johnp at redhat.com>
+Authors:
+	Christian Hammond <chipx86 at chipx86.com>
+	John (J5) Palmieri  <johnp at redhat.com>
+
+Contributors:
+	Rodney Dawes <dobey at novell.com>

Modified: trunk/notification-daemon/ChangeLog
===================================================================
--- trunk/notification-daemon/ChangeLog	2006-01-12 22:29:16 UTC (rev 2426)
+++ trunk/notification-daemon/ChangeLog	2006-01-13 19:45:52 UTC (rev 2427)
@@ -1,3 +1,15 @@
+Fri Jan 13 11:44:00 PST 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* src/engines.c:
+	* src/engines.h:
+	* themes/bubble/eggnotificationbubblewidget.c:
+	* themes/bubble/eggnotificationbubblewidget.h:
+	* themes/bubble/theme.c:
+	* themes/standard/theme.c:
+	  - Patch by Rodney Dawes to add support for passing hints to the
+	    notification engines. This will allow engines to theme based on
+	    urgency levels and other such data.
+
 Thu Jan 12 11:06:27 PST 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* src/daemon.c:

Modified: trunk/notification-daemon/src/engines.c
===================================================================
--- trunk/notification-daemon/src/engines.c	2006-01-12 22:29:16 UTC (rev 2426)
+++ trunk/notification-daemon/src/engines.c	2006-01-13 19:45:52 UTC (rev 2427)
@@ -9,6 +9,7 @@
 	void (*destroy_notification)(GtkWindow *nw);
 	void (*show_notification)(GtkWindow *nw);
 	void (*hide_notification)(GtkWindow *nw);
+	void (*set_notification_hints)(GtkWindow *nw, GHashTable *hints);
 	void (*set_notification_text)(GtkWindow *nw, const char *summary,
 								  const char *body);
 	void (*set_notification_icon)(GtkWindow *nw, GdkPixbuf *pixbuf);
@@ -54,6 +55,7 @@
 	BIND_REQUIRED_FUNC(destroy_notification);
 	BIND_REQUIRED_FUNC(show_notification);
 	BIND_REQUIRED_FUNC(hide_notification);
+	BIND_REQUIRED_FUNC(set_notification_hints);
 	BIND_REQUIRED_FUNC(set_notification_text);
 	BIND_REQUIRED_FUNC(set_notification_icon);
 	BIND_REQUIRED_FUNC(set_notification_arrow);
@@ -101,6 +103,12 @@
 }
 
 void
+theme_set_notification_hints(GtkWindow *nw, GHashTable *hints)
+{
+	get_theme_engine()->set_notification_hints(nw, hints);
+}
+
+void
 theme_set_notification_text(GtkWindow *nw, const char *summary,
 							const char *body)
 {

Modified: trunk/notification-daemon/src/engines.h
===================================================================
--- trunk/notification-daemon/src/engines.h	2006-01-12 22:29:16 UTC (rev 2426)
+++ trunk/notification-daemon/src/engines.h	2006-01-13 19:45:52 UTC (rev 2427)
@@ -7,6 +7,7 @@
 void theme_destroy_notification(GtkWindow *nw);
 void theme_show_notification(GtkWindow *nw);
 void theme_hide_notification(GtkWindow *nw);
+void theme_set_notification_hints(GtkWindow *nw, GHashTable *hints);
 void theme_set_notification_text(GtkWindow *nw, const char *summary,
 								 const char *body);
 void theme_set_notification_icon(GtkWindow *nw, GdkPixbuf *pixbuf);

Modified: trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.c
===================================================================
--- trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.c	2006-01-12 22:29:16 UTC (rev 2426)
+++ trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.c	2006-01-13 19:45:52 UTC (rev 2427)
@@ -1201,4 +1201,10 @@
   bubble_widget->draw_arrow = value;
 }
 
+void
+egg_notification_bubble_widget_set_hints (EggNotificationBubbleWidget *bubble_widget,
+					  GHashTable *hints)
+{
+	bubble_widget->hints = hints;
+}
 

Modified: trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.h
===================================================================
--- trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.h	2006-01-12 22:29:16 UTC (rev 2426)
+++ trunk/notification-daemon/themes/bubble/eggnotificationbubblewidget.h	2006-01-13 19:45:52 UTC (rev 2427)
@@ -76,6 +76,8 @@
   GdkColor bg_end_gradient;
   GdkColor border_color;
 
+	GHashTable *hints;
+
   /* drawing instructions */
   struct _DrawingPipeline dp;
 };
@@ -124,6 +126,8 @@
 
 void             egg_notification_bubble_widget_set_draw_arrow (EggNotificationBubbleWidget *bubble_widget, gboolean value);
 
+void             egg_notification_bubble_widget_set_hints (EggNotificationBubbleWidget *bubble_widget, GHashTable *hints);
+
 G_END_DECLS
 
 #endif /* __EGG_NOTIFICATION_BUBBLE_WIDGET_H__ */

Modified: trunk/notification-daemon/themes/bubble/theme.c
===================================================================
--- trunk/notification-daemon/themes/bubble/theme.c	2006-01-12 22:29:16 UTC (rev 2426)
+++ trunk/notification-daemon/themes/bubble/theme.c	2006-01-13 19:45:52 UTC (rev 2427)
@@ -26,6 +26,12 @@
 }
 
 void
+set_notification_hints(GtkWindow *nw, GHashTable *hints)
+{
+	egg_notification_bubble_widget_set_hints(EGG_NOTIFICATION_BUBBLE_WIDGET(nw), hints);
+}
+
+void
 set_notification_text(GtkWindow *nw, const char *summary, const char *body)
 {
 	egg_notification_bubble_widget_set(EGG_NOTIFICATION_BUBBLE_WIDGET(nw),

Modified: trunk/notification-daemon/themes/standard/theme.c
===================================================================
--- trunk/notification-daemon/themes/standard/theme.c	2006-01-12 22:29:16 UTC (rev 2426)
+++ trunk/notification-daemon/themes/standard/theme.c	2006-01-13 19:45:52 UTC (rev 2427)
@@ -17,6 +17,7 @@
 	GdkPoint arrow_points[7];
 	GdkRegion *window_region;
 
+	GHashTable *hints;
 } WindowData;
 
 #define WIDTH         300
@@ -178,6 +179,15 @@
 }
 
 void
+set_notification_hints(GtkWindow *nw, GHashTable *hints)
+{
+	WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
+	g_assert(windata != NULL);
+
+	windata->hints = hints;
+}
+
+void
 set_notification_text(GtkWindow *nw, const char *summary, const char *body)
 {
 	char *str;



More information about the galago-commits mailing list