aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--debian/changelog13
-rw-r--r--debian/control4
-rw-r--r--src/indicator-session.c33
4 files changed, 39 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index ac90330..28b2c8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
GTK_REQUIRED_VERSION=2.12
INDICATOR_REQUIRED_VERSION=0.2.0
-DBUSMENUGTK_REQUIRED_VERSION=0.0.0
+DBUSMENUGTK_REQUIRED_VERSION=0.1.0
PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
indicator >= $INDICATOR_REQUIRED_VERSION
diff --git a/debian/changelog b/debian/changelog
index a941d0c..8b5d94b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,16 +1,11 @@
-indicator-session (0.1~bzr18-0ubuntu1~ppa2) karmic; urgency=low
+indicator-session (0.1-0ubuntu1~ppa1) UNRELEASED; urgency=low
+ * Upstream version 0.1
+ * debian/control: Looking for libdbusmenu* >= 0.1.0
* debian/control: Shortening the short description and lengthening
the long one. Fixes a bug (LP: #412024)
- -- Ted Gould <ted@ubuntu.com> Wed, 26 Aug 2009 21:19:20 -0500
-
-indicator-session (0.1~bzr18-0ubuntu1~ppa1) karmic; urgency=low
-
- * Merging in the upstream branch which has base support for
- status with Pidgin and Telepathy.
-
- -- Ted Gould <ted@ubuntu.com> Tue, 25 Aug 2009 16:25:37 -0500
+ -- Ted Gould <ted@ubuntu.com> Thu, 27 Aug 2009 13:42:32 -0500
indicator-session (0.1~bzr17-0ubuntu1) UNRELEASE; urgency=low
diff --git a/debian/control b/debian/control
index 19c4318..b9ad314 100644
--- a/debian/control
+++ b/debian/control
@@ -9,8 +9,8 @@ Build-Depends: debhelper (>= 5.0),
gnome-doc-utils,
scrollkeeper,
libindicator-dev,
- libdbusmenu-glib-dev,
- libdbusmenu-gtk-dev,
+ libdbusmenu-glib-dev (>= 0.1.0),
+ libdbusmenu-gtk-dev (>= 0.1.0),
libpolkit-gnome-dev,
intltool
Standards-Version: 3.8.2
diff --git a/src/indicator-session.c b/src/indicator-session.c
index 07efc86..43c568f 100644
--- a/src/indicator-session.c
+++ b/src/indicator-session.c
@@ -61,6 +61,7 @@ static void child_added (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, gu
static guint status_menu_pos_offset (void);
static guint users_menu_pos_offset (void);
static guint session_menu_pos_offset (void);
+static void child_realized (DbusmenuMenuitem * child, gpointer userdata);
GtkLabel *
get_label (void)
@@ -79,14 +80,44 @@ get_icon (void)
return status_image;
}
+typedef struct _realized_data_t realized_data_t;
+struct _realized_data_t {
+ guint position;
+ section_t section;
+};
+
static void
child_added (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, guint position, gpointer section)
{
+ realized_data_t * data = g_new0(realized_data_t, 1);
+ if (data == NULL) {
+ g_warning("Unable to allocate data for realization of item");
+ return;
+ }
+
+ data->position = position;
+ data->section = GPOINTER_TO_UINT(section);
+
+ g_signal_connect(G_OBJECT(child), DBUSMENU_MENUITEM_SIGNAL_REALIZED, G_CALLBACK(child_realized), data);
+ return;
+}
+
+static void
+child_realized (DbusmenuMenuitem * child, gpointer userdata)
+{
+ g_return_if_fail(userdata != NULL);
+ g_return_if_fail(DBUSMENU_IS_MENUITEM(child));
+
+ realized_data_t * data = (realized_data_t *)userdata;
+ guint position = data->position;
+ section_t section = data->section;
+ g_free(data);
+
DbusmenuGtkClient * client = NULL;
gchar * errorstr = NULL;
guint (*posfunc) (void) = NULL;
- switch (GPOINTER_TO_UINT(section)) {
+ switch (section) {
case STATUS_SECTION:
client = status_client;
errorstr = "Status";