diff options
-rw-r--r-- | src/app-menu-item.c | 8 | ||||
-rw-r--r-- | src/im-menu-item.c | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/app-menu-item.c b/src/app-menu-item.c index 0b0588e..e846914 100644 --- a/src/app-menu-item.c +++ b/src/app-menu-item.c @@ -70,8 +70,8 @@ static void app_menu_item_finalize (GObject *object); 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 menu_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * menupath, gpointer data); -static void desktop_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data); +static void menu_cb (IndicateListener * listener, IndicateListenerServer * server, const gchar * menupath, gpointer data); +static void desktop_cb (IndicateListener * listener, IndicateListenerServer * server, const gchar * value, gpointer data); static void update_label (AppMenuItem * self); /* GObject Boilerplate */ @@ -300,7 +300,7 @@ count_cb (IndicateListener * listener, IndicateListenerServer * server, guint va app structure and start sucking data out of it. Mostly the name. */ static void -desktop_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data) +desktop_cb (IndicateListener * listener, IndicateListenerServer * server, const gchar * value, gpointer data) { g_return_if_fail(IS_APP_MENU_ITEM(data)); AppMenuItem * self = APP_MENU_ITEM(data); @@ -469,7 +469,7 @@ root_changed (DbusmenuClient * client, DbusmenuMenuitem * newroot, gpointer data /* Gets the path to menuitems if there are some. Now we need to make them special. */ static void -menu_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * menupath, gpointer data) +menu_cb (IndicateListener * listener, IndicateListenerServer * server, const gchar * menupath, gpointer data) { g_debug("Got Menu: %s", menupath); g_return_if_fail(IS_APP_MENU_ITEM(data)); diff --git a/src/im-menu-item.c b/src/im-menu-item.c index b8b3709..25fea52 100644 --- a/src/im-menu-item.c +++ b/src/im-menu-item.c @@ -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); |