aboutsummaryrefslogtreecommitdiff
path: root/src/im-menu-item.c
diff options
context:
space:
mode:
authorEvgeni Golov <evgeni@debian.org>2011-03-31 14:09:07 +0200
committerEvgeni Golov <evgeni@debian.org>2011-03-31 14:09:07 +0200
commit38a90ca64a3d976218be46f7f5241805854d9ef1 (patch)
tree2b24bdb39e61fce6999511da451261daff1db7e2 /src/im-menu-item.c
parent36559fd986e3226f8c926c69f9c253d4da46cb19 (diff)
parentcb170c0fb193360740cc543816e6f00d46a480c7 (diff)
downloadayatana-indicator-messages-38a90ca64a3d976218be46f7f5241805854d9ef1.tar.gz
ayatana-indicator-messages-38a90ca64a3d976218be46f7f5241805854d9ef1.tar.bz2
ayatana-indicator-messages-38a90ca64a3d976218be46f7f5241805854d9ef1.zip
Merge Ubuntu up to 0.3.92-0ubuntu3
* Merge new upstream from Ubuntu. * debian/patches/lp_690668.patch - Memory leak fixes (LP: #690668) * debian/control - Bump standards version to 3.9.1 * debian/source/format - Use source format 3.0 (quilt) * src/launcher-menu-item.c - Make sure menu entries are displayed for launchers that aren't running (LP: #723873) * New upstream release. * Adding in accessible description support * debian/control: libindicator version 0.3.19 * New upstream release. * Fixing the service file * Adding a log domain * Fixing type handler for dbusmenu 0.3.94 * debian/control: dbusmenu to 0.3.94 [ Ted Gould ] * New upstream release. * GDBus Port * New libindicate and dbusmenu [ Ken VanDine ] * debian/control - Build depends on libindicate-dev to 0.4.91 - Build depends on dbusmenu to 0.3.91 - Set Vcs to ~ubuntu-desktop * data/indicator-messages.service.in - Fixed dbus interface name * debian/control - Bump build depends for libdbusmenu-* to >= 0.3.90 * debian/control: package description spelling (LP: #658096) * Rebuild for libindicator ABI change (LP: #637692) * debian/control: depends on latest libindicator-dev * New upstream release. * Fixing triangles by passing data to callback (LP: #623453) * New upstream release. * Shifting icons into the gutter and adjusting the arrow padding. * New upstream release. * Remove parens from counts * New upstream release. - running apps triangle indicator overlay - message counters are now rendered with a nice rounded background
Diffstat (limited to 'src/im-menu-item.c')
-rw-r--r--src/im-menu-item.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/im-menu-item.c b/src/im-menu-item.c
index 5841d81..25fea52 100644
--- a/src/im-menu-item.c
+++ b/src/im-menu-item.c
@@ -348,7 +348,7 @@ count_cb (IndicateListener * listener, IndicateListenerServer * server, Indicate
g_free(priv->count);
}
- priv->count = g_strdup_printf("(%s)", propertydata);
+ priv->count = g_strdup_printf("%s", propertydata);
dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), INDICATOR_MENUITEM_PROP_RIGHT, priv->count);
return;
@@ -358,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, const GValue * propertydata, gpointer data)
+attention_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GVariant * propertydata, gpointer data)
{
g_debug("Got Attention Information");
ImMenuItem * self = IM_MENU_ITEM(data);
@@ -373,10 +373,10 @@ attention_cb (IndicateListener * listener, IndicateListenerServer * server, Indi
ImMenuItemPrivate * priv = IM_MENU_ITEM_GET_PRIVATE(self);
gboolean wantit;
- if (G_VALUE_HOLDS_BOOLEAN(propertydata)) {
- wantit = g_value_get_boolean(propertydata);
- } else if (G_VALUE_HOLDS_STRING(propertydata)) {
- const gchar * propstring = g_value_get_string(propertydata);
+ if (g_variant_is_of_type(propertydata, G_VARIANT_TYPE_BOOLEAN)) {
+ wantit = g_variant_get_boolean(propertydata);
+ } else if (g_variant_is_of_type(propertydata, G_VARIANT_TYPE_STRING)) {
+ const gchar * propstring = g_variant_get_string(propertydata, NULL);
if (propstring == NULL || propstring[0] == '\0' || !g_strcmp0(propstring, "false")) {
wantit = FALSE;
@@ -427,7 +427,7 @@ indicator_modified_cb (IndicateListener * listener, IndicateListenerServer * ser
} 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_value(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION, attention_cb, self);
+ indicate_listener_get_property_variant(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.");
@@ -460,7 +460,7 @@ im_menu_item_new (IndicateListener * listener, IndicateListenerServer * server,
indicate_listener_get_property_time(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_TIME, time_cb, self);
indicate_listener_get_property(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_ICON, icon_cb, self);
indicate_listener_get_property(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_COUNT, count_cb, self);
- indicate_listener_get_property_value(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION, attention_cb, self);
+ indicate_listener_get_property_variant(listener, server, indicator, INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION, attention_cb, self);
indicate_listener_get_property(listener, server, indicator, "sender", sender_cb, self);
g_signal_connect(G_OBJECT(self), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), NULL);