summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-view-factory.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-07-20 14:58:18 +0800
committerraveit65 <[email protected]>2019-08-26 14:21:14 +0200
commit093aacfeccdb47b6b12b1978dd88243479626398 (patch)
tree4e03f0d98674e9e3087512ebd07fc220a3cac6c6 /libcaja-private/caja-view-factory.c
parent840f8890e05dab73d9ded916947973032d9d0091 (diff)
downloadcaja-093aacfeccdb47b6b12b1978dd88243479626398.tar.bz2
caja-093aacfeccdb47b6b12b1978dd88243479626398.tar.xz
Set FmWidgetView is single view.
Diffstat (limited to 'libcaja-private/caja-view-factory.c')
-rw-r--r--libcaja-private/caja-view-factory.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libcaja-private/caja-view-factory.c b/libcaja-private/caja-view-factory.c
index abe291c1..e5e4219f 100644
--- a/libcaja-private/caja-view-factory.c
+++ b/libcaja-private/caja-view-factory.c
@@ -1,4 +1,4 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
+/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4 -*-
caja-view-factory.c: register and create CajaViews
@@ -116,7 +116,14 @@ caja_view_factory_get_views_for_uri (const char *uri,
if (view_info->supports_uri (uri, file_type, mime_type))
{
- res = g_list_prepend (res, g_strdup (view_info->id));
+ if (view_info->single_view)
+ {
+ g_list_free_full (res, g_free);
+ res = g_list_prepend (NULL, g_strdup (view_info->id));
+ break;
+ } else {
+ res = g_list_prepend (res, g_strdup (view_info->id));
+ }
}
}