[gimp] app: Keep canvas in place when image tabs show/hide
- From: Alexia Death <alexiade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Keep canvas in place when image tabs show/hide
- Date: Wed, 4 Jan 2012 20:09:29 +0000 (UTC)
commit c2d26d7e0396546cfc1ca2485065ce903be6a882
Author: Alexia Death <alexiadeath gmail com>
Date: Wed Jan 4 21:56:17 2012 +0200
app: Keep canvas in place when image tabs show/hide
app/display/gimpimagewindow.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index aa5689b..555f7d6 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -1007,14 +1007,17 @@ gimp_image_window_add_shell (GimpImageWindow *window,
private->shells = g_list_append (private->shells, shell);
+ if (g_list_length (private->shells) > 1)
+ {
+ gimp_image_window_keep_canvas_pos (window);
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (private->notebook), TRUE);
+ }
+
tab_label = gimp_image_window_create_tab_label (window, shell);
gtk_notebook_append_page (GTK_NOTEBOOK (private->notebook),
GTK_WIDGET (shell), tab_label);
- if (g_list_length (private->shells) > 1)
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (private->notebook), TRUE);
-
gtk_widget_show (GTK_WIDGET (shell));
}
@@ -1050,7 +1053,10 @@ gimp_image_window_remove_shell (GimpImageWindow *window,
GTK_WIDGET (shell));
if (g_list_length (private->shells) == 1)
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (private->notebook), FALSE);
+ {
+ gimp_image_window_keep_canvas_pos (window);
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (private->notebook), FALSE);
+ }
}
gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]