Mercurial > geeqie.yaz
diff src/preferences.c @ 413:9e521adbf312
Add two new options to control image read buffer at runtime.
They are available in Preferences > Advanced > Image loading and caching.
Default read buffer size was set to 4096 instead of 512.
These options are saved to rc file.
author | zas_ |
---|---|
date | Fri, 18 Apr 2008 22:15:01 +0000 |
parents | 603206ffa644 |
children | 9fe0ca1b5263 |
line wrap: on
line diff
--- a/src/preferences.c Fri Apr 18 21:53:33 2008 +0000 +++ b/src/preferences.c Fri Apr 18 22:15:01 2008 +0000 @@ -227,6 +227,9 @@ options->collections.rectangular_selection = c_options->collections.rectangular_selection; options->image.tile_cache_max = c_options->image.tile_cache_max; + + options->image.read_buffer_size = c_options->image.read_buffer_size; + options->image.idle_read_loop_count = c_options->image.idle_read_loop_count; options->thumbnails.quality = c_options->thumbnails.quality; options->image.zoom_quality = c_options->image.zoom_quality; @@ -1412,8 +1415,19 @@ pref_spin_new_int(group, _("Custom similarity threshold:"), NULL, 0, 100, 1, options->duplicates_similarity_threshold, &c_options->duplicates_similarity_threshold); + group = pref_group_new(vbox, FALSE, _("Image loading and caching"), GTK_ORIENTATION_VERTICAL); + pref_spin_new_int(group, _("Offscreen cache size (Mb per image):"), NULL, 0, 128, 1, options->image.tile_cache_max, &c_options->image.tile_cache_max); + + pref_spin_new_int(group, _("Image read buffer size (bytes):"), NULL, + IMAGE_LOADER_READ_BUFFER_SIZE_MIN, IMAGE_LOADER_READ_BUFFER_SIZE_MAX, 512, + options->image.read_buffer_size, &c_options->image.read_buffer_size); + + pref_spin_new_int(group, _("Image idle loop read count:"), NULL, + IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX, 1, + options->image.idle_read_loop_count, &c_options->image.idle_read_loop_count); + group = pref_group_new(vbox, FALSE, _("Color profiles"), GTK_ORIENTATION_VERTICAL); #ifndef HAVE_LCMS