After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643104 - Cannot show current keyboard layout
Cannot show current keyboard layout
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-23 17:54 UTC by Giovanni Campagna
Modified: 2011-02-23 22:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
KeyboardStatus: fix showing current layout (1.80 KB, patch)
2011-02-23 17:55 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2011-02-23 17:54:30 UTC
It says "Command not found" (but see patch...)
Comment 1 Giovanni Campagna 2011-02-23 17:55:01 UTC
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 2 Dan Winship 2011-02-23 18:49:06 UTC
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
Comment 3 Giovanni Campagna 2011-02-23 19:15:24 UTC
Attachment 181730 [details] pushed as 0619870 - KeyboardStatus: fix showing current layout
Comment 4 Owen Taylor 2011-02-23 22:16:06 UTC
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