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

galago-commits at freedesktop.org galago-commits at freedesktop.org
Sun Jan 22 23:55:31 PST 2006


Author: chipx86
Date: 2006-01-22 23:55:30 -0800 (Sun, 22 Jan 2006)
New Revision: 2472

Modified:
   trunk/notification-daemon/ChangeLog
   trunk/notification-daemon/src/daemon.c
Log:
Add back working support for default actions. These were being displayed as standard actions. Now they're once again emitted when the notification is clicked.


Modified: trunk/notification-daemon/ChangeLog
===================================================================
--- trunk/notification-daemon/ChangeLog	2006-01-23 07:51:43 UTC (rev 2471)
+++ trunk/notification-daemon/ChangeLog	2006-01-23 07:55:30 UTC (rev 2472)
@@ -1,3 +1,10 @@
+Sun Jan 22 23:54:53 PST 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* src/daemon.c:
+	  - Add back working support for default actions. These were being
+	    displayed as standard actions. Now they're once again emitted when
+	    the notification is clicked.
+
 Sun Jan 22 23:51:17 PST 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* data/Makefile.am:

Modified: trunk/notification-daemon/src/daemon.c
===================================================================
--- trunk/notification-daemon/src/daemon.c	2006-01-23 07:51:43 UTC (rev 2471)
+++ trunk/notification-daemon/src/daemon.c	2006-01-23 07:55:30 UTC (rev 2472)
@@ -82,6 +82,7 @@
 
 static void notify_daemon_finalize(GObject *object);
 static void _emit_closed_signal(GObject *notify_widget);
+static void _action_invoked_cb(GtkWindow *nw, const char *key);
 
 G_DEFINE_TYPE(NotifyDaemon, notify_daemon, G_TYPE_OBJECT);
 
@@ -517,7 +518,8 @@
 		return;
 	}
 
-	printf("Window clicked\n");
+	_action_invoked_cb(nw, "default");
+
 	_close_notification(daemon,
 		GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(nw), "_notify_id")));
 }
@@ -770,8 +772,11 @@
 			break;
 		}
 
-		theme_add_notification_action(nw, l, actions[i],
-									  G_CALLBACK(_action_invoked_cb));
+		if (strcasecmp(actions[i], "default"))
+		{
+			theme_add_notification_action(nw, l, actions[i],
+										  G_CALLBACK(_action_invoked_cb));
+		}
 	}
 
 	if (use_pos_data)



More information about the galago-commits mailing list