[gimp] Bug 794356 - Rulers always shown for subsequent image views



commit ea48b9f31ca3460611530b6a8297386d9acdaf92
Author: Michael Natterer <mitch gimp org>
Date:   Mon Apr 2 22:21:41 2018 +0200

    Bug 794356 - Rulers always shown for subsequent image views
    
    gimp_image_window_constructed(): connect_after to the notebook's
    "switch-page" signal so gimp_display_shell_appearance_update() is
    called after gimp_display_shell_canvas_realize(). Just another hack
    to fix the hack...

 app/display/gimpimagewindow.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 7040e8f..d1f3373 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -478,9 +478,18 @@ gimp_image_window_constructed (GObject *object)
 
   gtk_paned_pack1 (GTK_PANED (private->right_hpane), private->notebook,
                    TRUE, TRUE);
-  g_signal_connect (private->notebook, "switch-page",
-                    G_CALLBACK (gimp_image_window_switch_page),
-                    window);
+
+  /*  HACK: remove with GTK+ 3.x: there is no reason to
+   *  connect_after() here except the HACK at the end of
+   *  gimp_display_shell_canvas_realize().
+   *
+   *  We need to make sure gimp_display_shell_appearance_update() is
+   *  called after realize() so the ill-shown rulers are properly
+   *  hidden again
+   */
+  g_signal_connect_after (private->notebook, "switch-page",
+                          G_CALLBACK (gimp_image_window_switch_page),
+                          window);
   g_signal_connect (private->notebook, "page-removed",
                     G_CALLBACK (gimp_image_window_page_removed),
                     window);


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