summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-view-factory.c11
-rw-r--r--libcaja-private/caja-view-factory.h1
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,