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 746509 - Fixes to search panel vs shell interaction
Fixes to search panel vs shell interaction
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: search
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-03-20 07:00 UTC by Giovanni Campagna
Modified: 2015-03-27 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Search: watch for changes to enabled as well (1.19 KB, patch)
2015-03-20 07:00 UTC, Giovanni Campagna
committed Details | Review
Search: read all keys after connecting to change notifications (1.62 KB, patch)
2015-03-20 07:00 UTC, Giovanni Campagna
reviewed Details | Review
Search: use the same settings object for loading search providers (2.12 KB, patch)
2015-03-20 19:59 UTC, Giovanni Campagna
committed Details | Review
AppDisplay: use global settings object (3.16 KB, patch)
2015-03-20 19:59 UTC, Giovanni Campagna
committed Details | Review
ExtensionPrefs: remove unused GSettings object (831 bytes, patch)
2015-03-20 19:59 UTC, Giovanni Campagna
committed Details | Review
Background: add a comment for questionable GSettings usage (1.02 KB, patch)
2015-03-20 19:59 UTC, Giovanni Campagna
committed Details | Review
Magnifier: invert connection to settings changes and initial read (5.28 KB, patch)
2015-03-20 20:00 UTC, Giovanni Campagna
committed Details | Review
status/a11y: invert connection to changes and initial read (4.94 KB, patch)
2015-03-20 20:00 UTC, Giovanni Campagna
committed Details | Review
dash: use global settings instead of own settings object (2.21 KB, patch)
2015-03-20 20:00 UTC, Giovanni Campagna
committed Details | Review
System: remove unused GSettings (1.09 KB, patch)
2015-03-20 20:00 UTC, Giovanni Campagna
committed Details | Review
System: update lock screen at construction (967 bytes, patch)
2015-03-20 20:00 UTC, Giovanni Campagna
committed Details | Review
WorkspacesView: remove unused GSettings (993 bytes, patch)
2015-03-20 20:00 UTC, Giovanni Campagna
committed Details | Review
prefs: connect to changed:: before reading the value of a setting (1.33 KB, patch)
2015-03-20 20:00 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2015-03-20 07:00:25 UTC
The first one might be good to backport to 3.14 too.
Comment 1 Giovanni Campagna 2015-03-20 07:00:28 UTC
Created attachment 299916 [details] [review]
Search: watch for changes to enabled as well

When introducing support for "default disabled" search providers
this part was overlooked, so enabling a default disabled provider
would be ignored until the next login.
Comment 2 Giovanni Campagna 2015-03-20 07:00:31 UTC
Created attachment 299917 [details] [review]
Search: read all keys after connecting to change notifications

In recent glib, change notifications don't actually happen unless all
keys have been read, in an effort to reduce unnecessary dbus
traffic for shortlived GSettings object and avoid AddMatch calls.
But we care about changes here, so make sure we are subscribed.
Comment 3 Florian Müllner 2015-03-20 17:27:55 UTC
Review of attachment 299916 [details] [review]:

LGTM
Comment 4 Florian Müllner 2015-03-20 17:30:30 UTC
Review of attachment 299917 [details] [review]:

::: js/ui/search.js
@@ +429,3 @@
+        // about)
+        for (let key of ['disabled', 'enabled', 'disable-external', 'sort-order'])
+            this._searchSettings.get_value(key);

Ugh, this is ugly. Would it be better to add this._searchSettings as parameter to loadRemoteSearchProviders() and let the reading happen "naturally"?
Comment 5 Giovanni Campagna 2015-03-20 19:59:46 UTC
Created attachment 299987 [details] [review]
Search: use the same settings object for loading search providers

In recent glib, change notifications don't actually happen unless all
keys have been read, in an effort to reduce unnecessary dbus
traffic for shortlived GSettings object and avoid AddMatch calls.
But we care about changes here, so we need to make sure we're
subscribed, and an easy way to do so is to reuse the same object
to watch for changes and to load the active providers at startup.
Comment 6 Giovanni Campagna 2015-03-20 19:59:49 UTC
Created attachment 299988 [details] [review]
AppDisplay: use global settings object

We don't need a different GSettings object for each app or
favorite item.

While it practice it does not change much (AddMatch is still
obviously sent out), it minimally reduces the overhead on
changes, and makes for cleaner code.
Comment 7 Giovanni Campagna 2015-03-20 19:59:54 UTC
Created attachment 299989 [details] [review]
ExtensionPrefs: remove unused GSettings object

Each ExtensionRow has its own
Comment 8 Giovanni Campagna 2015-03-20 19:59:58 UTC
Created attachment 299990 [details] [review]
Background: add a comment for questionable GSettings usage

BackgroundSource relies on Background to watch its own settings.
Add a comment to explain that.
Comment 9 Giovanni Campagna 2015-03-20 20:00:02 UTC
Created attachment 299991 [details] [review]
Magnifier: invert connection to settings changes and initial read

