[gnome-shell/wip/aggregate-menu: 101/101] system: Show the username instead if the user's real name is too long



commit 1149aa3baffc7cfd5425687ba3de9e1a28c95d55
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jul 1 14:28:27 2013 -0400

    system: Show the username instead if the user's real name is too long

 js/ui/status/system.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/system.js b/js/ui/status/system.js
index 370ade3..992984d 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -138,6 +138,9 @@ const Indicator = new Lang.Class({
 
     _updateSwitchUserSubMenu: function() {
         this._switchUserSubMenu.label.text = this._user.get_real_name();
+        let layout = this._switchUserSubMenu.label.clutter_text.get_layout();
+        if (layout.is_ellipsized())
+            this._switchUserSubMenu.label.text = this._user.get_user_name();
 
         let iconFile = this._user.get_icon_file();
         if (iconFile && !GLib.file_test(iconFile, GLib.FileTest.EXISTS))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]