Revert "Bug 794356 - Rulers always shown for subsequent image views"

This reverts commit 7230d5d777.
Remove GTK+2 only hack.
This commit is contained in:
Jehan 2018-05-02 01:23:54 +02:00 committed by Michael Natterer
parent b28228d911
commit 654ef12d58
4 changed files with 11 additions and 22 deletions

View File

@ -129,20 +129,6 @@ gimp_display_shell_canvas_realize (GtkWidget *canvas,
gtk_widget_show (shell->vrule);
}
void
gimp_display_shell_canvas_realize_after (GtkWidget *canvas,
GimpDisplayShell *shell)
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
/* HACK: see above: must go with GTK+ 3.x too. Restore the rulers'
* intended visibility again.
*/
gimp_image_window_suspend_keep_pos (window);
gimp_display_shell_appearance_update (shell);
gimp_image_window_resume_keep_pos (window);
}
void
gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
GtkAllocation *allocation,

View File

@ -21,8 +21,6 @@
void gimp_display_shell_canvas_realize (GtkWidget *widget,
GimpDisplayShell *shell);
void gimp_display_shell_canvas_realize_after (GtkWidget *widget,
GimpDisplayShell *shell);
void gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
GtkAllocation *alloc,
GimpDisplayShell *shell);

View File

@ -591,9 +591,6 @@ gimp_display_shell_constructed (GObject *object)
g_signal_connect (shell->canvas, "realize",
G_CALLBACK (gimp_display_shell_canvas_realize),
shell);
g_signal_connect (shell->canvas, "realize",
G_CALLBACK (gimp_display_shell_canvas_realize_after),
shell);
g_signal_connect (shell->canvas, "size-allocate",
G_CALLBACK (gimp_display_shell_canvas_size_allocate),
shell);

View File

@ -467,9 +467,17 @@ 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);