From da34a798d7a04d063206af2c38fa7d2ac63e217d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Sep 2009 20:13:17 -0500 Subject: Fixing shutdown text --- src/session-service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/session-service.c b/src/session-service.c index 59a3a97..58eb4cf 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -258,9 +258,9 @@ create_items (DbusmenuMenuitem * root) { shutdown_mi = dbusmenu_menuitem_new(); if (supress_confirmations()) { - dbusmenu_menuitem_property_set(shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown")); + dbusmenu_menuitem_property_set(shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shut Down")); } else { - dbusmenu_menuitem_property_set(shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown...")); + dbusmenu_menuitem_property_set(shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shut Down...")); } dbusmenu_menuitem_child_append(root, shutdown_mi); g_signal_connect(G_OBJECT(shutdown_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "shutdown"); -- cgit v1.2.3 From c4c208906843e5678e5150e563c23021404cfeff Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Sep 2009 20:58:39 -0500 Subject: Changing label per design --- src/users-service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/users-service.c b/src/users-service.c index 5db832b..bc8911b 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -120,7 +120,7 @@ create_items (DbusmenuMenuitem * root) { if (check_new_session()) { mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("New Session...")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Switch User...")); 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 41fd33b07ae4dbef02424b1b9c880995f8e8e112 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Sep 2009 21:02:36 -0500 Subject: Moving lock screen from status to users service. --- src/status-service.c | 32 -------------------------------- src/users-service.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/status-service.c b/src/status-service.c index d8f60d4..8ce7962 100644 --- a/src/status-service.c +++ b/src/status-service.c @@ -124,33 +124,6 @@ status_update (void) { return; } -/* A fun little function to actually lock the screen. If, - that's what you want, let's do it! */ -static void -lock_screen (DbusmenuMenuitem * mi, gpointer data) -{ - g_debug("Lock Screen"); - - DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_return_if_fail(session_bus != NULL); - - DBusGProxy * proxy = dbus_g_proxy_new_for_name_owner(session_bus, - "org.gnome.ScreenSaver", - "/", - "org.gnome.ScreenSaver", - NULL); - g_return_if_fail(proxy != NULL); - - dbus_g_proxy_call_no_reply(proxy, - "Lock", - G_TYPE_INVALID, - G_TYPE_INVALID); - - g_object_unref(proxy); - - return; -} - static void status_menu_click (DbusmenuMenuitem * mi, gpointer data) { @@ -244,11 +217,6 @@ build_menu (gpointer data) g_debug("Built %s", status_strings[i]); } - DbusmenuMenuitem * mi = dbusmenu_menuitem_new(); - 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); - return FALSE; } diff --git a/src/users-service.c b/src/users-service.c index bc8911b..6c44781 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -107,10 +107,42 @@ activate_new_session (DbusmenuMenuitem * mi, gpointer user_data) return; } +/* A fun little function to actually lock the screen. If, + that's what you want, let's do it! */ +static void +lock_screen (DbusmenuMenuitem * mi, gpointer data) +{ + g_debug("Lock Screen"); + + DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); + g_return_if_fail(session_bus != NULL); + + DBusGProxy * proxy = dbus_g_proxy_new_for_name_owner(session_bus, + "org.gnome.ScreenSaver", + "/", + "org.gnome.ScreenSaver", + NULL); + g_return_if_fail(proxy != NULL); + + dbus_g_proxy_call_no_reply(proxy, + "Lock", + G_TYPE_INVALID, + G_TYPE_INVALID); + + g_object_unref(proxy); + + return; +} + static void create_items (DbusmenuMenuitem * root) { DbusmenuMenuitem * mi = NULL; + mi = dbusmenu_menuitem_new(); + 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), NULL); + dbusmenu_menuitem_child_append(root, mi); + if (check_guest_session()) { mi = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Guest Session")); -- cgit v1.2.3 From 35cc4970e77115c83c54bd6a4035a3af761cc0b1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 15 Sep 2009 09:16:09 -0500 Subject: Changing the menu item to be 'Set Status' instead of the current status. --- src/status-service.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/status-service.c b/src/status-service.c index 8ce7962..c7ef20b 100644 --- a/src/status-service.c +++ b/src/status-service.c @@ -95,8 +95,6 @@ status_update (void) { if (global_status != oldglobal) { g_debug("Global status changed to: %s", _(status_strings[global_status])); - /* Set the status name on the menu item */ - dbusmenu_menuitem_property_set(status_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _(status_strings[global_status])); /* Configure the icon on the panel */ status_service_dbus_set_status(dbus_interface, status_icons[global_status]); @@ -191,7 +189,7 @@ build_menu (gpointer data) build_user_item(root); status_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(status_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _(status_strings[global_status])); + dbusmenu_menuitem_property_set(status_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Set Status")); dbusmenu_menuitem_child_append(root, status_menuitem); StatusProviderStatus i; -- cgit v1.2.3