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 746288 - status/keyboard: Add a system settings concept to be used under GDM
status/keyboard: Add a system settings concept to be used under GDM
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 746185 (view as bug list)
Depends on:
Blocks: 746289
 
 
Reported: 2015-03-16 14:28 UTC by Rui Matos
Modified: 2015-03-17 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
status/keyboard: Add a system settings concept to be used under GDM (10.25 KB, patch)
2015-03-16 14:28 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2015-03-16 14:28:11 UTC
g-s-d has been taking care of this for us but in a very hackish way
that causes dconf writes on every startup and also doesn't handle
dynamic updates to locale1's properties which has become a problem now
that GDM keeps its greeter session running in parallel with users'.

To take care of this properly, this commit introduces a settings
abstraction with both system and session implementations. The session
implementation just wraps access to the existing gsettings while the
system one gets its values from org.freedesktop.locale1's properties.
Comment 1 Rui Matos 2015-03-16 14:28:17 UTC
Created attachment 299511 [details] [review]
status/keyboard: Add a system settings concept to be used under GDM
Comment 2 Rui Matos 2015-03-16 14:31:08 UTC
*** Bug 746185 has been marked as a duplicate of this bug. ***
Comment 3 Florian Müllner 2015-03-17 14:02:59 UTC
Review of attachment 299511 [details] [review]:

::: js/ui/status/keyboard.js
@@ +314,3 @@
                                   Lang.bind(this, this._switchInputSource));
+        if (Main.sessionMode.isGreeter)
+            this._settings = new InputSourceSystemSettings();

I wonder if it would make more sense to have a single InputSourceSettings class that falls back to the locale1 properties when the GSettings values are empty ...
Comment 4 Rui Matos 2015-03-17 14:13:57 UTC
(In reply to Florian Müllner from comment #3)
> I wonder if it would make more sense to have a single InputSourceSettings
> class that falls back to the locale1 properties when the GSettings values
> are empty ...

This would mean that when logging in to a freshly created user account, gnome-shell wouldn't be using the session settings and thus, changes done by the user in g-i-s and/or g-c-c wouldn't be reflected in the shell until the next log in.
Comment 5 Florian Müllner 2015-03-17 14:20:19 UTC
But if the user/g-i-s sets something up, the gsetting isn't empty anymore, is it? Note that I'm suggesting a single class that combines system- and session settings, not to pick one or the other based on whether the session has been configured.

(sth like:
 get inputSource() {
    let sources = this._settings.get_value('input-sources');
    let nSources = sources.get_n_children();
    if (nSources == 0)
        return this._systemSources;

    ....
 }
Comment 6 Rui Matos 2015-03-17 14:53:22 UTC
(In reply to Florian Müllner from comment #5)
> But if the user/g-i-s sets something up, the gsetting isn't empty anymore,
> is it? Note that I'm suggesting a single class that combines system- and
> session settings, not to pick one or the other based on whether the session
> has been configured.

I see your point and this would work except in already existing deployments where gdm user's gsettings are already populated due to the previous hack that I was using in g-s-d :-(
Comment 7 Rui Matos 2015-03-17 17:18:48 UTC
Pushing after agreement on IRC

Attachment 299511 [details] pushed as 4da2862 - status/keyboard: Add a system settings concept to be used under GDM