GNOME Bugzilla – Bug 643104
Cannot show current keyboard layout
Last modified: 2011-02-23 22:16:06 UTC
It says "Command not found" (but see patch...)
Created attachment 181730 [details] [review] KeyboardStatus: fix showing current layout Util.spawn accepts an array of strings as the arguments, and will not implicitly convert other types. At the same time, fix a bug in Util.spawn that prevented this from being correctly detected.
Comment on attachment 181730 [details] [review] KeyboardStatus: fix showing current layout >- if (err.code == GLib.SpawnError.G_SPAWN_ERROR_NOENT) { >+ if (err.code == GLib.SpawnError.NOENT) { per bug 641174, this does not actually fix the error message, does it? >- Util.spawn(['gkbd-keyboard-display', '-g', this._config.get_current_group() + 1]); >+ Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]); That part is definitely right. I'd say commit that, and leave the spawn fixing for 641174
Attachment 181730 [details] pushed as 0619870 - KeyboardStatus: fix showing current layout
Review of attachment 181730 [details] [review]: ::: js/misc/util.js @@ +83,3 @@ null, null); } catch (err) { + if (err.code == GLib.SpawnError.NOENT) { Note that this part of the patch just rebroke this in a different way, so now it never says "Command not found" instead of always saying "Command not found". See bug 641174