DEBUG_NAME(box_folders);
gtk_box_pack_start(GTK_BOX(box), box_folders, TRUE, TRUE, 0);
- lw->vd = vd_new(lw->options.dir_view_type, lw->dir_fd);
- vd_set_layout(lw->vd, lw);
+ lw->vd = vd_new(lw);
+
vd_set_select_func(lw->vd, layout_vd_select_cb, lw);
lw->dir_view = lw->vd->widget;
layout_style_set(lw, -1, NULL);
}
+void layout_views_set_sort(LayoutWindow *lw, SortType method, gboolean ascend)
+{
+ if (!layout_valid(&lw)) return;
+
+ if (lw->options.dir_view_list_sort.method == method && lw->options.dir_view_list_sort.ascend == ascend) return;
+
+ lw->options.dir_view_list_sort.method = method;
+ lw->options.dir_view_list_sort.ascend = ascend;
+
+ layout_style_set(lw, -1, NULL);
+}
+
gboolean layout_views_get(LayoutWindow *lw, DirViewType *dir_view_type, FileViewType *file_view_type)
{
if (!layout_valid(&lw)) return FALSE;
WRITE_NL(); WRITE_CHAR(*layout, order);
WRITE_NL(); WRITE_UINT(*layout, dir_view_type);
WRITE_NL(); WRITE_UINT(*layout, file_view_type);
+ WRITE_NL(); WRITE_UINT(*layout, dir_view_list_sort.method);
+ WRITE_NL(); WRITE_BOOL(*layout, dir_view_list_sort.ascend);
WRITE_NL(); WRITE_BOOL(*layout, show_marks);
WRITE_NL(); WRITE_BOOL(*layout, show_file_filter);
WRITE_NL(); WRITE_BOOL(*layout, show_thumbnails);
if (READ_UINT(*layout, dir_view_type)) continue;
if (READ_UINT(*layout, file_view_type)) continue;
+ if (READ_UINT(*layout, dir_view_list_sort.method)) continue;
+ if (READ_BOOL(*layout, dir_view_list_sort.ascend)) continue;
if (READ_BOOL(*layout, show_marks)) continue;
if (READ_BOOL(*layout, show_file_filter)) continue;
if (READ_BOOL(*layout, show_thumbnails)) continue;