aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-04 18:12:10 -0800
committerTed Gould <ted@gould.cx>2010-02-04 18:12:10 -0800
commit0b90b8c1e1f63fb1a59a5bd179d21e609cdd9876 (patch)
tree0d47dbc11f7e371f77a23241ef80ff6f7b6e3c82
parente54f6e662f1d3ade23d66efcfa99439c7233a79f (diff)
downloadayatana-indicator-messages-0b90b8c1e1f63fb1a59a5bd179d21e609cdd9876.tar.gz
ayatana-indicator-messages-0b90b8c1e1f63fb1a59a5bd179d21e609cdd9876.tar.bz2
ayatana-indicator-messages-0b90b8c1e1f63fb1a59a5bd179d21e609cdd9876.zip
Changing callback prototype and activate signals
-rw-r--r--src/app-menu-item.c6
-rw-r--r--src/im-menu-item.c21
2 files changed, 14 insertions, 13 deletions
diff --git a/src/app-menu-item.c b/src/app-menu-item.c
index aa0b60c..9c51475 100644
--- a/src/app-menu-item.c
+++ b/src/app-menu-item.c
@@ -57,7 +57,7 @@ static void app_menu_item_class_init (AppMenuItemClass *klass);
static void app_menu_item_init (AppMenuItem *self);
static void app_menu_item_dispose (GObject *object);
static void app_menu_item_finalize (GObject *object);
-static void activate_cb (AppMenuItem * self, gpointer data);
+static void activate_cb (AppMenuItem * self, guint timestamp, gpointer data);
static void count_changed (IndicateListener * listener, IndicateListenerServer * server, guint count, gpointer data);
static void count_cb (IndicateListener * listener, IndicateListenerServer * server, guint value, gpointer data);
static void desktop_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data);
@@ -259,11 +259,11 @@ desktop_cb (IndicateListener * listener, IndicateListenerServer * server, gchar
}
static void
-activate_cb (AppMenuItem * self, gpointer data)
+activate_cb (AppMenuItem * self, guint timestamp, gpointer data)
{
AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(self);
- indicate_listener_display(priv->listener, priv->server, NULL);
+ indicate_listener_display(priv->listener, priv->server, NULL, timestamp);
return;
}
diff --git a/src/im-menu-item.c b/src/im-menu-item.c
index 035b2da..ea9190a 100644
--- a/src/im-menu-item.c
+++ b/src/im-menu-item.c
@@ -68,21 +68,22 @@ static void sender_cb (IndicateListener * listener,
IndicateListenerServer * server,
IndicateListenerIndicator * indicator,
gchar * property,
- gchar * propertydata,
+ const gchar * propertydata,
gpointer data);
static void time_cb (IndicateListener * listener,
IndicateListenerServer * server,
IndicateListenerIndicator * indicator,
gchar * property,
- GTimeVal * propertydata,
+ const GTimeVal * propertydata,
gpointer data);
static void icon_cb (IndicateListener * listener,
IndicateListenerServer * server,
IndicateListenerIndicator * indicator,
gchar * property,
- gchar * propertydata,
+ const gchar * propertydata,
gpointer data);
static void activate_cb (ImMenuItem * self,
+ guint timestamp,
gpointer data);
static void indicator_modified_cb (IndicateListener * listener,
IndicateListenerServer * server,
@@ -172,7 +173,7 @@ im_menu_item_finalize (GObject *object)
/* Call back for getting icon data. It just passes it along
to the indicator so that it can visualize it. Not our problem. */
static void
-icon_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data)
+icon_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const gchar * propertydata, gpointer data)
{
dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(data), INDICATOR_MENUITEM_PROP_ICON, propertydata);
return;
@@ -258,7 +259,7 @@ time_update_cb (gpointer data)
looking for. It should only be called once at the init with a new
indicator and again when the value changes. */
static void
-time_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GTimeVal * propertydata, gpointer data)
+time_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const GTimeVal * propertydata, gpointer data)
{
g_debug("Got Time info");
ImMenuItem * self = IM_MENU_ITEM(data);
@@ -290,7 +291,7 @@ time_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateL
/* Callback from libindicate that is for getting the sender information
on a particular indicator. */
static void
-sender_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data)
+sender_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const gchar * propertydata, gpointer data)
{
g_debug("Got Sender Information: %s", propertydata);
ImMenuItem * self = IM_MENU_ITEM(data);
@@ -318,7 +319,7 @@ sender_cb (IndicateListener * listener, IndicateListenerServer * server, Indicat
that on the menu item or just remove it if the count is gone. If
that's the case we can update time. */
static void
-count_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data)
+count_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const gchar * propertydata, gpointer data)
{
g_debug("Got Count Information");
ImMenuItem * self = IM_MENU_ITEM(data);
@@ -357,7 +358,7 @@ count_cb (IndicateListener * listener, IndicateListenerServer * server, Indicate
this indicator should be calling for attention or not. If we are,
we need to signal that. */
static void
-attention_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data)
+attention_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const gchar * propertydata, gpointer data)
{
g_debug("Got Attention Information");
ImMenuItem * self = IM_MENU_ITEM(data);
@@ -388,11 +389,11 @@ attention_cb (IndicateListener * listener, IndicateListenerServer * server, Indi
/* Callback when the item gets clicked on from the Messaging Menu */
static void
-activate_cb (ImMenuItem * self, gpointer data)
+activate_cb (ImMenuItem * self, guint timestamp, gpointer data)
{
ImMenuItemPrivate * priv = IM_MENU_ITEM_GET_PRIVATE(self);
- indicate_listener_display(priv->listener, priv->server, priv->indicator);
+ indicate_listener_display(priv->listener, priv->server, priv->indicator, timestamp);
}
/* Callback when a property gets modified. It figures out which one