the options for custom border color were made independent
authorVladimir Nadvornik <nadvornik@suse.cz>
Sat, 13 Jun 2009 19:26:32 +0000 (19:26 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Sat, 13 Jun 2009 19:26:32 +0000 (19:26 +0000)
src/image.c
src/options.c
src/options.h
src/preferences.c
src/rcfile.c

index 6012a46..6c6fad2 100644 (file)
@@ -1474,8 +1474,8 @@ void image_background_set_color_from_options(ImageWindow *imd, gboolean fullscre
 {
        GdkColor *color = NULL;
 
-       if (options->image.use_custom_border_color
-           && (!options->image.custom_border_fullscreen_only || fullscreen))
+       if ((options->image.use_custom_border_color && !fullscreen) ||
+           (options->image.use_custom_border_color_in_fullscreen && fullscreen))
                {
                color = &options->image.border_color;
                }
index dbe3867..4d709f6 100644 (file)
@@ -75,7 +75,7 @@ ConfOptions *init_options(ConfOptions *options)
        options->image.tile_cache_max = 10;
        options->image.image_cache_max = 128; /* 4 x 10MPix */
        options->image.use_custom_border_color = FALSE;
-       options->image.custom_border_fullscreen_only = FALSE;
+       options->image.use_custom_border_color_in_fullscreen = TRUE;
        options->image.zoom_2pass = TRUE;
        options->image.zoom_increment = 5;
        options->image.zoom_mode = ZOOM_RESET_NONE;
index e3f596b..b9a308a 100644 (file)
@@ -68,7 +68,7 @@ struct _ConfOptions
                guint zoom_quality;
                gint zoom_increment;    /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
 
-               gboolean custom_border_fullscreen_only;
+               gboolean use_custom_border_color_in_fullscreen;
                gboolean use_custom_border_color;
                GdkColor border_color;
        } image;
index 05039a0..46bf3fc 100644 (file)
@@ -316,10 +316,10 @@ static void config_window_apply(void)
 
        
        if (options->image.use_custom_border_color != c_options->image.use_custom_border_color
-           || options->image.custom_border_fullscreen_only != c_options->image.custom_border_fullscreen_only
+           || options->image.use_custom_border_color_in_fullscreen != c_options->image.use_custom_border_color_in_fullscreen
            || !gdk_color_equal(&options->image.border_color, &c_options->image.border_color))
                {
-               options->image.custom_border_fullscreen_only = c_options->image.custom_border_fullscreen_only;
+               options->image.use_custom_border_color_in_fullscreen = c_options->image.use_custom_border_color_in_fullscreen;
                options->image.use_custom_border_color = c_options->image.use_custom_border_color;
                options->image.border_color = c_options->image.border_color;
                layout_colors_update();
@@ -1334,11 +1334,11 @@ static void config_tab_image(GtkWidget *notebook)
 
        group = pref_group_new(vbox, FALSE, _("Appearance"), GTK_ORIENTATION_VERTICAL);
 
-       pref_checkbox_new_int(group, _("Custom border color"),
+       pref_checkbox_new_int(group, _("Use custom border color in window mode"),
                              options->image.use_custom_border_color, &c_options->image.use_custom_border_color);
        
-       pref_checkbox_new_int(group, _("Apply custom border to fullscreen mode only"),
-                             options->image.custom_border_fullscreen_only, &c_options->image.custom_border_fullscreen_only);
+       pref_checkbox_new_int(group, _("Use custom border color in fullscreen mode"),
+                             options->image.use_custom_border_color_in_fullscreen, &c_options->image.use_custom_border_color_in_fullscreen);
 
        pref_color_button_new(group, _("Border color"), &options->image.border_color,
                              G_CALLBACK(pref_color_button_set_cb), &c_options->image.border_color);
index 7dc7229..39b4f26 100644 (file)
@@ -330,7 +330,7 @@ static void write_global_attributes(GString *outstr, gint indent)
        WRITE_NL(); WRITE_BOOL(*options, image.enable_read_ahead);
        WRITE_NL(); WRITE_BOOL(*options, image.exif_rotate_enable);
        WRITE_NL(); WRITE_BOOL(*options, image.use_custom_border_color);
-       WRITE_NL(); WRITE_BOOL(*options, image.custom_border_fullscreen_only);
+       WRITE_NL(); WRITE_BOOL(*options, image.use_custom_border_color_in_fullscreen);
        WRITE_NL(); WRITE_COLOR(*options, image.border_color);
 
 //     WRITE_SUBTITLE("Thumbnails Options");
@@ -614,7 +614,7 @@ static gboolean load_global_params(const gchar **attribute_names, const gchar **
                if (READ_BOOL(*options, image.enable_read_ahead)) continue;
                if (READ_BOOL(*options, image.exif_rotate_enable)) continue;
                if (READ_BOOL(*options, image.use_custom_border_color)) continue;
-               if (READ_BOOL(*options, image.custom_border_fullscreen_only)) continue;
+               if (READ_BOOL(*options, image.use_custom_border_color_in_fullscreen)) continue;
                if (READ_COLOR(*options, image.border_color)) continue;
 
                /* thumbnails options */