diff options
author | Ted Gould <ted@canonical.com> | 2009-09-04 22:18:46 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-04 22:18:46 -0500 |
commit | 13108917542ba7a92759f311f02530a24f36dc06 (patch) | |
tree | 8ed5e0e119ef8fb3e6161c71a38f771dae9207ed | |
parent | d03f5dfaafc6d8eccc2f04865d062615df4167cb (diff) | |
download | ayatana-indicator-messages-13108917542ba7a92759f311f02530a24f36dc06.tar.gz ayatana-indicator-messages-13108917542ba7a92759f311f02530a24f36dc06.tar.bz2 ayatana-indicator-messages-13108917542ba7a92759f311f02530a24f36dc06.zip |
We don't need to be tracking the added and removed signals for indicators anymore.
-rw-r--r-- | src/app-menu-item.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/app-menu-item.c b/src/app-menu-item.c index ecb5b5d..5107540 100644 --- a/src/app-menu-item.c +++ b/src/app-menu-item.c @@ -61,8 +61,6 @@ static void app_menu_item_finalize (GObject *object); static void activate_cb (AppMenuItem * self, gpointer data); static void type_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data); static void desktop_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data); -static void indicator_added_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data); -static void indicator_removed_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data); static void update_label (AppMenuItem * self); @@ -121,9 +119,6 @@ app_menu_item_dispose (GObject *object) AppMenuItem * self = APP_MENU_ITEM(object); AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(self); - g_signal_handlers_disconnect_by_func(G_OBJECT(priv->listener), G_CALLBACK(indicator_added_cb), self); - g_signal_handlers_disconnect_by_func(G_OBJECT(priv->listener), G_CALLBACK(indicator_removed_cb), self); - g_object_unref(priv->listener); G_OBJECT_CLASS (app_menu_item_parent_class)->dispose (object); @@ -164,9 +159,6 @@ app_menu_item_new (IndicateListener * listener, IndicateListenerServer * server) priv->server = server; /* Can not ref as not real GObject */ - g_signal_connect(G_OBJECT(listener), INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added_cb), self); - g_signal_connect(G_OBJECT(listener), INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED, G_CALLBACK(indicator_removed_cb), self); - indicate_listener_server_get_type(listener, server, type_cb, self); indicate_listener_server_get_desktop(listener, server, desktop_cb, self); @@ -270,46 +262,6 @@ activate_cb (AppMenuItem * self, gpointer data) return; } -static void -indicator_added_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) -{ - g_return_if_fail(IS_APP_MENU_ITEM(data)); - AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(data); - - if (g_strcmp0(INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_SERVER_DBUS_NAME(priv->server))) { - /* Not us */ - return; - } - - priv->unreadcount++; - - update_label(APP_MENU_ITEM(data)); - g_signal_emit(G_OBJECT(data), signals[COUNT_CHANGED], 0, priv->unreadcount, TRUE); - - return; -} - -static void -indicator_removed_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) -{ - AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(data); - - if (g_strcmp0(INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_SERVER_DBUS_NAME(priv->server))) { - /* Not us */ - return; - } - - /* Should never happen, but let's have some protection on that */ - if (priv->unreadcount > 0) { - priv->unreadcount--; - } - - update_label(APP_MENU_ITEM(data)); - g_signal_emit(G_OBJECT(data), signals[COUNT_CHANGED], 0, priv->unreadcount, TRUE); - - return; -} - guint app_menu_item_get_count (AppMenuItem * appitem) { |