From 5c89568cca703019281c78f1a1e05c6592b0a843 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Thu, 14 Mar 2013 13:18:16 +0100 Subject: [PATCH] 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 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index fba85e8f6..4e629b107 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();