aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-17 22:42:18 -0600
committerTed Gould <ted@gould.cx>2010-02-17 22:42:18 -0600
commitc89696ccae872658d80e56e8d10d78722aa63b78 (patch)
treeac26161544e62c8c989a64a5a40cddd1a5faf7ac /src
parent3ccc99e803d8a43bd932275b2e172cdcce213ad9 (diff)
parent07f36b8de87ccdaebee842105bd86892f6465d3d (diff)
downloadayatana-indicator-session-c89696ccae872658d80e56e8d10d78722aa63b78.tar.gz
ayatana-indicator-session-c89696ccae872658d80e56e8d10d78722aa63b78.tar.bz2
ayatana-indicator-session-c89696ccae872658d80e56e8d10d78722aa63b78.zip
Fix the order of items to the new design spec
Diffstat (limited to 'src')
-rw-r--r--src/session-service.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/session-service.c b/src/session-service.c
index e89a9a0..a2da207 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -437,6 +437,10 @@ rebuild_items (DbusmenuMenuitem *root,
if (can_activate == TRUE)
{
+ DbusmenuMenuitem * separator1 = dbusmenu_menuitem_new();
+ dbusmenu_menuitem_property_set(separator1, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
+ dbusmenu_menuitem_child_append(root, separator1);
+
if (check_guest_session ())
{
mi = dbusmenu_menuitem_new ();
@@ -445,6 +449,25 @@ rebuild_items (DbusmenuMenuitem *root,
g_signal_connect (G_OBJECT (mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_guest_session), NULL);
}
+ if (check_new_session ())
+ {
+ ensure_gconf_client ();
+
+ switch_menuitem = dbusmenu_menuitem_new ();
+ dbusmenu_menuitem_property_set (switch_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Switch User..."));
+ dbusmenu_menuitem_child_append (root, switch_menuitem);
+ g_signal_connect (G_OBJECT (switch_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_new_session), NULL);
+
+ if (gconf_client_get_bool (gconf_client, LOCKDOWN_KEY, NULL))
+ {
+ dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+ }
+ else
+ {
+ dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
+ }
+ }
+
if (count > MINIMUM_USERS && count < MAXIMUM_USERS)
{
if (users != NULL)
@@ -476,24 +499,6 @@ rebuild_items (DbusmenuMenuitem *root,
}
}
- if (check_new_session ())
- {
- ensure_gconf_client ();
-
- switch_menuitem = dbusmenu_menuitem_new ();
- dbusmenu_menuitem_property_set (switch_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Switch User..."));
- dbusmenu_menuitem_child_append (root, switch_menuitem);
- g_signal_connect (G_OBJECT (switch_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_new_session), NULL);
-
- if (gconf_client_get_bool (gconf_client, LOCKDOWN_KEY, NULL))
- {
- dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
- }
- else
- {
- dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
- }
- }
}
DbusmenuMenuitem * separator = dbusmenu_menuitem_new();