[gthumb] image viewer: always use a dark background



commit 01ce419357eb432e0a61b454707e0c5e44caec17
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Mar 24 13:20:44 2013 +0100

    image viewer: always use a dark background

 data/org.gnome.gthumb.image-viewer.gschema.xml.in |    4 --
 extensions/image_viewer/gth-image-viewer-page.c   |   34 +-------------------
 extensions/image_viewer/preferences.h             |    1 -
 gthumb/gth-image-viewer.c                         |    8 ++--
 4 files changed, 6 insertions(+), 41 deletions(-)
---
diff --git a/data/org.gnome.gthumb.image-viewer.gschema.xml.in 
b/data/org.gnome.gthumb.image-viewer.gschema.xml.in
index 85c8d89..a27bd26 100644
--- a/data/org.gnome.gthumb.image-viewer.gschema.xml.in
+++ b/data/org.gnome.gthumb.image-viewer.gschema.xml.in
@@ -39,10 +39,6 @@
     <key name="check-size" enum="org.gnome.gthumb.GthCheckSize">
       <default>'medium'</default>
     </key>
-    <key name="black-background" type="b">
-      <default>true</default>
-      <_description>Whether to always use a black background.</_description>
-    </key>
   </schema>
 
 </schemalist>
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index fae4371..0b2b542 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -518,19 +518,6 @@ pref_check_size_changed (GSettings *settings,
 
 
 static void
-pref_black_background_changed (GSettings *settings,
-                              char      *key,
-                              gpointer   user_data)
-{
-       GthImageViewerPage *self = user_data;
-
-       gth_image_viewer_set_black_background (GTH_IMAGE_VIEWER (self->priv->viewer),
-                                              g_settings_get_boolean (self->priv->settings, 
PREF_IMAGE_VIEWER_BLACK_BACKGROUND));
-       gtk_widget_queue_draw (self->priv->viewer);
-}
-
-
-static void
 pref_reset_scrollbars_changed (GSettings *settings,
                               char      *key,
                               gpointer   user_data)
@@ -727,8 +714,6 @@ gth_image_viewer_page_real_activate (GthViewerPage *base,
                                         g_settings_get_enum (self->priv->settings, 
PREF_IMAGE_VIEWER_CHECK_TYPE));
        gth_image_viewer_set_check_size (GTH_IMAGE_VIEWER (self->priv->viewer),
                                         g_settings_get_enum (self->priv->settings, 
PREF_IMAGE_VIEWER_CHECK_SIZE));
-       gth_image_viewer_set_black_background (GTH_IMAGE_VIEWER (self->priv->viewer),
-                                              g_settings_get_boolean (self->priv->settings, 
PREF_IMAGE_VIEWER_BLACK_BACKGROUND));
        gth_image_viewer_set_reset_scrollbars (GTH_IMAGE_VIEWER (self->priv->viewer),
                                               g_settings_get_boolean (self->priv->settings, 
PREF_IMAGE_VIEWER_RESET_SCROLLBARS));
 
@@ -796,10 +781,6 @@ gth_image_viewer_page_real_activate (GthViewerPage *base,
                          G_CALLBACK (pref_check_size_changed),
                          self);
        g_signal_connect (self->priv->settings,
-                         "changed::" PREF_IMAGE_VIEWER_BLACK_BACKGROUND,
-                         G_CALLBACK (pref_black_background_changed),
-                         self);
-       g_signal_connect (self->priv->settings,
                          "changed::" PREF_IMAGE_VIEWER_RESET_SCROLLBARS,
                          G_CALLBACK (pref_reset_scrollbars_changed),
                          self);
@@ -973,19 +954,8 @@ static void
 gth_image_viewer_page_real_fullscreen (GthViewerPage *base,
                                       gboolean       active)
 {
-       GthImageViewerPage *self;
-
-       self = (GthImageViewerPage *) base;
-
-       if (active) {
-               gth_image_navigator_set_automatic_scrollbars (GTH_IMAGE_NAVIGATOR 
(self->priv->image_navigator), FALSE);
-               gth_image_viewer_set_black_background (GTH_IMAGE_VIEWER (self->priv->viewer), TRUE);
-       }
-       else {
-               gth_image_navigator_set_automatic_scrollbars (GTH_IMAGE_NAVIGATOR 
(self->priv->image_navigator), TRUE);
-               gth_image_viewer_set_black_background (GTH_IMAGE_VIEWER (self->priv->viewer),
-                                                      g_settings_get_boolean (self->priv->settings, 
PREF_IMAGE_VIEWER_BLACK_BACKGROUND));
-       }
+       GthImageViewerPage *self = GTH_IMAGE_VIEWER_PAGE (base);
+       gth_image_navigator_set_automatic_scrollbars (GTH_IMAGE_NAVIGATOR (self->priv->image_navigator), ! 
active);
 }
 
 
diff --git a/extensions/image_viewer/preferences.h b/extensions/image_viewer/preferences.h
index 27bc1c9..0760e0b 100644
--- a/extensions/image_viewer/preferences.h
+++ b/extensions/image_viewer/preferences.h
@@ -36,7 +36,6 @@
 #define PREF_IMAGE_VIEWER_RESET_SCROLLBARS  "reset-scrollbars"
 #define PREF_IMAGE_VIEWER_CHECK_TYPE        "check-type"
 #define PREF_IMAGE_VIEWER_CHECK_SIZE        "check-size"
-#define PREF_IMAGE_VIEWER_BLACK_BACKGROUND  "black-background"
 
 void image_viewer__dlg_preferences_construct_cb (GtkWidget  *dialog,
                                                 GthBrowser *browser,
diff --git a/gthumb/gth-image-viewer.c b/gthumb/gth-image-viewer.c
index 4327774..f47b94d 100644
--- a/gthumb/gth-image-viewer.c
+++ b/gthumb/gth-image-viewer.c
@@ -1527,9 +1527,9 @@ gth_image_viewer_init (GthImageViewer *self)
        self->priv->play_animation = TRUE;
        self->priv->cursor_visible = TRUE;
 
-       self->priv->frame_visible = TRUE;
-       self->priv->frame_border = GTH_IMAGE_VIEWER_FRAME_BORDER;
-       self->priv->frame_border2 = GTH_IMAGE_VIEWER_FRAME_BORDER2;
+       self->priv->frame_visible = FALSE;
+       self->priv->frame_border = 0;
+       self->priv->frame_border2 = 0;
 
        self->priv->anim_id = 0;
        self->priv->iter = NULL;
@@ -1552,7 +1552,7 @@ gth_image_viewer_init (GthImageViewer *self)
        self->priv->double_click = FALSE;
        self->priv->just_focused = FALSE;
 
-       self->priv->black_bg = FALSE;
+       self->priv->black_bg = TRUE;
 
        self->priv->cursor = NULL;
        self->priv->cursor_void = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]