vfs.File.launch() doesn't try to mount a remote location

Bug #625377 reported by onox on 2010-08-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Desktop Agnostic Library for GLib-based Projects
Undecided
Unassigned

Bug Description

vfs.File.launch() doesn't try to mount a remote location. It just fails with a GError saying: The specified location is not mounted.

xdg (python-xdg) seems to mount it before launching the location.

Bzr revision 409 of mhr3's lda-various-fixes branch.

onox (onox) on 2010-08-27
description: updated
tags: added: feature-request
onox (onox) wrote :

Mounting could be something like this:

def mount_result(volume2, result):
    try:
        if volume2.mount_finish(result):
            uri = volume2.get_mount().get_root().get_uri()
            self.open_uri(uri)
    except glib.GError, e:
        error_dialog = self.UnableToMountErrorDialog(self.applet, volume2.get_name(), e)
        error_dialog.show_all()
volume.mount(gio.MountOperation(), mount_result)

This mounts a volume. For uris, not sure what should be used, perhaps gio.File.mount_enclosing_volume.

One could decide to remove the try-except block and just let the glib.GError propagate to higher levels. If lda shows an error dialog, it would be nice if it looks like the one from nautilus or yama.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers