← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~ted/libindicate/activate-time-stamp into lp:libindicate

 

Ted Gould has proposed merging lp:~ted/libindicate/activate-time-stamp into lp:libindicate with lp:~ted/libindicate/ayatanize as a prerequisite.

    Requested reviews:
    Indicator Applet Developers (indicator-applet-developers)


Adds timestamps to the activate signal.
-- 
https://code.launchpad.net/~ted/libindicate/activate-time-stamp/+merge/18574
Your team ayatana-commits is subscribed to branch lp:libindicate.
=== modified file 'libindicate/indicate-interface.xml'
--- libindicate/indicate-interface.xml	2010-02-03 22:59:10 +0000
+++ libindicate/indicate-interface.xml	2010-02-03 22:59:10 +0000
@@ -59,6 +59,7 @@
 		</method>
 		<method name="ShowIndicatorToUser">
 			<arg type="u" name="id" direction="in" />
+			<arg type="u" name="timestamp" direction="in" />
 		</method>
 		<method name="IndicatorDisplayed">
 			<annotation name="org.freedesktop.DBus.GLib.Async" value="true" />

=== modified file 'libindicate/indicator.c'
--- libindicate/indicator.c	2010-02-01 02:47:36 +0000
+++ libindicate/indicator.c	2010-02-03 22:59:10 +0000
@@ -91,8 +91,8 @@
 	                                     G_SIGNAL_RUN_LAST,
 	                                     G_STRUCT_OFFSET(IndicateIndicatorClass, user_display),
 	                                     NULL, NULL,
-	                                     g_cclosure_marshal_VOID__VOID,
-	                                     G_TYPE_NONE, 0);
+	                                     g_cclosure_marshal_VOID__UINT,
+	                                     G_TYPE_NONE, 1, G_TYPE_UINT);
 	/**
 		IndicateIndicator::hide:
 		@arg0: The #IndicateIndicator object
@@ -384,14 +384,14 @@
 	@indicator is not visible.
 */
 void
-indicate_indicator_user_display (IndicateIndicator * indicator)
+indicate_indicator_user_display (IndicateIndicator * indicator, guint timestamp)
 {
 	IndicateIndicatorPrivate * priv = INDICATE_INDICATOR_GET_PRIVATE(indicator);
 	if (!priv->is_visible) {
 		return;
 	}
 
-	g_signal_emit(indicator, signals[USER_DISPLAY], 0, TRUE);
+	g_signal_emit(indicator, signals[USER_DISPLAY], 0, timestamp, TRUE);
 	return;
 }
 

=== modified file 'libindicate/indicator.h'
--- libindicate/indicator.h	2010-02-01 02:47:36 +0000
+++ libindicate/indicator.h	2010-02-03 22:59:10 +0000
@@ -108,7 +108,7 @@
 	/* Signals */
 	void (*hide) (IndicateIndicator * indicator, gpointer data);
 	void (*show) (IndicateIndicator * indicator, gpointer data);
-	void (*user_display) (IndicateIndicator * indicator, gpointer data);
+	void (*user_display) (IndicateIndicator * indicator, guint timestamp, gpointer data);
 	void (*modified) (IndicateIndicator * indicator, gchar * property, gpointer data);
 	void (*displayed) (IndicateIndicator * indicator, gboolean displayed);
 
@@ -143,7 +143,7 @@
 guint indicate_indicator_get_id (IndicateIndicator * indicator);
 IndicateServer * indicate_indicator_get_server (IndicateIndicator * indicator);
 
-void indicate_indicator_user_display (IndicateIndicator * indicator);
+void indicate_indicator_user_display (IndicateIndicator * indicator, guint timestamp);
 
 /* Properties handling */
 void indicate_indicator_set_property (IndicateIndicator * indicator, const gchar * key, const gchar * data);

=== modified file 'libindicate/listener.c'
--- libindicate/listener.c	2010-02-03 22:59:10 +0000
+++ libindicate/listener.c	2010-02-03 22:59:10 +0000
@@ -902,9 +902,9 @@
 }
 
 void
-indicate_listener_display (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator)
+indicate_listener_display (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, guint timestamp)
 {
-	org_ayatana_indicate_show_indicator_to_user_async (server->proxy, INDICATE_LISTENER_INDICATOR_ID(indicator), listener_display_cb, NULL);
+	org_ayatana_indicate_show_indicator_to_user_async (server->proxy, INDICATE_LISTENER_INDICATOR_ID(indicator), timestamp, listener_display_cb, NULL);
 
 	return;
 }

