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



commit e4561281d69a3e7ccfae64f4b98f68e8b7f08984
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 81d80dc..41156ad 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -135,6 +135,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]