diff options
author | Ted Gould <ted@canonical.com> | 2009-09-04 15:55:28 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-04 15:55:28 -0500 |
commit | afd7c0690b215e6c73661183d358d3c1b728b413 (patch) | |
tree | 9529a40098781cc4bd323e72c3865c3fab15b939 /src | |
parent | 47eff60cee5bf9877f9fe4472f34f84007dbe644 (diff) | |
download | ayatana-indicator-messages-afd7c0690b215e6c73661183d358d3c1b728b413.tar.gz ayatana-indicator-messages-afd7c0690b215e6c73661183d358d3c1b728b413.tar.bz2 ayatana-indicator-messages-afd7c0690b215e6c73661183d358d3c1b728b413.zip |
Changing the properties to be the indicate v2 ones. Mostly this involves adding extra properties at this point.
Diffstat (limited to 'src')
-rw-r--r-- | src/im-menu-item.c | 33 |
1 files changed, 28 insertions, 5 deletions
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 <http://www.gnu.org/licenses/>. #include <glib/gi18n.h> #include <libdbusmenu-glib/client.h> #include <libindicate/indicator.h> +#include <libindicate/indicator-messages.h> #include <libindicate/listener.h> #include "im-menu-item.h" #include "dbus-data.h" @@ -260,6 +261,20 @@ sender_cb (IndicateListener * listener, IndicateListenerServer * server, Indicat } 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) { ImMenuItemPrivate * priv = IM_MENU_ITEM_GET_PRIVATE(self); @@ -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; |