← Back to team overview

ayatana-commits team mailing list archive

[Branch ~indicator-applet-developers/indicator-me/trunk] Rev 115: * ported to dbusmenu-glib-0.4 (LP: #701148)

 

------------------------------------------------------------
revno: 115
fixes bug(s): https://launchpad.net/bugs/701148
committer: Ken VanDine <ken.vandine@xxxxxxxxxxxxx>
branch nick: indicator-me
timestamp: Mon 2011-01-10 14:54:13 -0600
message:
  * ported to dbusmenu-glib-0.4 (LP: #701148)
  * removed check for dbusmenu-gtk, it isn't used
modified:
  configure.ac
  src/entry-menu-item.c
  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	2010-09-22 12:07:52 +0000
+++ configure.ac	2011-01-10 20:54:13 +0000
@@ -30,8 +30,7 @@
 GTK_REQUIRED_VERSION=2.12
 INDICATOR_REQUIRED_VERSION=0.3.0
 GWIBBER_REQUIRED_VERSION=0.0.4
-DBUSMENUGTK_REQUIRED_VERSION=0.2.2
-DBUSMENUGLIB_REQUIRED_VERSION=0.2.2
+DBUSMENUGLIB_REQUIRED_VERSION=0.3.90
 TELEPATHYGLIB_REQUIRED_VERSION=0.9.0
 GCONF_REQUIRED_VERSION=2.0.0
 INDICATOR_DISPLAY_OBJECTS=0.1
@@ -39,8 +38,8 @@
 PKG_CHECK_MODULES(APPLET,        gtk+-2.0 >= $GTK_REQUIRED_VERSION
                                  indicator >= $INDICATOR_REQUIRED_VERSION
 				 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
-				 dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION)
-PKG_CHECK_MODULES(MESERVICE,     dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION
+                                 dbus-glib-1)
+PKG_CHECK_MODULES(MESERVICE,     dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
 				 gconf-2.0 >= $GCONF_REQUIRED_VERSION
                                  indicator >= $INDICATOR_REQUIRED_VERSION
                                  gwibber >= $GWIBBER_REQUIRED_VERSION

=== modified file 'src/entry-menu-item.c'
--- src/entry-menu-item.c	2010-08-14 04:40:14 +0000
+++ src/entry-menu-item.c	2011-01-10 20:54:13 +0000
@@ -55,8 +55,7 @@
 static void entry_menu_item_init       (EntryMenuItem *self);
 static void entry_menu_item_dispose    (GObject *object);
 static void entry_menu_item_finalize   (GObject *object);
-static void handle_event               (DbusmenuMenuitem *mi, const gchar *name,
-										const GValue *value, guint timestamp);
+static void handle_event               (DbusmenuMenuitem * mi, const gchar * name, GVariant * value, guint timestamp);
 
 G_DEFINE_TYPE (EntryMenuItem, entry_menu_item, DBUSMENU_TYPE_MENUITEM);
 
@@ -122,14 +121,14 @@
    for the corresponding bottom-half service to act upon */
 static void
 handle_event (DbusmenuMenuitem *mi, const gchar *name,
-			  const GValue *value, guint timestamp)
+			  GVariant *value, guint timestamp)
 {
 	/* EntryMenuItemPrivate * priv = ENTRY_MENU_ITEM_GET_PRIVATE(self); */
 
 	g_debug ("handle_event");
 	if (g_strcmp0 (name, "send") == 0) {
 		MeGwibberService *me_gwibber_service = me_gwibber_service_get ();
-		me_gwibber_service_send (me_gwibber_service, g_value_get_string (value));
+		me_gwibber_service_send (me_gwibber_service, g_variant_get_string (value, NULL));
 		dbusmenu_menuitem_property_set (mi, ENTRY_MENUITEM_PROP_TEXT, "");
 	}
 

=== modified file 'src/indicator-me.c'
--- src/indicator-me.c	2010-10-05 16:53:21 +0000
+++ src/indicator-me.c	2011-01-10 20:54:13 +0000
@@ -425,13 +425,11 @@
   g_return_if_fail (GTK_IS_ENTRY (entry));
   g_return_if_fail (DBUSMENU_IS_MENUITEM (mi));
 
-	GValue value = { 0 };
-	g_value_init (&value, G_TYPE_STRING);
-	g_value_set_static_string (&value, gtk_entry_get_text (entry));
-
-	g_debug ("user typed: %s", g_value_get_string (&value));
-
-	dbusmenu_menuitem_handle_event (mi, "send", &value, gtk_get_current_event_time());
+	GVariant * value = g_variant_new_string (gtk_entry_get_text (entry));
+	
+	g_debug ("user typed: %s", g_variant_get_string (value, NULL));
+
+	dbusmenu_menuitem_handle_event (mi, "send", value, gtk_get_current_event_time());
 }
 
 static gboolean