diff options
Diffstat (limited to 'src/main.vala')
| -rw-r--r-- | src/main.vala | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/main.vala b/src/main.vala index e619178..1ea1900 100644 --- a/src/main.vala +++ b/src/main.vala @@ -262,9 +262,9 @@ void library_exec(string[] mounts) { message(" PNG : %s, gdk-pixbuf", png ? "yes" : "no"); message(" GIF : %s, gdk-pixbuf", gif ? "yes" : "no"); message(" TIFF : %s, gdk-pixbuf", tiff ? "yes" : "no"); - message(" JPEG XL: %s, gdk-pixbuf, %s meta-data", jxl ? "yes" : "no", can_read_bmff ? "yes" : "no"); - message(" AVIF : %s, gdk-pixbuf, %s meta-data", avif ? "yes" : "no", can_read_bmff ? "yes" : "no"); - message(" HEIF : %s, gdk-pixbuf, %s meta-data", heif ? "yes" : "no", can_read_bmff ? "yes" : "no"); + message(" JPEG XL: %s, gdk-pixbuf, %s meta-data", jxl ? "yes" : "no", can_read_bmff ? "read" : "no"); + message(" AVIF : %s, gdk-pixbuf, %s meta-data", avif ? "yes" : "no", can_read_bmff ? "read" : "no"); + message(" HEIF : %s, gdk-pixbuf, %s meta-data", heif ? "yes" : "no", can_read_bmff ? "read" : "no"); debug("%lf seconds to Gtk.main()", startup_timer.elapsed()); @@ -346,7 +346,16 @@ void dump_metadata (string filename) { void editing_exec(string filename, bool fullscreen) { File initial_file = File.new_for_commandline_arg(filename); - + + if (!initial_file.get_uri().has_prefix("file://")) { + if (!initial_file.get_uri().has_prefix("trash://")) { + initial_file = File.new_for_path(initial_file.get_path()); + } else { + var info = initial_file.query_info("standard::target-uri", FileQueryInfoFlags.NONE); + initial_file = File.new_for_uri(info.get_attribute_as_string("standard::target-uri")); + } + } + // preconfigure units Direct.preconfigure(initial_file); Db.preconfigure(null); @@ -542,7 +551,7 @@ void main(string[] args) { foreach (var arg in args[1:args.length]) { if (LibraryWindow.is_mount_uri_supported(arg)) { mounts += arg; - } else if (is_string_empty(filename) && !arg.contains("://")) { + } else if (is_string_empty(filename)) { filename = arg; } } |
