[gimp] app: Fix menubar suddently stopping to work when toggling window modes
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: Fix menubar suddently stopping to work when toggling window modes
- Date: Wed, 6 Jan 2010 13:49:21 +0000 (UTC)
commit f1bbb2c70a7afe635c2a1fea7e7b86f3ad8f8c88
Author: Martin Nordholts <martinn src gnome org>
Date: Wed Jan 6 14:49:13 2010 +0100
app: Fix menubar suddently stopping to work when toggling window modes
The image window must not disconnect from the active shell when any
page is removed, only when the active page is removed. This fixes the
bug with this step-by-step:
1. Start GIMP with a clean gimpdir
2. Create two windows
3. Enable single-window mode
4. Disable single-window mode
5. Try to execute a menu action, e.g. Select -> Invert, on both images
Expected result:
It works
Actual result:
It won't work in the image window that was reused and thus once had
two notebook pages, since it disconnected from page 1 when page 2 was
removed.
Also add some debug output.
app/display/gimpimagewindow.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 0af2339..26b5018 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -1133,6 +1133,8 @@ gimp_image_window_switch_page (GtkNotebook *notebook,
gimp_image_window_disconnect_from_active_shell (window);
+ GIMP_LOG (WM, "GimpImageWindow %p, private->active_shell = %p; \n",
+ window, shell);
private->active_shell = shell;
active_display = private->active_shell->display;
@@ -1174,9 +1176,13 @@ gimp_image_window_page_removed (GtkNotebook *notebook,
{
GimpImageWindowPrivate *private = GIMP_IMAGE_WINDOW_GET_PRIVATE (window);
- gimp_image_window_disconnect_from_active_shell (window);
-
- private->active_shell = NULL;
+ if (GTK_WIDGET (private->active_shell) == widget)
+ {
+ GIMP_LOG (WM, "GimpImageWindow %p, private->active_shell = %p; \n",
+ window, NULL);
+ gimp_image_window_disconnect_from_active_shell (window);
+ private->active_shell = NULL;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]