aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
-rw-r--r--debian/changelog7
-rw-r--r--debian/control4
-rw-r--r--src/session-service.c18
-rw-r--r--src/status-service.c22
-rw-r--r--src/users-service.c4
6 files changed, 36 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index 28b2c8b..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
@@ -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
@@ -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)
diff --git a/debian/changelog b/debian/changelog
index 5e7c7f5..012ad6d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+indicator-session (0.1.1-0ubuntu1~ppa1) UNRELEASED; urgency=low
+
+ * Upstream update 0.1.1 for dbusmenu 0.1.1
+ * debian/control: Increasing dbusmenu dep to 0.1.1
+
+ -- Ted Gould <ted@ubuntu.com> Thu, 03 Sep 2009 15:14:07 -0500
+
indicator-session (0.1-0ubuntu1~ppa1) karmic; urgency=low
* Upstream version 0.1
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
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/status-service.c b/src/status-service.c
index 14d8a34..b210dcd 100644
--- a/src/status-service.c
+++ b/src/status-service.c
@@ -30,6 +30,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
+#include <libdbusmenu-glib/client.h>
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-glib/menuitem.h>
@@ -88,7 +89,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]);
}
@@ -165,10 +166,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, DBUSMENU_MENUITEM_PROP_LABEL, name);
+ dbusmenu_menuitem_property_set(useritem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");
+ dbusmenu_menuitem_child_append(root, useritem);
+ }
g_free(name);
} else {
@@ -187,15 +190,16 @@ 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, "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));
dbusmenu_menuitem_child_append(status_menuitem, mi);
@@ -204,7 +208,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);
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);
}