[Ayatana-commits] [Merge] lp:~cjcurran/indicator-session/optional-string-in-switch-item into lp:indicator-session

2011-09-08 Thread Conor Curran
Conor Curran has proposed merging 
lp:~cjcurran/indicator-session/optional-string-in-switch-item into 
lp:indicator-session.

Requested reviews:
  Ted Gould (ted)
Related bugs:
  Bug #844272 in Session Menu: Guest session displayed with random hash
  https://bugs.launchpad.net/indicator-session/+bug/844272

For more details, see:
https://code.launchpad.net/~cjcurran/indicator-session/optional-string-in-switch-item/+merge/74598

Its now optional whether to use the username in the label for the switch item. 
Added new gsettings to allow users to control this, defaults to False which 
results in the label being 'Switch User Account... as the spec outlines. 
-- 
https://code.launchpad.net/~cjcurran/indicator-session/optional-string-in-switch-item/+merge/74598
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'data/com.canonical.indicator.session.gschema.xml.in'
--- data/com.canonical.indicator.session.gschema.xml.in	2011-09-06 17:07:55 +
+++ data/com.canonical.indicator.session.gschema.xml.in	2011-09-08 13:16:58 +
@@ -25,6 +25,13 @@
   summaryDetermine the visibility of the User Menu/summary
   descriptionAllow for the user menu to be hidden by the user./description
 /key
+key type=b name=use-username-in-switch-item
+  defaultfalse/default
+  summaryDetermine what string to use for the user's name in the switch menuitem./summary
+  descriptionThe switch menuitem as part of the user menu should be default have the label 'Switch User Account'.
+  This settings gives the user the potential to have the label read 'Switch from $username'/description
+/key
+
   /schema
   
 /schemalist

=== modified file 'src/indicator-session.c'
--- src/indicator-session.c	2011-09-06 16:59:18 +
+++ src/indicator-session.c	2011-09-08 13:16:58 +
@@ -539,10 +539,16 @@
   if (g_strcmp0(translate, 1) != 0) {
 no_name_in_lang = TRUE;
   }
+  
+  GSettings* settings = g_settings_new (com.canonical.indicator.session);
+  gboolean use_username = g_settings_get_boolean (settings,
+  use-username-in-switch-item);
+  g_object_unref (settings);
 
   if (variant == NULL || g_variant_get_string(variant, NULL) == NULL ||
-  g_variant_get_string(variant, NULL)[0] == '\0' || no_name_in_lang) {
-finalstring = _(Switch User…);
+  g_variant_get_string(variant, NULL)[0] == '\0' || no_name_in_lang 
+  || use_username == FALSE) {
+finalstring = _(Switch User Account…);
 set_ellipsize = FALSE;
   }
 
@@ -587,7 +593,6 @@
   gtk_label_set_ellipsize(label, PANGO_ELLIPSIZE_NONE);
 }
   }
-
 	return;
 }
 

=== modified file 'src/settings-helper.h'
--- src/settings-helper.h	2011-09-06 16:36:25 +
+++ src/settings-helper.h	2011-09-08 13:16:58 +
@@ -21,7 +21,7 @@
 
 
 #ifndef __GCONF_HELPER_H__
-#define __GCONF_HELPER_H__ 1
+#define __GCONF_HELPER_H__ 
 
 #include glib/gi18n.h
 
@@ -31,12 +31,13 @@
 #include libdbusmenu-glib/server.h
 #include libdbusmenu-glib/menuitem.h
 
-#define SESSION_SCHEMA  com.canonical.indicator.session
-#define SUPPRESS_KEYsuppress-logout-restart-shutdown
-#define LOGOUT_KEY  suppress-logout-menuitem
-#define RESTART_KEY suppress-restart-menuitem
-#define SHUTDOWN_KEYsuppress-shutdown-menuitem
-#define SHOW_USER_MENU  user-show-menu
+#define SESSION_SCHEMAcom.canonical.indicator.session
+#define SUPPRESS_KEY  suppress-logout-restart-shutdown
+#define LOGOUT_KEYsuppress-logout-menuitem
+#define RESTART_KEY   suppress-restart-menuitem
+#define SHUTDOWN_KEY  suppress-shutdown-menuitem
+#define SHOW_USER_MENUuser-show-menu
+#define USER_USERNAME_IN_SWITCH_ITEM  use-username-in-switch-item
 
 #define LOCKDOWN_SCHEMA   org.gnome.desktop.lockdown
 #define LOCKDOWN_KEY_USER disable-user-switching

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


Re: [Ayatana-commits] [Merge] lp:~cjcurran/indicator-session/optional-string-in-switch-item into lp:indicator-session

2011-09-08 Thread Ted Gould
Review: Needs Information

Why do we need a preference for this?  Can we just use the check for guest 
function?
-- 
https://code.launchpad.net/~cjcurran/indicator-session/optional-string-in-switch-item/+merge/74598
Your team ayatana-commits is subscribed to branch lp:indicator-session.

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Merge] lp:~cjcurran/indicator-session/optional-string-in-switch-item into lp:indicator-session

2011-09-08 Thread Ted Gould
The proposal to merge 
lp:~cjcurran/indicator-session/optional-string-in-switch-item into 
lp:indicator-session has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~cjcurran/indicator-session/optional-string-in-switch-item/+merge/74598
-- 
https://code.launchpad.net/~cjcurran/indicator-session/optional-string-in-switch-item/+merge/74598
Your team ayatana-commits is subscribed to branch lp:indicator-session.

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Merge] lp:~cjcurran/indicator-session/optional-string-in-switch-item into lp:indicator-session

2011-09-08 Thread noreply
The proposal to merge 
lp:~cjcurran/indicator-session/optional-string-in-switch-item into 
lp:indicator-session has been updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~cjcurran/indicator-session/optional-string-in-switch-item/+merge/74598
-- 
https://code.launchpad.net/~cjcurran/indicator-session/optional-string-in-switch-item/+merge/74598
Your team ayatana-commits is subscribed to branch lp:indicator-session.

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp