[gimp] Keep the main_vbox around in the GimpImageWindow struct (temp hack)



commit 18234941223c4afa13f15201d7c53fe63327e01f
Author: Michael Natterer <mitch gimp org>
Date:   Wed Sep 23 15:46:44 2009 +0200

    Keep the main_vbox around in the GimpImageWindow struct (temp hack)

 app/display/gimpdisplayshell.c |   14 +++++---------
 app/display/gimpimagewindow.c  |    4 ++++
 app/display/gimpimagewindow.h  |    2 ++
 3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index 99b2f0e..730a061 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -855,7 +855,6 @@ gimp_display_shell_new (GimpDisplay       *display,
   GimpDisplayShell      *shell;
   GimpDisplayOptions    *options;
   GimpColorDisplayStack *filter;
-  GtkWidget             *main_vbox;
   GtkWidget             *disp_vbox;
   GtkWidget             *upper_hbox;
   GtkWidget             *right_vbox;
@@ -997,9 +996,6 @@ gimp_display_shell_new (GimpDisplay       *display,
 
   /*  the vbox containing all widgets  */
 
-  main_vbox = gtk_vbox_new (FALSE, 0);
-  gtk_container_add (GTK_CONTAINER (shell), main_vbox);
-
 #ifndef GDK_WINDOWING_QUARTZ
   shell->menubar =
     gtk_ui_manager_get_widget (GTK_UI_MANAGER (shell->menubar_manager),
@@ -1008,7 +1004,8 @@ gimp_display_shell_new (GimpDisplay       *display,
 
   if (shell->menubar)
     {
-      gtk_box_pack_start (GTK_BOX (main_vbox), shell->menubar, FALSE, FALSE, 0);
+      gtk_box_pack_start (GTK_BOX (GIMP_IMAGE_WINDOW (shell)->main_vbox),
+                          shell->menubar, FALSE, FALSE, 0);
 
       if (options->show_menubar)
         gtk_widget_show (shell->menubar);
@@ -1036,7 +1033,8 @@ gimp_display_shell_new (GimpDisplay       *display,
 
   /*  another vbox for everything except the statusbar  */
   disp_vbox = gtk_vbox_new (FALSE, 1);
-  gtk_box_pack_start (GTK_BOX (main_vbox), disp_vbox, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (GIMP_IMAGE_WINDOW (shell)->main_vbox),
+                      disp_vbox, TRUE, TRUE, 0);
   gtk_widget_show (disp_vbox);
 
   /*  a hbox for the inner_table and the vertical scrollbar  */
@@ -1284,7 +1282,7 @@ gimp_display_shell_new (GimpDisplay       *display,
   gtk_box_pack_start (GTK_BOX (lower_hbox),
                       shell->nav_ebox, FALSE, FALSE, 0);
 
-  gtk_box_pack_end (GTK_BOX (main_vbox),
+  gtk_box_pack_end (GTK_BOX (GIMP_IMAGE_WINDOW (shell)->main_vbox),
                     shell->statusbar, FALSE, FALSE, 0);
 
   /*  show everything  *******************************************************/
@@ -1310,8 +1308,6 @@ gimp_display_shell_new (GimpDisplay       *display,
   if (options->show_statusbar)
     gtk_widget_show (shell->statusbar);
 
-  gtk_widget_show (main_vbox);
-
   /*  add display filter for color management  */
 
   filter = gimp_display_shell_filter_new (shell,
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index a854f06..6f95025 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -114,6 +114,10 @@ gimp_image_window_constructor (GType                  type,
 
   g_assert (GIMP_IS_UI_MANAGER (window->menubar_manager));
 
+  window->main_vbox = gtk_vbox_new (FALSE, 0);
+  gtk_container_add (GTK_CONTAINER (window), window->main_vbox);
+  gtk_widget_show (window->main_vbox);
+
   return object;
 }
 
diff --git a/app/display/gimpimagewindow.h b/app/display/gimpimagewindow.h
index a5e46e9..29e239c 100644
--- a/app/display/gimpimagewindow.h
+++ b/app/display/gimpimagewindow.h
@@ -38,6 +38,8 @@ struct _GimpImageWindow
 
   GimpUIManager   *menubar_manager;
 
+  GtkWidget       *main_vbox;
+
   GdkWindowState   window_state;
 };
 



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