@@ -115,14 +115,7 @@ class CinnamonKeyboardApplet extends Applet.Applet {
115115 }
116116
117117 _onPanelEditModeChanged ( ) {
118- if ( global . settings . get_boolean ( PANEL_EDIT_MODE_KEY ) ) {
119- if ( ! this . actor . visible ) {
120- this . set_applet_icon_symbolic_name ( "input-keyboard" ) ;
121- this . actor . show ( ) ;
122- }
123- } else {
124- this . _syncConfig ( ) ;
125- }
118+ this . actor . visible = global . settings . get_boolean ( PANEL_EDIT_MODE_KEY ) || this . _inputSourcesManager . multipleSources ;
126119 }
127120
128121 on_applet_added_to_panel ( ) {
@@ -178,14 +171,6 @@ class CinnamonKeyboardApplet extends Applet.Applet {
178171
179172 this . _selectedLayout = null ;
180173
181- if ( ! this . _inputSourcesManager . multipleSources ) {
182- this . menu . close ( ) ;
183- this . actor . hide ( ) ;
184- return ;
185- }
186-
187- this . actor . show ( ) ;
188-
189174 for ( const sourceId of Object . keys ( this . _inputSourcesManager . inputSources ) ) {
190175 const source = this . _inputSourcesManager . inputSources [ sourceId ] ;
191176
@@ -207,15 +192,17 @@ class CinnamonKeyboardApplet extends Applet.Applet {
207192 this . _layoutItems . set ( source , menuItem ) ;
208193 this . _layoutSection . addMenuItem ( menuItem ) ;
209194 }
210- }
211-
212- _syncGroup ( ) {
213- const selected = this . _inputSourcesManager . currentSource ;
214195
215196 if ( ! this . _inputSourcesManager . multipleSources ) {
197+ this . menu . close ( ) ;
216198 this . actor . hide ( ) ;
217- return ;
199+ } else {
200+ this . actor . show ( ) ;
218201 }
202+ }
203+
204+ _syncGroup ( ) {
205+ const selected = this . _inputSourcesManager . currentSource ;
219206
220207 if ( this . _selectedLayout ) {
221208 this . _selectedLayout . setShowDot ( false ) ;
@@ -244,6 +231,10 @@ class CinnamonKeyboardApplet extends Applet.Applet {
244231
245232 this . _panel_icon_box . set_child ( actor ) ;
246233
234+ if ( ! this . _inputSourcesManager . multipleSources ) {
235+ this . actor . hide ( ) ;
236+ }
237+
247238 this . _updatePropertySection ( selected . properties ) ;
248239 }
249240
0 commit comments