[gthumb] return the vfs file source if the scheme is not handled by other sources



commit 87336b663e51d1c189680d489c979147fd00cc77
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Mar 1 20:55:04 2020 +0100

    return the vfs file source if the scheme is not handled by other sources

 gthumb/gth-main.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gthumb/gth-main.c b/gthumb/gth-main.c
index 3b235c0b..a4f81781 100644
--- a/gthumb/gth-main.c
+++ b/gthumb/gth-main.c
@@ -27,6 +27,7 @@
 #include <gobject/gvaluecollector.h>
 #include "glib-utils.h"
 #include "gth-duplicable.h"
+#include "gth-file-source-vfs.h"
 #include "gth-filter.h"
 #include "gth-main.h"
 #include "gth-metadata-provider.h"
@@ -254,13 +255,8 @@ gth_main_get_file_source_for_uri (const char *uri)
                }
        }
 
-       if ((file_source == NULL) && ! g_str_has_prefix (uri, "vfs+")) {
-               char *vfs_uri;
-
-               vfs_uri = g_strconcat ("vfs+", uri, NULL);
-               file_source = gth_main_get_file_source_for_uri (vfs_uri);
-               g_free (vfs_uri);
-       }
+       if (file_source == NULL)
+               file_source = g_object_new (GTH_TYPE_FILE_SOURCE_VFS, NULL);
 
        return file_source;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]