[gnome-shell] status/keyboard: Always hide the old source panel indicator label



commit 5c89568cca703019281c78f1a1e05c6592b0a843
Author: Rui Matos <tiagomatos gmail com>
Date:   Thu Mar 14 13:18:16 2013 +0100

    status/keyboard: Always hide the old source panel indicator label
    
    When we switch into an invalid input source we hide the panel
    indicator and return early but we were not hiding the previously
    active source label and its menu item dot and thus when switching
    again to a third input source we would end up showing 2 overlapping
    labels in the panel and the menu would have 2 entries with a dot.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695841

 js/ui/status/keyboard.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index fba85e8..4e629b1 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -416,6 +416,11 @@ const InputSourceIndicator = new Lang.Class({
         let oldSource;
         [oldSource, this._currentSource] = [this._currentSource, newSource];
 
+        if (oldSource) {
+            oldSource.menuItem.setShowDot(false);
+            oldSource.indicatorLabel.hide();
+        }
+
         if (!newSource || (nVisibleSources < 2 && !newSource.properties)) {
             // This source index might be invalid if we weren't able
             // to build a menu item for it, so we hide ourselves since
@@ -430,11 +435,6 @@ const InputSourceIndicator = new Lang.Class({
 
         this.actor.show();
 
-        if (oldSource) {
-            oldSource.menuItem.setShowDot(false);
-            oldSource.indicatorLabel.hide();
-        }
-
         newSource.menuItem.setShowDot(true);
         newSource.indicatorLabel.show();
 


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