Revision: 1725
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1725&view=rev
Author:   zas_
Date:     2009-06-04 19:51:20 +0000 (Thu, 04 Jun 2009)

Log Message:
-----------
Add an option to Image preferences to restrict custom border to fullscreen mode 
only. Bug 2798062.

Modified Paths:
--------------
    trunk/src/fullscreen.c
    trunk/src/image.c
    trunk/src/image.h
    trunk/src/img-view.c
    trunk/src/layout.c
    trunk/src/layout_image.c
    trunk/src/options.c
    trunk/src/options.h
    trunk/src/preferences.c
    trunk/src/rcfile.c

Modified: trunk/src/fullscreen.c
===================================================================
--- trunk/src/fullscreen.c      2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/fullscreen.c      2009-06-04 19:51:20 UTC (rev 1725)
@@ -291,11 +291,7 @@
 
        gtk_container_add(GTK_CONTAINER(fs->window), fs->imd->widget);
 
-       if (options->image.use_custom_border_color)
-               {
-               image_background_set_color(fs->imd, 
&options->image.border_color);
-               }
-
+       image_background_set_color_from_options(fs->imd, TRUE);
        image_set_delay_flip(fs->imd, options->fullscreen.clean_flip);
        image_auto_refresh_enable(fs->imd, fs->normal_imd->auto_refresh);
 

Modified: trunk/src/image.c
===================================================================
--- trunk/src/image.c   2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/image.c   2009-06-04 19:51:20 UTC (rev 1725)
@@ -1463,6 +1463,19 @@
        pixbuf_renderer_set_color((PixbufRenderer *)imd->pr, color);
 }
 
+void image_background_set_color_from_options(ImageWindow *imd, gboolean 
fullscreen)
+{
+       GdkColor *color = NULL;
+
+       if (options->image.use_custom_border_color
+           && (!options->image.custom_border_fullscreen_only || fullscreen))
+               {
+               color = &options->image.border_color;
+               }
+
+       image_background_set_color(imd, color);
+}
+
 void image_color_profile_set(ImageWindow *imd,
                             gint input_type,
                             gboolean use_image)

Modified: trunk/src/image.h
===================================================================
--- trunk/src/image.h   2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/image.h   2009-06-04 19:51:20 UTC (rev 1725)
@@ -102,6 +102,7 @@
 
 /* background of image */
 void image_background_set_color(ImageWindow *imd, GdkColor *color);
+void image_background_set_color_from_options(ImageWindow *imd, gboolean 
fullscreen);
 
 /* color profiles */
 void image_color_profile_set(ImageWindow *imd,

Modified: trunk/src/img-view.c
===================================================================
--- trunk/src/img-view.c        2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/img-view.c        2009-06-04 19:51:20 UTC (rev 1725)
@@ -848,7 +848,7 @@
 
        vw->imd = image_new(FALSE);
 
-       image_background_set_color(vw->imd, 
options->image.use_custom_border_color ? &options->image.border_color : NULL);
+       image_background_set_color_from_options(vw->imd, FALSE);
 
        image_attach_window(vw->imd, vw->window, NULL, GQ_APPNAME, TRUE);
 
@@ -1002,8 +1002,8 @@
                {
                ViewWindow *vw = work->data;
                work = work->next;
-
-               image_background_set_color(vw->imd, 
options->image.use_custom_border_color ? &options->image.border_color : NULL);
+               
+               image_background_set_color_from_options(vw->imd, !!vw->fs);
                }
 }
 

Modified: trunk/src/layout.c
===================================================================
--- trunk/src/layout.c  2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/layout.c  2009-06-04 19:51:20 UTC (rev 1725)
@@ -1611,11 +1611,19 @@
        work = layout_window_list;
        while (work)
                {
+               gint i;
                LayoutWindow *lw = work->data;
                work = work->next;
+               
+               if (!lw->image) continue;
 
-               if (!lw->image) continue;
-               image_background_set_color(lw->image, 
options->image.use_custom_border_color ? &options->image.border_color : NULL);
+               for (i = 0; i < MAX_SPLIT_IMAGES; i++)
+                       {
+                       if (!lw->split_images[i]) continue;
+                       
image_background_set_color_from_options(lw->split_images[i], !!lw->full_screen);
+                       }
+               
+               image_background_set_color_from_options(lw->image, 
!!lw->full_screen);
                }
 }
 

Modified: trunk/src/layout_image.c
===================================================================
--- trunk/src/layout_image.c    2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/layout_image.c    2009-06-04 19:51:20 UTC (rev 1725)
@@ -1610,7 +1610,7 @@
                g_signal_connect(G_OBJECT(lw->split_images[i]->pr), 
"update-pixel",
                                 G_CALLBACK(layout_status_update_pixel_cb), lw);
 
-               image_background_set_color(lw->split_images[i], 
options->image.use_custom_border_color ? &options->image.border_color : NULL);
+               image_background_set_color_from_options(lw->split_images[i], 
FALSE);
 
                image_auto_refresh_enable(lw->split_images[i], TRUE);
 

Modified: trunk/src/options.c
===================================================================
--- trunk/src/options.c 2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/options.c 2009-06-04 19:51:20 UTC (rev 1725)
@@ -75,6 +75,7 @@
        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.zoom_2pass = TRUE;
        options->image.zoom_increment = 5;
        options->image.zoom_mode = ZOOM_RESET_NONE;

Modified: trunk/src/options.h
===================================================================
--- trunk/src/options.h 2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/options.h 2009-06-04 19:51:20 UTC (rev 1725)
@@ -68,7 +68,8 @@
                guint zoom_quality;
                gint zoom_increment;    /* 10 is 1.0, 5 is 0.05, 20 is 2.0, 
etc. */
 
-               gint use_custom_border_color;
+               gboolean custom_border_fullscreen_only;
+               gboolean use_custom_border_color;
                GdkColor border_color;
        } image;
 

Modified: trunk/src/preferences.c
===================================================================
--- trunk/src/preferences.c     2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/preferences.c     2009-06-04 19:51:20 UTC (rev 1725)
@@ -314,9 +314,12 @@
 
        options->image.enable_read_ahead = c_options->image.enable_read_ahead;
 
+       
        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
            || !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 = 
c_options->image.use_custom_border_color;
                options->image.border_color = c_options->image.border_color;
                layout_colors_update();
@@ -1333,6 +1336,9 @@
 
        pref_checkbox_new_int(group, _("Custom border color"),
                              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_color_button_new(group, _("Border color"), 
&options->image.border_color,
                              G_CALLBACK(pref_color_button_set_cb), 
&c_options->image.border_color);

Modified: trunk/src/rcfile.c
===================================================================
--- trunk/src/rcfile.c  2009-06-04 16:07:41 UTC (rev 1724)
+++ trunk/src/rcfile.c  2009-06-04 19:51:20 UTC (rev 1725)
@@ -330,6 +330,7 @@
        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_COLOR(*options, image.border_color);
 
 //     WRITE_SUBTITLE("Thumbnails Options");
@@ -613,6 +614,7 @@
                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_COLOR(*options, image.border_color)) continue;
 
                /* thumbnails options */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to