[PATCH] Fix crash with Unity Gtk+ global menubar module



Showing a top-level window during construction causes a crash with ubuntu's
unity-gtk-module, which does some magic in realize handler.
---
 src/application_window.c | 2 +-
 src/easytag.c            | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/application_window.c b/src/application_window.c
index d9c5c8f..c7b5cf7 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -1801,7 +1801,7 @@ et_application_window_init (EtApplicationWindow *self)
     widget = Create_Progress_Bar ();
     gtk_box_pack_end (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
 
-    gtk_widget_show_all (GTK_WIDGET (self));
+    gtk_widget_show_all (GTK_WIDGET (main_vbox));
 }
 
 static void
diff --git a/src/easytag.c b/src/easytag.c
index 3eeef24..f95fff4 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -134,6 +134,8 @@ common_init (GApplication *application)
     window = et_application_window_new (GTK_APPLICATION (application));
     MainWindow = GTK_WIDGET (window);
 
+    gtk_widget_show (MainWindow);
+
     /* Starting messages */
     Log_Print(LOG_OK,_("Starting EasyTAG version %s (PID: %d)…"),PACKAGE_VERSION,getpid());
 #ifdef ENABLE_MP3
-- 
1.8.3.2



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