ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #02699
[Branch ~indicator-applet-developers/indicator-me/trunk] Rev 116: Ported about_me_prop_change_cb and entry_prop_change_cb to dbusmenu-glib-0.4
------------------------------------------------------------
revno: 116
committer: Ken VanDine <ken.vandine@xxxxxxxxxxxxx>
branch nick: indicator-me-dbusmenu
timestamp: Mon 2011-01-10 15:16:11 -0600
message:
Ported about_me_prop_change_cb and entry_prop_change_cb to dbusmenu-glib-0.4
modified:
configure.ac
src/indicator-me.c
--
lp:indicator-me
https://code.launchpad.net/~indicator-applet-developers/indicator-me/trunk
Your team ayatana-commits is subscribed to branch lp:indicator-me.
To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/indicator-me/trunk/+edit-subscription
=== modified file 'configure.ac'
--- configure.ac 2011-01-10 20:54:13 +0000
+++ configure.ac 2011-01-10 21:16:11 +0000
@@ -38,7 +38,8 @@
PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
indicator >= $INDICATOR_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
- dbus-glib-1)
+ dbus-glib-1
+ dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION)
PKG_CHECK_MODULES(MESERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
gconf-2.0 >= $GCONF_REQUIRED_VERSION
indicator >= $INDICATOR_REQUIRED_VERSION
=== modified file 'src/indicator-me.c'
--- src/indicator-me.c 2011-01-10 20:54:13 +0000
+++ src/indicator-me.c 2011-01-10 21:16:11 +0000
@@ -91,7 +91,7 @@
DbusmenuMenuitem * parent,
DbusmenuClient * client);
static void entry_activate_cb (GtkEntry *entry, DbusmenuMenuitem *mi);
-static void entry_prop_change_cb (DbusmenuMenuitem *mi, gchar *prop, GValue *value, GtkEntry *entry);
+static void entry_prop_change_cb (DbusmenuMenuitem *mi, gchar *prop, GVariant *value, GtkEntry *entry);
static gboolean entry_hint_is_shown (GtkWidget *widget);
G_DEFINE_TYPE (IndicatorMe, indicator_me, INDICATOR_OBJECT_TYPE);
@@ -403,17 +403,17 @@
}
static void
-entry_prop_change_cb (DbusmenuMenuitem *mi, gchar *prop, GValue *value, GtkEntry *entry)
+entry_prop_change_cb (DbusmenuMenuitem *mi, gchar *prop, GVariant *value, GtkEntry *entry)
{
g_return_if_fail (GTK_IS_ENTRY (entry));
if (g_strcmp0 (prop, DBUSMENU_ENTRY_MENUITEM_PROP_TEXT) == 0) {
- gtk_entry_set_text (entry, g_value_get_string (value));
+ gtk_entry_set_text (entry, g_variant_get_string (value, NULL));
if (gtk_entry_get_text_length (entry) == 0)
entry_maybe_show_hint (entry);
}
if (g_strcmp0 (prop, DBUSMENU_ENTRY_MENUITEM_PROP_HINT) == 0) {
- entry_set_hint (entry, g_value_get_string (value));
+ entry_set_hint (entry, g_variant_get_string (value, NULL));
if (entry_hint_is_shown (GTK_WIDGET (entry)))
entry_maybe_show_hint (entry); /* visual update */
}
@@ -502,13 +502,13 @@
/* Whenever we have a property change on a DbusmenuMenuitem
we need to be responsive to that. */
static void
-about_me_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GValue * value, AboutMeMenuItem *item)
+about_me_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * value, AboutMeMenuItem *item)
{
g_return_if_fail (ABOUT_IS_ME_MENU_ITEM (item));
if (!g_strcmp0(prop, DBUSMENU_ABOUT_ME_MENUITEM_PROP_ICON)) {
/* reload the avatar icon */
- about_me_menu_item_load_avatar (item, g_value_get_string(value));
+ about_me_menu_item_load_avatar (item, g_variant_get_string(value, NULL));
} else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_VISIBLE)) {
/* normal, ignore */
} else {