If there is no signal connected to changed for a key, get_value()
will not subscribe to changes.
Comment 10 Giovanni Campagna 2015-03-20 20:00:05 UTC
Created attachment 299992 [details] [review]
status/a11y: invert connection to changes and initial read

If there is no signal connected to changed, get_value() will
not subscribe to notifications and we might miss changes.
Comment 11 Giovanni Campagna 2015-03-20 20:00:09 UTC
Created attachment 299993 [details] [review]
dash: use global settings instead of own settings object

Makes it easier to reason about change notifications
Comment 12 Giovanni Campagna 2015-03-20 20:00:13 UTC
Created attachment 299994 [details] [review]
System: remove unused GSettings
Comment 13 Giovanni Campagna 2015-03-20 20:00:17 UTC
Created attachment 299995 [details] [review]
System: update lock screen at construction

Will make sure that change notifications are enabled by reading
the value at least once
Comment 14 Giovanni Campagna 2015-03-20 20:00:21 UTC
Created attachment 299996 [details] [review]
WorkspacesView: remove unused GSettings
Comment 15 Giovanni Campagna 2015-03-20 20:00:37 UTC
Created attachment 299997 [details] [review]
prefs: connect to changed:: before reading the value of a setting

Otherwise glib might skip registering to change notifications
Comment 16 Giovanni Campagna 2015-03-20 20:02:03 UTC
Sorry I hijacked this bug to clean up GSettings usage. Some of these are real bugs (the keybindings one probably is, at least for some schemas), some probably still work by chance (the magnifier one, on the account that appsettings changes when settings changes, maybe a11y too works?), some are just cleanups.
Comment 17 Florian Müllner 2015-03-20 20:08:17 UTC
Review of attachment 299987 [details] [review]:

OK
Comment 18 Florian Müllner 2015-03-20 20:08:20 UTC
Review of attachment 299988 [details] [review]:

Sure
Comment 19 Florian Müllner 2015-03-20 20:08:23 UTC
Review of attachment 299989 [details] [review]:

Yes
Comment 20 Florian Müllner 2015-03-20 20:09:40 UTC
Review of attachment 299991 [details] [review]:

OK
Comment 21 Florian Müllner 2015-03-20 20:10:13 UTC
Review of attachment 299993 [details] [review]:

Yes
Comment 22 Florian Müllner 2015-03-20 20:11:40 UTC
Review of attachment 299994 [details] [review]:

You should remove now unused SCHEMA consts as well
Comment 23 Florian Müllner 2015-03-20 20:12:57 UTC
Review of attachment 299996 [details] [review]:

OK
Comment 24 Florian Müllner 2015-03-20 20:13:29 UTC
Review of attachment 299995 [details] [review]:

OK
Comment 25 Florian Müllner 2015-03-20 20:14:14 UTC
Review of attachment 299992 [details] [review]:

Sure
Comment 26 Florian Müllner 2015-03-20 20:16:56 UTC
Review of attachment 299997 [details] [review]:

LGTM
Comment 27 Florian Müllner 2015-03-20 20:18:49 UTC
Review of attachment 299990 [details] [review]:

OK
Comment 28 Florian Müllner 2015-03-20 20:27:40 UTC
By the way, given that the vast majority of the patches are cleanups, I don't think this should be on the 3.16 blocker list.
Comment 29 Matthias Clasen 2015-03-20 21:07:03 UTC
yeah, lets take this for 3.16.1
Comment 30 Giovanni Campagna 2015-03-20 21:12:49 UTC
Yeah, this was never meant for 3.16.0, and easy workarounds exist for people who are bitten by this. I just happened to discover it now.
Comment 31 Giovanni Campagna 2015-03-27 20:13:37 UTC
Attachment 299916 [details] pushed as fd6ef48 - Search: watch for changes to enabled as well
Attachment 299987 [details] pushed as 048a14f - Search: use the same settings object for loading search providers
Attachment 299988 [details] pushed as 1f2e53d - AppDisplay: use global settings object
Attachment 299989 [details] pushed as 36d9cc3 - ExtensionPrefs: remove unused GSettings object
Attachment 299990 [details] pushed as 0068098 - Background: add a comment for questionable GSettings usage
Attachment 299991 [details] pushed as bbe4171 - Magnifier: invert connection to settings changes and initial read
Attachment 299992 [details] pushed as 49fe033 - status/a11y: invert connection to changes and initial read
Attachment 299993 [details] pushed as 018025d - dash: use global settings instead of own settings object
Attachment 299994 [details] pushed as e1b575d - System: remove unused GSettings
Attachment 299995 [details] pushed as 8327dbd - System: update lock screen at construction
Attachment 299996 [details] pushed as e87656a - WorkspacesView: remove unused GSettings
Comment 32 Giovanni Campagna 2015-03-27 20:15:52 UTC
Attachment 299997 [details] pushed as a13f906 - prefs: connect to changed:: before reading the value of a setting