summaryrefslogtreecommitdiff
path: root/src/caja-view-as-action.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-07-20 22:59:42 +0800
committerraveit65 <[email protected]>2019-08-26 14:21:14 +0200
commit35876a8ad959dac4561e0c0fc753cb303c9c6283 (patch)
treef93a88a9abb2d7db89948ed8c51191e46015f283 /src/caja-view-as-action.c
parent9114911ff3350c7e11fe44ef52c36b095dacd5b5 (diff)
downloadcaja-35876a8ad959dac4561e0c0fc753cb303c9c6283.tar.bz2
caja-35876a8ad959dac4561e0c0fc753cb303c9c6283.tar.xz
add CajaWidgetViewProvider docs
Diffstat (limited to 'src/caja-view-as-action.c')
-rw-r--r--src/caja-view-as-action.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/caja-view-as-action.c b/src/caja-view-as-action.c
index 4c1a7d4b..27e70be2 100644
--- a/src/caja-view-as-action.c
+++ b/src/caja-view-as-action.c
@@ -145,6 +145,12 @@ view_as_changed_callback (CajaWindow *window,
}
}
g_object_set_data (G_OBJECT (combo_box), "num viewers", GINT_TO_POINTER (index));
+
+ if (g_list_length (window->details->short_list_viewers) == 1)
+ {
+ selected_index = 0;
+ }
+
if (selected_index == -1)
{
const char *id;
@@ -156,7 +162,6 @@ view_as_changed_callback (CajaWindow *window,
_(info->view_combo_label));
selected_index = index;
}
-
gtk_combo_box_set_active (combo_box, selected_index);
if (g_list_length (window->details->short_list_viewers) == 1) {
gtk_widget_hide(GTK_WIDGET(combo_box));