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 738303 - status/keyboard: Ensure we always have at least one input source
status/keyboard: Ensure we always have at least one input source
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-10 14:58 UTC by Rui Matos
Modified: 2014-10-10 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
status/keyboard: Ensure we always have at least one input source (2.49 KB, patch)
2014-10-10 14:58 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2014-10-10 14:58:46 UTC
This (indirectly) fixes the status indicator coming up empty when
the gsetting is empty as seen in gnome continuous:

http://build.gnome.org/continuous/buildmaster/builds/2014/10/10/18/integrationtest/work-gnome-continuous-x86_64-runtime/screenshot-2.png
Comment 1 Rui Matos 2014-10-10 14:58:50 UTC
Created attachment 288229 [details] [review]
status/keyboard: Ensure we always have at least one input source

Most of the code handles the sources setting being empty and
InputSourceManager.currentSource being null because previously the
"model" (i.e. the sources list) was kept in gnome-settings-daemon.

But this is fragile and since we're now the canonical place where the
list lives we can force it to never be empty even if the gsetting is
empty or contains only invalid entries.  Adding the default keyboard
layout in that case is the safest thing to do.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-10-10 16:28:20 UTC
Review of attachment 288229 [details] [review]:

Looks good.
Comment 3 Rui Matos 2014-10-10 16:52:47 UTC
Attachment 288229 [details] pushed as 72c6f00 - status/keyboard: Ensure we always have at least one input source