[buoh] Various fixes related to gtk3 port



commit 8d2af951bd6b31ed491a26606139cf0959ad084c
Author: Balló György <ballogyor gmail com>
Date:   Sat Dec 20 00:36:10 2014 +0100

    Various fixes related to gtk3 port
    
    - Don't disable scrollbars, otherwise the window cannot be resized
    - Set the default size of main window
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741798

 data/ui/window.ui     |  4 ++--
 src/buoh-view-comic.c | 33 ---------------------------------
 2 files changed, 2 insertions(+), 35 deletions(-)
---
diff --git a/data/ui/window.ui b/data/ui/window.ui
index c6b1468..315acf1 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -3,8 +3,8 @@
 <interface>
   <requires lib="gtk+" version="3.20"/>
   <template class="BuohWindow" parent="GtkApplicationWindow">
-    <property name="default-width">600</property>
-    <property name="default-height">300</property>
+    <property name="default-width">800</property>
+    <property name="default-height">400</property>
     <property name="title" translatable="yes">Buoh</property>
     <property name="icon-name">buoh</property>
     <child>
diff --git a/src/buoh-view-comic.c b/src/buoh-view-comic.c
index c80ede4..c995f63 100644
--- a/src/buoh-view-comic.c
+++ b/src/buoh-view-comic.c
@@ -98,7 +98,6 @@ static void     buoh_view_comic_prepare_load          (BuohViewComic    *c_view)
 static void     buoh_view_comic_load_finished         (BuohViewComic    *c_view,
                                                        gpointer          gdata);
 static void     buoh_view_comic_load                  (BuohViewComic    *c_view);
-static void     buoh_view_comic_update_scrollbar_policy (BuohViewComic  *c_view);
 static gdouble  buoh_view_comic_get_scale_for_width   (BuohViewComic    *c_view,
                                                        gint              width);
 static gdouble  buoh_view_comic_get_scale_for_height  (BuohViewComic    *c_view,
@@ -229,7 +228,6 @@ buoh_view_comic_set_property (GObject      *object,
                 break;
         case PROP_ZOOM_MODE:
                 c_view->zoom_mode = g_value_get_enum (value);
-                buoh_view_comic_update_scrollbar_policy (c_view);
 
                 break;
         case PROP_SCALE:
@@ -550,8 +548,6 @@ buoh_view_comic_prepare_load (BuohViewComic *c_view)
         gtk_adjustment_set_value (hadjustment, 0.0);
         gtk_adjustment_set_value (vadjustment, 0.0);
 
-        buoh_view_comic_update_scrollbar_policy (c_view);
-
         if (gtk_widget_get_realized (GTK_WIDGET (c_view))) {
                 gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (c_view)),
                                        NULL);
@@ -763,35 +759,6 @@ buoh_view_comic_load (BuohViewComic *c_view)
         }
 }
 
-static void
-buoh_view_comic_update_scrollbar_policy (BuohViewComic *c_view)
-{
-        GtkWidget *swindow;
-
-        swindow = gtk_widget_get_parent (GTK_WIDGET (c_view));
-        if (!GTK_IS_SCROLLED_WINDOW (swindow)) {
-                return;
-        }
-
-        switch (c_view->zoom_mode) {
-        case VIEW_ZOOM_FREE:
-                gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
-                                                GTK_POLICY_AUTOMATIC,
-                                                GTK_POLICY_AUTOMATIC);
-                break;
-        case VIEW_ZOOM_FIT_WIDTH:
-                gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
-                                                GTK_POLICY_NEVER,
-                                                GTK_POLICY_AUTOMATIC);
-                break;
-        case VIEW_ZOOM_BEST_FIT:
-                gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
-                                                GTK_POLICY_NEVER,
-                                                GTK_POLICY_NEVER);
-                break;
-        }
-}
-
 static gdouble
 buoh_view_comic_get_scale_for_width (BuohViewComic *c_view,
                                      gint           width)


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