From afd7c0690b215e6c73661183d358d3c1b728b413 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 4 Sep 2009 15:55:28 -0500 Subject: Changing the properties to be the indicate v2 ones. Mostly this involves adding extra properties at this point. --- src/im-menu-item.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/im-menu-item.c b/src/im-menu-item.c index f913fac..af4ebb8 100644 --- a/src/im-menu-item.c +++ b/src/im-menu-item.c @@ -26,6 +26,7 @@ with this program. If not, see . #include #include #include +#include #include #include "im-menu-item.h" #include "dbus-data.h" @@ -259,6 +260,20 @@ sender_cb (IndicateListener * listener, IndicateListenerServer * server, Indicat return; } +static void +count_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data) +{ + g_debug("Got Count Information"); + +} + +static void +attention_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data) +{ + g_debug("Got Attention Information"); + +} + static void activate_cb (ImMenuItem * self, gpointer data) { @@ -276,12 +291,20 @@ indicator_modified_cb (IndicateListener * listener, IndicateListenerServer * ser if (INDICATE_LISTENER_INDICATOR_ID(indicator) != INDICATE_LISTENER_INDICATOR_ID(priv->indicator)) return; if (server != priv->server) return; - if (!g_strcmp0(property, "sender")) { + if (!g_strcmp0(property, INDICATE_INDICATOR_MESSAGES_PROP_NAME)) { + indicate_listener_get_property(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_NAME, sender_cb, self); + } else if (!g_strcmp0(property, INDICATE_INDICATOR_MESSAGES_PROP_TIME)) { + indicate_listener_get_property_time(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_TIME, time_cb, self); + } else if (!g_strcmp0(property, INDICATE_INDICATOR_MESSAGES_PROP_ICON)) { + indicate_listener_get_property(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_ICON, icon_cb, self); + } else if (!g_strcmp0(property, INDICATE_INDICATOR_MESSAGES_PROP_COUNT)) { + indicate_listener_get_property(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_COUNT, count_cb, self); + } else if (!g_strcmp0(property, INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION)) { + indicate_listener_get_property(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION, attention_cb, self); + } else if (!g_strcmp0(property, "sender")) { + /* This is a compatibility string with v1 and should be removed */ + g_debug("Indicator is using 'sender' property which is a v1 string."); indicate_listener_get_property(listener, server, indicator, "sender", sender_cb, self); - } else if (!g_strcmp0(property, "time")) { - indicate_listener_get_property_time(listener, server, indicator, "time", time_cb, self); - } else if (!g_strcmp0(property, "icon")) { - indicate_listener_get_property(listener, server, indicator, "icon", icon_cb, self); } return; -- cgit v1.2.3