=== modified file 'libindicate/listener.h'
--- libindicate/listener.h	2010-02-03 22:59:10 +0000
+++ libindicate/listener.h	2010-02-03 22:59:10 +0000
@@ -147,7 +147,8 @@
                                                             gpointer data);
 void                  indicate_listener_display            (IndicateListener * listener,
                                                             IndicateListenerServer * server,
-                                                            IndicateListenerIndicator * indicator);
+                                                            IndicateListenerIndicator * indicator,
+                                                            guint timestamp);
 void                  indicate_listener_displayed          (IndicateListener * listener,
                                                             IndicateListenerServer * server,
                                                             IndicateListenerIndicator * indicator,

=== modified file 'libindicate/server.c'
--- libindicate/server.c	2010-02-03 22:59:10 +0000
+++ libindicate/server.c	2010-02-03 22:59:10 +0000
@@ -139,7 +139,7 @@
 static gboolean get_indicator_property (IndicateServer * server, guint id, gchar * property, gchar ** value, GError **error);
 static gboolean get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, gchar *** value, GError **error);
 static gboolean get_indicator_properties (IndicateServer * server, guint id, gchar *** properties, GError **error);
-static gboolean show_indicator_to_user (IndicateServer * server, guint id, GError ** error);
+static gboolean show_indicator_to_user (IndicateServer * server, guint id, guint timestamp, GError ** error);
 static gboolean indicator_displayed (IndicateServer * server, gchar * sender, guint id, gboolean displayed, GError ** error);
 static void dbus_owner_change (DBusGProxy * proxy, const gchar * name, const gchar * prev, const gchar * new, IndicateServer * server);
 static void indicator_display_check_recalc (gpointer key, gpointer value, gpointer userdata);
@@ -165,7 +165,7 @@
 gboolean _indicate_server_get_indicator_property (IndicateServer * server, guint id, gchar * property, gchar ** value, GError **error);
 gboolean _indicate_server_get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, gchar *** value, GError **error);
 gboolean _indicate_server_get_indicator_properties (IndicateServer * server, guint id, gchar *** properties, GError **error);
-gboolean _indicate_server_show_indicator_to_user (IndicateServer * server, guint id, GError ** error);
+gboolean _indicate_server_show_indicator_to_user (IndicateServer * server, guint id, guint timestamp, GError ** error);
 gboolean _indicate_server_indicator_displayed (IndicateServer * server, guint id, gboolean displayed, DBusGMethodInvocation * method);
 gboolean _indicate_server_show_interest (IndicateServer * server, gchar * interest, DBusGMethodInvocation * method);
 gboolean _indicate_server_remove_interest (IndicateServer * server, gchar * interest, DBusGMethodInvocation * method);
@@ -1304,7 +1304,7 @@
 }
 
 static gboolean
-show_indicator_to_user (IndicateServer * server, guint id, GError ** error)
+show_indicator_to_user (IndicateServer * server, guint id, guint timestamp, GError ** error)
 {
 	if (id == INDICATE_SERVER_INDICATOR_NULL) {
 		g_signal_emit(server, signals[SERVER_DISPLAY], 0, TRUE);
@@ -1316,7 +1316,7 @@
 		return FALSE;
 	}
 
-	indicate_indicator_user_display(indicator);
+	indicate_indicator_user_display(indicator, timestamp);
 	return TRUE;
 }
 
@@ -1467,12 +1467,12 @@
 }
 
 gboolean 
-_indicate_server_show_indicator_to_user (IndicateServer * server, guint id, GError ** error)
+_indicate_server_show_indicator_to_user (IndicateServer * server, guint id, guint timestamp, GError ** error)
 {
 	IndicateServerClass * class = INDICATE_SERVER_GET_CLASS(server);
 
 	if (class != NULL && class->show_indicator_to_user != NULL) {
-		return class->show_indicator_to_user (server, id, error);
+		return class->show_indicator_to_user (server, id, timestamp, error);
 	}
 
 	if (error) {

=== modified file 'libindicate/server.h'
--- libindicate/server.h	2010-02-01 02:18:29 +0000
+++ libindicate/server.h	2010-02-03 22:59:10 +0000
@@ -155,7 +155,7 @@
 	gboolean (*get_indicator_property) (IndicateServer * server, guint id, gchar * property, gchar ** value, GError **error);
 	gboolean (*get_indicator_property_group) (IndicateServer * server, guint id, GPtrArray * properties, gchar *** value, GError **error);
 	gboolean (*get_indicator_properties) (IndicateServer * server, guint id, gchar *** properties, GError **error);
-	gboolean (*show_indicator_to_user) (IndicateServer * server, guint id, GError ** error);
+	gboolean (*show_indicator_to_user) (IndicateServer * server, guint id, guint timestamp, GError ** error);
 	gboolean (*indicator_displayed) (IndicateServer * server, gchar * sender, guint id, gboolean displayed, GError ** error);
 	guint    (*get_next_id) (IndicateServer * server);
 	gboolean (*show_interest) (IndicateServer * server, gchar * sender, IndicateInterests interest);


Follow ups