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 687489 - search: add a schema for desktop search providers
search: add a schema for desktop search providers
Status: RESOLVED FIXED
Product: gsettings-desktop-schemas
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gsettings-desktop-schemas-maint
gsettings-desktop-schemas-maint
Depends on:
Blocks: 687490 687491
 
 
Reported: 2012-11-03 03:22 UTC by Cosimo Cecchi
Modified: 2012-11-18 13:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
search: add a schema for desktop search providers (2.72 KB, patch)
2012-11-03 03:22 UTC, Cosimo Cecchi
needs-work Details | Review
search: add a schema for desktop search providers (2.84 KB, patch)
2012-11-07 16:09 UTC, Cosimo Cecchi
committed Details | Review

Comment 1 Cosimo Cecchi 2012-11-03 03:22:27 UTC
Created attachment 227938 [details] [review]
search: add a schema for desktop search providers
Comment 2 Bastien Nocera 2012-11-03 14:00:30 UTC
Review of attachment 227938 [details] [review]:

::: schemas/org.gnome.desktop.search-providers.gschema.xml.in.in
@@ +7,3 @@
+      <_summary>Disable all external search providers</_summary>
+      <_description>
+        Set to true to disable all external search provider programs,

What's considered external vs. internal?

@@ +12,3 @@
+    </key>
+
+    <key name="disable" type="as">

disabled

@@ +25,3 @@
+
+    <key name="sort-order" type="as">
+      <default>['gnome-contacts.desktop', 'gnome-documents.desktop', 'nautilus.desktop']</default>

Why do we need the .desktop suffix?

@@ +31,3 @@
+        the specified order.
+        Results for applications not specified in this list will be displayed
+        before the last item of the list, if it has more than one item.

Why?
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-11-07 00:50:34 UTC
(In reply to comment #2)
> Review of attachment 227938 [details] [review]:
> 
> ::: schemas/org.gnome.desktop.search-providers.gschema.xml.in.in
> @@ +7,3 @@
> +      <_summary>Disable all external search providers</_summary>
> +      <_description>
> +        Set to true to disable all external search provider programs,
> 
> What's considered external vs. internal?

Internal search providers right now are apps, settings, and wanda. It's possible that in the future, this would change to have gnome-control-center shipping a search provider for settings, but I don't know.

> @@ +25,3 @@
> +
> +    <key name="sort-order" type="as">
> +      <default>['gnome-contacts.desktop', 'gnome-documents.desktop',
> 'nautilus.desktop']</default>
> 
> Why do we need the .desktop suffix?

I think it makes it much clearer what we're referring to, although it does bring up a point: what happens if we have on app with two search providers? Right now it's possible for an app to provide potentially many providers.

> @@ +31,3 @@
> +        the specified order.
> +        Results for applications not specified in this list will be displayed
> +        before the last item of the list, if it has more than one item.
> 
> Why?

See the rationale in https://bugzilla.gnome.org/show_bug.cgi?id=687491#c33

I'm not sure if it makes sense to do so (I pointed it out the first time through as well), but I think we have to have *somewhere* to put the newly installed search providers, and "before the last item" makes some amount of sense.
Comment 4 Bastien Nocera 2012-11-07 08:50:30 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Review of attachment 227938 [details] [review] [details]:
> > 
> > ::: schemas/org.gnome.desktop.search-providers.gschema.xml.in.in
> > @@ +7,3 @@
> > +      <_summary>Disable all external search providers</_summary>
> > +      <_description>
> > +        Set to true to disable all external search provider programs,
> > 
> > What's considered external vs. internal?
> 
> Internal search providers right now are apps, settings, and wanda. It's
> possible that in the future, this would change to have gnome-control-center
> shipping a search provider for settings, but I don't know.

If the "internal" search providers are provided by the shell, I'd rather this was mentioned explicitely:
disable-non-shell-providers
And mention which ones are provided by the shell in the comment.

> > @@ +25,3 @@
> > +
> > +    <key name="sort-order" type="as">
> > +      <default>['gnome-contacts.desktop', 'gnome-documents.desktop',
> > 'nautilus.desktop']</default>
> > 
> > Why do we need the .desktop suffix?
> 
> I think it makes it much clearer what we're referring to, although it does
> bring up a point: what happens if we have on app with two search providers?
> Right now it's possible for an app to provide potentially many providers.

Right.

> > @@ +31,3 @@
> > +        the specified order.
> > +        Results for applications not specified in this list will be displayed
> > +        before the last item of the list, if it has more than one item.
> > 
> > Why?
> 
> See the rationale in https://bugzilla.gnome.org/show_bug.cgi?id=687491#c33
> 
> I'm not sure if it makes sense to do so (I pointed it out the first time
> through as well), but I think we have to have *somewhere* to put the newly
> installed search providers, and "before the last item" makes some amount of
> sense.

I don't understand what's supposed to be "the last one". If there's particular search results section that's not sortable and always last, please name it instead.
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-11-07 09:06:03 UTC
(In reply to comment #4)
> I don't understand what's supposed to be "the last one". If there's particular
> search results section that's not sortable and always last, please name it
> instead.

It's not that. It's that users may want a particular search provider to always sort as last, and newly installed search providers (which won't be in the list) need to be placed somewhere in search results. The solution is that all newly installed search providers are assumed to all be placed before the last item, whatever it is, sorted in alphabetical order.
Comment 6 Cosimo Cecchi 2012-11-07 16:09:21 UTC
(In reply to comment #2)

> What's considered external vs. internal?

Everything that is installed by applications in $XDG_DATA_DIR/gnome-shell/search-providers is external. I renamed this to disable-external and added a comment to this effect in the description.

> @@ +12,3 @@
> +    </key>
> +
> +    <key name="disable" type="as">
> 
> disabled

Fixed

> @@ +25,3 @@
> +
> +    <key name="sort-order" type="as">
> +      <default>['gnome-contacts.desktop', 'gnome-documents.desktop',
> 'nautilus.desktop']</default>
> 
> Why do we need the .desktop suffix?

- it's consistent with what we do for other similar settings, e.g. org.gnome.Shell favorite-apps
- it's consistent with the documentation for what a desktop app ID is in GIO (from g_desktop_app_info_new() "A desktop file id is the basename of the desktop file, including the .desktop extension."
- it makes it very convenient for clients to just call g_desktop_app_info_new() with the values contained in the setting

> @@ +31,3 @@
> +        the specified order.
> +        Results for applications not specified in this list will be displayed
> +        before the last item of the list, if it has more than one item.
> 
> Why?

Jasper already explained this, but as I said in the gnome-shell bug, the design calls for being able to pin down one provider to the last position. In the default configuration, that would be Files (but having it as a GSetting means custom distributors can easily override it). Having these semantics also guarantees we don't do anything too bogus when some providers are found in the directory, but not in GSettings.
Comment 7 Cosimo Cecchi 2012-11-07 16:09:37 UTC
Created attachment 228383 [details] [review]
search: add a schema for desktop search providers
Comment 8 Bastien Nocera 2012-11-18 13:13:18 UTC
Attachment 228383 [details] pushed as e10746d - search: add a schema for desktop search providers