gint max_window_size = 100;
gint limit_autofit_size = FALSE;
gint max_autofit_size = 100;
-gint thumb_max_width = 96;
-gint thumb_max_height = 72;
+gint thumb_max_width = DEFAULT_THUMB_WIDTH;
+gint thumb_max_height = DEFAULT_THUMB_HEIGHT;
gint enable_thumb_caching = TRUE;
gint enable_thumb_dirs = FALSE;
gint use_xvpics_thumbnails = TRUE;
#define COLOR_PROFILE_INPUTS 4
+#define DEFAULT_THUMB_WIDTH 96
+#define DEFAULT_THUMB_HEIGHT 72
+
+
#include "typedefs.h"
/*
{
GtkWidget *combo;
gint current;
- gint last_w, last_h;
gint i;
- gint c;
thumb_max_width_c = thumb_max_width;
thumb_max_height_c = thumb_max_height;
combo = gtk_combo_box_new_text();
- last_w = last_h = 0;
current = -1;
- i = 0;
- c = TRUE;
- while (c)
+ for (i = 0; i < sizeof(thumb_size_list) / sizeof(ThumbSize); i++)
{
gint w, h;
+ gchar *buf;
w = thumb_size_list[i].w;
h = thumb_size_list[i].h;
- if ( w > 0 && h > 0)
- {
- gchar *buf;
-
- buf = g_strdup_printf("%d x %d", w, h);
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), buf);
- g_free(buf);
-
- if (w == thumb_max_width && h == thumb_max_height) current = i;
-
- last_w = w;
- last_h = h;
- }
- else
- {
- c = FALSE;
- }
- i++;
+ buf = g_strdup_printf("%d x %d", w, h);
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo), buf);
+ g_free(buf);
+
+ if (w == thumb_max_width && h == thumb_max_height) current = i;
}
if (current == -1)
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), buf);
g_free(buf);
- current = i - 1;
+ current = i;
}
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current);
"enable_thumbnails", value, thumbnails_enabled);
thumb_max_width = read_int_option(f, option,
"thumbnail_width", value, thumb_max_width);
+ if (thumb_max_width < 16) thumb_max_width = 16;
thumb_max_height = read_int_option(f, option,
"thumbnail_height", value, thumb_max_height);
+ if (thumb_max_height < 16) thumb_max_height = 16;
enable_thumb_caching = read_bool_option(f, option,
"cache_thumbnails", value, enable_thumb_caching);
enable_thumb_dirs = read_bool_option(f, option,