Mercurial > geeqie
diff src/cache_maint.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 | d1f74154463e |
children | 767b53cd9ab7 |
line wrap: on
line diff
--- a/src/cache_maint.c Fri Apr 11 20:35:37 2008 +0000 +++ b/src/cache_maint.c Fri Apr 11 22:14:36 2008 +0000 @@ -547,7 +547,8 @@ } g_free(base); - if (enable_thumb_caching && thumbnail_spec_standard) thumb_std_maint_moved(src, dest); + if (options->enable_thumb_caching && options->thumbnail_spec_standard) + thumb_std_maint_moved(src, dest); } static void cache_file_remove(const gchar *path) @@ -574,7 +575,8 @@ cache_file_remove(buf); g_free(buf); - if (enable_thumb_caching && thumbnail_spec_standard) thumb_std_maint_removed(fd->path); + if (options->enable_thumb_caching && options->thumbnail_spec_standard) + thumb_std_maint_removed(fd->path); } void cache_maint_copied(FileData *fd) @@ -738,7 +740,7 @@ path = cd->list->data; cd->list = g_list_remove(cd->list, path); - cd->tl = (ThumbLoaderStd *)thumb_loader_new(thumb_max_width, thumb_max_height); + cd->tl = (ThumbLoaderStd *)thumb_loader_new(options->thumb_max_width, options->thumb_max_height); thumb_loader_set_callbacks((ThumbLoader *)cd->tl, cache_manager_render_thumb_done_cb, cache_manager_render_thumb_done_cb, @@ -849,7 +851,7 @@ pref_checkbox_new_int(cd->group, _("Include subfolders"), FALSE, &cd->recurse); button = pref_checkbox_new_int(cd->group, _("Store thumbnails local to source images"), FALSE, &cd->local); - gtk_widget_set_sensitive(button, thumbnail_spec_standard); + gtk_widget_set_sensitive(button, options->thumbnail_spec_standard); pref_line(cd->gd->vbox, PREF_PAD_SPACE); hbox = pref_box_new(cd->gd->vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);