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 639689 - gnome-shell still uses gconf to read some nautilus setting, while nautilus got ported
gnome-shell still uses gconf to read some nautilus setting, while nautilus go...
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-01-16 17:58 UTC by Vincent Untz
Modified: 2011-01-17 17:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
places: Remove obsolete code (6.27 KB, patch)
2011-01-16 19:34 UTC, Florian Müllner
committed Details | Review
places: Port to GSettings (2.82 KB, patch)
2011-01-16 19:34 UTC, Florian Müllner
committed Details | Review
places: Fail gracefully when not using unstable nautilus (1.97 KB, patch)
2011-01-16 19:34 UTC, Florian Müllner
reviewed Details | Review
places: Fail gracefully when not using unstable nautilus (2.31 KB, patch)
2011-01-17 16:52 UTC, Florian Müllner
committed Details | Review

Description Vincent Untz 2011-01-16 17:58:20 UTC
In js/ui/placeDisplay.js, gnome-shell uses gconf to read some nautilus setting. But nautilus got ported to GSettings some time ago.
Comment 1 Florian Müllner 2011-01-16 19:34:24 UTC
Created attachment 178456 [details] [review]
places: Remove obsolete code

The dash no longer contains a places section, so remove the now
unused code.
Comment 2 Florian Müllner 2011-01-16 19:34:34 UTC
Created attachment 178457 [details] [review]
places: Port to GSettings

'Places' follows the nautilus preference of whether the Desktop
should be a separate directory or the home folder should be used.
Nautilus has been ported to GSettings a while ago, so follow suit.
Comment 3 Florian Müllner 2011-01-16 19:34:42 UTC
Created attachment 178458 [details] [review]
places: Fail gracefully when not using unstable nautilus

The latest development version of nautilus has been ported to
GSettings, which we now use as well for the desktop-is-home-dir
preference. Obviously, the required schema is only available if
a recent enough nautilus version is installed. Instead of adding
yet another module to the moduleset, catch the exception and
ignore the preference in case the schema is not available.
Comment 4 Owen Taylor 2011-01-17 16:30:31 UTC
Review of attachment 178457 [details] [review]:

Looks fine
Comment 5 Owen Taylor 2011-01-17 16:33:45 UTC
Review of attachment 178458 [details] [review]:

::: js/ui/placeDisplay.js
@@ +135,3 @@
+                                             this._updateDesktopMenuVisibility));
+        } catch (e) {
+            log('Failed to get settings from Nautilus. Places may not work as expected');

Can you add a comment here that this is to deal with GNOME 3 nautilus not being installed?

As always, I'm not happy with blanket catches like this, but we don't really have an alternative. :-( Would it be better to do?

 try {
    this._settings = 
 } catch (e) {
    log('');
 }

 if (this._settings != null) {
    [...]
 }

to keep the blanket catch (which could catch all sorts of typos, etc,) as narrow as possible?
Comment 6 Owen Taylor 2011-01-17 16:38:36 UTC
Review of attachment 178456 [details] [review]:

Sure
Comment 7 Florian Müllner 2011-01-17 16:52:26 UTC
Created attachment 178529 [details] [review]
places: Fail gracefully when not using unstable nautilus

(In reply to comment #5)
> Review of attachment 178458 [details] [review]:
> Can you add a comment here that this is to deal with GNOME 3 nautilus not being
> installed?

OK.


> As always, I'm not happy with blanket catches like this, but we don't really
> have an alternative. :-(

Well, there is the alternative of adding nautilus to the moduleset ... it's just something that looks like complete overkill for a single preference key.


> Would it be better to do?
> 
>  try {
>     this._settings = 
>  } catch (e) {
>     log('');
>  }
> 
>  if (this._settings != null) {
>     [...]
>  }
> 
> to keep the blanket catch (which could catch all sorts of typos, etc,) as
> narrow as possible?

Sure.
Comment 8 Owen Taylor 2011-01-17 16:57:14 UTC
Review of attachment 178529 [details] [review]:

Looks good (I meant "alternative to doing catch (e)" ... catching exceptions clearly makes sense in many cases - I just wish we had a better way of catching only the exceptions we wanted to catch)
Comment 9 Florian Müllner 2011-01-17 17:04:33 UTC
Attachment 178456 [details] pushed as 89d89ae - places: Remove obsolete code
Attachment 178457 [details] pushed as f91138d - places: Port to GSettings
Attachment 178529 [details] pushed as 26aaecc - places: Fail gracefully when not using unstable nautilus