From fcf8a6cc3c9f27c921578fa0faf80db348e2cce1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 12:46:46 -0500 Subject: Needing dbusmenu 0.1.1 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 28b2c8b..409f176 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.1.0 +DBUSMENUGTK_REQUIRED_VERSION=0.1.1 PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION indicator >= $INDICATOR_REQUIRED_VERSION -- cgit v1.2.3 From cb0e7ca7140a0e25f49a8242775778711f710f40 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 13:03:32 -0500 Subject: Have a quick check to see if we have something to put there. If not, no menu item. --- src/status-service.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/status-service.c b/src/status-service.c index 14d8a34..c35395e 100644 --- a/src/status-service.c +++ b/src/status-service.c @@ -165,10 +165,12 @@ build_user_item (DbusmenuMenuitem * root) while (*walker != '\0' && *walker != ',') { walker++; } *walker = '\0'; - DbusmenuMenuitem * useritem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(useritem, "label", name); - dbusmenu_menuitem_property_set(useritem, "sensitive", "false"); - dbusmenu_menuitem_child_append(root, useritem); + if (name[0] != '\0') { + DbusmenuMenuitem * useritem = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(useritem, "label", name); + dbusmenu_menuitem_property_set(useritem, "sensitive", "false"); + dbusmenu_menuitem_child_append(root, useritem); + } g_free(name); } else { -- cgit v1.2.3 From 974d47305444df724a9c6a5b93666fbd69d4fc5e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 13:07:01 -0500 Subject: Switching to using the defines for the properties in the menus. --- src/status-service.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/status-service.c b/src/status-service.c index c35395e..ce6edb6 100644 --- a/src/status-service.c +++ b/src/status-service.c @@ -88,7 +88,7 @@ status_update (void) { if (global_status != oldglobal) { g_debug("Global status changed to: %s", _(status_strings[global_status])); - dbusmenu_menuitem_property_set(status_menuitem, "label", _(status_strings[global_status])); + dbusmenu_menuitem_property_set(status_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _(status_strings[global_status])); status_service_dbus_set_status(dbus_interface, status_icons[global_status]); } @@ -167,8 +167,8 @@ build_user_item (DbusmenuMenuitem * root) if (name[0] != '\0') { DbusmenuMenuitem * useritem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(useritem, "label", name); - dbusmenu_menuitem_property_set(useritem, "sensitive", "false"); + dbusmenu_menuitem_property_set(useritem, DBUSMENU_MENUITEM_PROP_LABEL, name); + dbusmenu_menuitem_property_set(useritem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false"); dbusmenu_menuitem_child_append(root, useritem); } @@ -189,15 +189,15 @@ build_menu (gpointer data) build_user_item(root); status_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(status_menuitem, "label", _(status_strings[global_status])); + dbusmenu_menuitem_property_set(status_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _(status_strings[global_status])); dbusmenu_menuitem_child_append(root, status_menuitem); StatusProviderStatus i; for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) { DbusmenuMenuitem * mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _(status_strings[i])); - dbusmenu_menuitem_property_set(mi, "icon", status_icons[i]); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _(status_strings[i])); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_ICON, status_icons[i]); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(status_menu_click), GINT_TO_POINTER(i)); dbusmenu_menuitem_child_append(status_menuitem, mi); @@ -206,7 +206,7 @@ build_menu (gpointer data) } DbusmenuMenuitem * mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("Lock Screen")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen")); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(lock_screen), GINT_TO_POINTER(i)); dbusmenu_menuitem_child_append(root, mi); -- cgit v1.2.3 From 4edd517ba3f85051cd4cecda211a86a97f6ddea3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 13:46:44 -0500 Subject: Switching to using the defines for all of the properties. --- src/session-service.c | 18 +++++++++--------- src/users-service.c | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/session-service.c b/src/session-service.c index ad160e9..bea26ba 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -82,7 +82,7 @@ suspend_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata) g_debug("Got Suspend: %s", g_value_get_boolean(&candoit) ? "true" : "false"); if (suspend_mi != NULL) { - dbusmenu_menuitem_property_set(suspend_mi, "visible", g_value_get_boolean(&candoit) ? "true" : "false"); + dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false"); } return; @@ -105,7 +105,7 @@ hibernate_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata) g_debug("Got Hibernate: %s", g_value_get_boolean(&candoit) ? "true" : "false"); if (suspend_mi != NULL) { - dbusmenu_menuitem_property_set(hibernate_mi, "visible", g_value_get_boolean(&candoit) ? "true" : "false"); + dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false"); } return; @@ -223,29 +223,29 @@ create_items (DbusmenuMenuitem * root) { DbusmenuMenuitem * mi = NULL; mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("Log Out")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "logout"); suspend_mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(suspend_mi, "visible", "false"); - dbusmenu_menuitem_property_set(suspend_mi, "label", _("Suspend")); + dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, "false"); + dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Suspend")); dbusmenu_menuitem_child_append(root, suspend_mi); g_signal_connect(G_OBJECT(suspend_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Suspend"); hibernate_mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(hibernate_mi, "visible", "false"); - dbusmenu_menuitem_property_set(hibernate_mi, "label", _("Hibernate")); + dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, "false"); + dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Hibernate")); dbusmenu_menuitem_child_append(root, hibernate_mi); g_signal_connect(G_OBJECT(hibernate_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Hibernate"); mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("Restart")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "restart"); mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("Shutdown")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "shutdown"); diff --git a/src/users-service.c b/src/users-service.c index 9ada91f..5db832b 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -113,14 +113,14 @@ create_items (DbusmenuMenuitem * root) { if (check_guest_session()) { mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("Guest Session")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Guest Session")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_guest_session), NULL); } if (check_new_session()) { mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("New Session...")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("New Session...")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_new_session), NULL); } -- cgit v1.2.3 From 847d6955a4c8bb7275d89a5d70c6a4589f1eb07e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 14:44:58 -0500 Subject: debian/control: Increasing dbusmenu dep to 0.1.1 --- debian/changelog | 1 + debian/control | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3becd9b..90ffd45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ indicator-session (0.1-0ubuntu1~ppa2~dbusmenu011r1) UNRELEASED; urgency=low * Upstream update for dbusmenu 0.1.1 + * debian/control: Increasing dbusmenu dep to 0.1.1 -- Ted Gould Thu, 03 Sep 2009 14:34:48 -0500 diff --git a/debian/control b/debian/control index b9ad314..7e6e1a6 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 (>= 0.1.0), - libdbusmenu-gtk-dev (>= 0.1.0), + libdbusmenu-glib-dev (>= 0.1.1), + libdbusmenu-gtk-dev (>= 0.1.1), libpolkit-gnome-dev, intltool Standards-Version: 3.8.2 -- cgit v1.2.3 From cdfa53bdefc312410ca350972eee33f0091edbbe Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 14:52:47 -0500 Subject: Set the type of the menuitem to be a image menuitem. --- src/status-service.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/status-service.c b/src/status-service.c index ce6edb6..b210dcd 100644 --- a/src/status-service.c +++ b/src/status-service.c @@ -30,6 +30,7 @@ with this program. If not, see . #include #include +#include #include #include @@ -196,6 +197,7 @@ build_menu (gpointer data) for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) { DbusmenuMenuitem * mi = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(mi, "type", DBUSMENU_CLIENT_TYPES_IMAGE); dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _(status_strings[i])); dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_ICON, status_icons[i]); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(status_menu_click), GINT_TO_POINTER(i)); -- cgit v1.2.3 From df2b47f43e502695b20f711a7fcacb6034845f6f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 14:54:06 -0500 Subject: releasing version 0.1-0ubuntu1~ppa2~dbusmenu011r1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 90ffd45..418a9c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -indicator-session (0.1-0ubuntu1~ppa2~dbusmenu011r1) UNRELEASED; urgency=low +indicator-session (0.1-0ubuntu1~ppa2~dbusmenu011r1) karmic; urgency=low * Upstream update for dbusmenu 0.1.1 * debian/control: Increasing dbusmenu dep to 0.1.1 - -- Ted Gould Thu, 03 Sep 2009 14:34:48 -0500 + -- Ted Gould Thu, 03 Sep 2009 14:54:02 -0500 indicator-session (0.1-0ubuntu1~ppa1) karmic; urgency=low -- cgit v1.2.3 From a301de9feb50fddbe1cbae1c55b4622d2e6c91a2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 14:54:43 -0500 Subject: releasing version 0.1-0ubuntu1~ppa2~dbusmenu011r2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 122f779..a3e962e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-session (0.1-0ubuntu1~ppa2~dbusmenu011r2) UNRELEASED; urgency=low +indicator-session (0.1-0ubuntu1~ppa2~dbusmenu011r2) karmic; urgency=low * Update to set menuitem type. - -- Ted Gould Thu, 03 Sep 2009 14:54:15 -0500 + -- Ted Gould Thu, 03 Sep 2009 14:54:39 -0500 indicator-session (0.1-0ubuntu1~ppa2~dbusmenu011r1) karmic; urgency=low -- cgit v1.2.3 From 94fcffe639caac2e9eb9a10ed8eab77608416fdf Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Sep 2009 15:07:49 -0500 Subject: Bumping up number to 0.1.1 and fixing a couple depends. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 409f176..c2623d1 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/indicator-session.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-session, 0.1) +AM_INIT_AUTOMAKE(indicator-session, 0.1.1) AM_MAINTAINER_MODE @@ -33,7 +33,7 @@ PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION AC_SUBST(APPLET_CFLAGS) AC_SUBST(APPLET_LIBS) -DBUSMENUGLIB_REQUIRED_VERSION=0.0.0 +DBUSMENUGLIB_REQUIRED_VERSION=0.1.1 PKG_CHECK_MODULES(STATUSSERVICE, dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION) -- cgit v1.2.3