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]>2022-07-20 21:40:42 +0200
commit67eea2e0711ec51b919c9abcdde0f0abc4071538 (patch)
treea5ae264caf4dc1e79c4190d16901d0619e6ab342 /src/caja-view-as-action.c
parent89b26e091b4a1a46c1c238820af116a97b98b178 (diff)
downloadcaja-67eea2e0711ec51b919c9abcdde0f0abc4071538.tar.bz2
caja-67eea2e0711ec51b919c9abcdde0f0abc4071538.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 f6040205..8437fcf9 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));