aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-06-26 16:48:06 -0500
committerTed Gould <ted@canonical.com>2009-06-26 16:48:06 -0500
commit4512d99684ff8d0f009cc69c0351b827dd369988 (patch)
tree29c39ab22d33f4dd77bd0cc1f789c1df9b7ff6aa
parent23fa731fafd03ac156f4b2b121250fa7a76a9a53 (diff)
downloadayatana-indicator-session-4512d99684ff8d0f009cc69c0351b827dd369988.tar.gz
ayatana-indicator-session-4512d99684ff8d0f009cc69c0351b827dd369988.tar.bz2
ayatana-indicator-session-4512d99684ff8d0f009cc69c0351b827dd369988.zip
Phase one switch to the client instead of the menu
-rw-r--r--src/indicator-sus.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/indicator-sus.c b/src/indicator-sus.c
index 53a0db6..cd3337d 100644
--- a/src/indicator-sus.c
+++ b/src/indicator-sus.c
@@ -1,6 +1,6 @@
#include <gtk/gtk.h>
-#include <libdbusmenu-gtk/menu.h>
+#include <libdbusmenu-gtk/client.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
@@ -12,9 +12,10 @@ INDICATOR_SET_NAME("users-status-session")
#include "dbus-shared-names.h"
#include "status-service-client.h"
-static GtkMenu * status_menu = NULL;
-static GtkMenu * users_menu = NULL;
-static GtkMenu * session_menu = NULL;
+static DbusmenuGtkClient * status_client = NULL;
+static DbusmenuGtkClient * users_client = NULL;
+static DbusmenuGtkClient * session_client = NULL;
+
static GtkMenu * main_menu = NULL;
static GtkWidget * status_separator = NULL;
@@ -113,8 +114,8 @@ build_status_menu (gpointer userdata)
return FALSE;
}
- status_menu = GTK_MENU(dbusmenu_gtkmenu_new(INDICATOR_STATUS_DBUS_NAME, INDICATOR_STATUS_DBUS_OBJECT));
- g_signal_connect(G_OBJECT(status_menu), DBUSMENU_GTKMENU_SIGNAL_ADD, G_CALLBACK(status_menu_add), main_menu);
+ status_client = dbusmenu_gtkclient_new(INDICATOR_STATUS_DBUS_NAME, INDICATOR_STATUS_DBUS_OBJECT);
+ g_signal_connect(G_OBJECT(status_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(status_menu_add), main_menu);
status_separator = gtk_separator_menu_item_new();
gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), status_separator);
@@ -145,8 +146,8 @@ build_users_menu (gpointer userdata)
return FALSE;
}
- users_menu = GTK_MENU(dbusmenu_gtkmenu_new(INDICATOR_USERS_DBUS_NAME, INDICATOR_USERS_DBUS_OBJECT));
- g_signal_connect(G_OBJECT(users_menu), DBUSMENU_GTKMENU_SIGNAL_ADD, G_CALLBACK(users_menu_add), main_menu);
+ users_client = dbusmenu_gtkclient_new(INDICATOR_USERS_DBUS_NAME, INDICATOR_USERS_DBUS_OBJECT);
+ g_signal_connect(G_OBJECT(users_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(users_menu_add), main_menu);
users_separator = gtk_separator_menu_item_new();
gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), users_separator);
@@ -177,8 +178,8 @@ build_session_menu (gpointer userdata)
return FALSE;
}
- session_menu = GTK_MENU(dbusmenu_gtkmenu_new(INDICATOR_SESSION_DBUS_NAME, INDICATOR_SESSION_DBUS_OBJECT));
- g_signal_connect(G_OBJECT(session_menu), DBUSMENU_GTKMENU_SIGNAL_ADD, G_CALLBACK(session_menu_add), main_menu);
+ session_client = dbusmenu_gtkclient_new(INDICATOR_SESSION_DBUS_NAME, INDICATOR_SESSION_DBUS_OBJECT);
+ g_signal_connect(G_OBJECT(session_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(session_menu_add), main_menu);
return FALSE;
}