Mercurial > geeqie
comparison src/view_file_list.c @ 318:b16b9b8979e5
Add a new struct ConfOptions to handle options.
Changes were made among the code to use only one global var
named "options" of type ConfOptions *.
Initialization takes place in new init_options().
author | zas_ |
---|---|
date | Fri, 11 Apr 2008 22:14:36 +0000 |
parents | 9995c5fb202a |
children | 767b53cd9ab7 |
comparison
equal
deleted
inserted
replaced
317:46169c246c51 | 318:b16b9b8979e5 |
---|---|
354 { | 354 { |
355 ViewFileList *vfl = data; | 355 ViewFileList *vfl = data; |
356 GList *list; | 356 GList *list; |
357 | 357 |
358 list = vflist_pop_menu_file_list(vfl); | 358 list = vflist_pop_menu_file_list(vfl); |
359 if (enable_in_place_rename && | 359 if (options->enable_in_place_rename && |
360 list && !list->next && vfl->click_fd) | 360 list && !list->next && vfl->click_fd) |
361 { | 361 { |
362 GtkTreeModel *store; | 362 GtkTreeModel *store; |
363 GtkTreeIter iter; | 363 GtkTreeIter iter; |
364 | 364 |
846 if (sel_fd == cur_fd) return; /* no change */ | 846 if (sel_fd == cur_fd) return; /* no change */ |
847 | 847 |
848 row = g_list_index(vfl->list, sel_fd); | 848 row = g_list_index(vfl->list, sel_fd); |
849 // FIXME sidecar data | 849 // FIXME sidecar data |
850 | 850 |
851 if (sel_fd && enable_read_ahead && row >= 0) | 851 if (sel_fd && options->enable_read_ahead && row >= 0) |
852 { | 852 { |
853 if (row > g_list_index(vfl->list, cur_fd) && | 853 if (row > g_list_index(vfl->list, cur_fd) && |
854 row + 1 < vflist_count(vfl, NULL)) | 854 row + 1 < vflist_count(vfl, NULL)) |
855 { | 855 { |
856 read_ahead_fd = vflist_index_get_data(vfl, row + 1); | 856 read_ahead_fd = vflist_index_get_data(vfl, row + 1); |
1223 | 1223 |
1224 vfl->thumbs_filedata = fd; | 1224 vfl->thumbs_filedata = fd; |
1225 | 1225 |
1226 thumb_loader_free(vfl->thumbs_loader); | 1226 thumb_loader_free(vfl->thumbs_loader); |
1227 | 1227 |
1228 vfl->thumbs_loader = thumb_loader_new(thumb_max_width, thumb_max_height); | 1228 vfl->thumbs_loader = thumb_loader_new(options->thumb_max_width, options->thumb_max_height); |
1229 thumb_loader_set_callbacks(vfl->thumbs_loader, | 1229 thumb_loader_set_callbacks(vfl->thumbs_loader, |
1230 vflist_thumb_done_cb, | 1230 vflist_thumb_done_cb, |
1231 vflist_thumb_error_cb, | 1231 vflist_thumb_error_cb, |
1232 NULL, | 1232 NULL, |
1233 vfl); | 1233 vfl); |
1631 GList *list; | 1631 GList *list; |
1632 | 1632 |
1633 column = gtk_tree_view_get_column(GTK_TREE_VIEW(listview), FILE_COLUMN_THUMB - 1); | 1633 column = gtk_tree_view_get_column(GTK_TREE_VIEW(listview), FILE_COLUMN_THUMB - 1); |
1634 if (!column) return; | 1634 if (!column) return; |
1635 | 1635 |
1636 gtk_tree_view_column_set_fixed_width(column, ((thumb) ? thumb_max_width : 4) + 10); | 1636 gtk_tree_view_column_set_fixed_width(column, ((thumb) ? options->thumb_max_width : 4) + 10); |
1637 | 1637 |
1638 list = gtk_tree_view_column_get_cell_renderers(column); | 1638 list = gtk_tree_view_column_get_cell_renderers(column); |
1639 if (!list) return; | 1639 if (!list) return; |
1640 cell = list->data; | 1640 cell = list->data; |
1641 g_list_free(list); | 1641 g_list_free(list); |
1642 | 1642 |
1643 g_object_set(G_OBJECT(cell), "height", (thumb) ? thumb_max_height : -1, NULL); | 1643 g_object_set(G_OBJECT(cell), "height", (thumb) ? options->thumb_max_height : -1, NULL); |
1644 gtk_tree_view_columns_autosize(GTK_TREE_VIEW(listview)); | 1644 gtk_tree_view_columns_autosize(GTK_TREE_VIEW(listview)); |
1645 } | 1645 } |
1646 | 1646 |
1647 static void vflist_populate_view(ViewFileList *vfl) | 1647 static void vflist_populate_view(ViewFileList *vfl) |
1648 { | 1648 { |