Don't require applications to accept URIs for recent files
This should not be required, since glib correctly deals with such applications by giving them the local gvfs path, and those applications which do support URIs keep being able to use the URIs in GFiles. Based on original work by Guido Günther <agx@sigxcpu.org>. https://bugzilla.gnome.org/show_bug.cgi?id=601287
This commit is contained in:
parent
af35dea019
commit
ae744bf206
@ -36,8 +36,8 @@ DocInfo.prototype = {
|
|||||||
// shorter in terms of lines of code, we are not doing so
|
// shorter in terms of lines of code, we are not doing so
|
||||||
// because that would duplicate the work of retrieving the
|
// because that would duplicate the work of retrieving the
|
||||||
// mime type.
|
// mime type.
|
||||||
|
let needsUri = Gio.file_new_for_uri(this.uri).get_path() == null;
|
||||||
let appInfo = Gio.app_info_get_default_for_type(this.mimeType, true);
|
let appInfo = Gio.app_info_get_default_for_type(this.mimeType, needsUri);
|
||||||
|
|
||||||
if (appInfo != null) {
|
if (appInfo != null) {
|
||||||
appInfo.launch_uris([this.uri], Main.createAppLaunchContext());
|
appInfo.launch_uris([this.uri], Main.createAppLaunchContext());
|
||||||
|
Loading…
Reference in New Issue
Block a user