diff options
author | Wu Xiaotian <[email protected]> | 2019-07-20 14:58:18 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-08-26 14:21:14 +0200 |
commit | 093aacfeccdb47b6b12b1978dd88243479626398 (patch) | |
tree | 4e03f0d98674e9e3087512ebd07fc220a3cac6c6 /libcaja-private | |
parent | 840f8890e05dab73d9ded916947973032d9d0091 (diff) | |
download | caja-093aacfeccdb47b6b12b1978dd88243479626398.tar.bz2 caja-093aacfeccdb47b6b12b1978dd88243479626398.tar.xz |
Set FmWidgetView is single view.
Diffstat (limited to 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-view-factory.c | 11 | ||||
-rw-r--r-- | libcaja-private/caja-view-factory.h | 1 |
2 files changed, 10 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)); + } } } diff --git a/libcaja-private/caja-view-factory.h b/libcaja-private/caja-view-factory.h index 294c2245..65d9124c 100644 --- a/libcaja-private/caja-view-factory.h +++ b/libcaja-private/caja-view-factory.h @@ -46,6 +46,7 @@ extern "C" { char *error_label; /* The foo view encountered an error. */ char *startup_error_label; /* The foo view encountered an error while starting up. */ char *display_location_label; /* Display this location with the foo view. */ + gboolean single_view; CajaView * (*create) (CajaWindowSlotInfo *slot); /* MATECOMPONENTTODO: More args here */ gboolean (*supports_uri) (const char *uri, |