gnome-terminal r2488 - trunk/src



Author: chpe
Date: Wed Mar 19 18:12:56 2008
New Revision: 2488
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2488&view=rev

Log:
Remove the tabs menu on dispose instead of finalize. That way we don't try to
rebuild the tabs menu of a closing window and get critical warnings.


Modified:
   trunk/src/terminal-window.c

Modified: trunk/src/terminal-window.c
==============================================================================
--- trunk/src/terminal-window.c	(original)
+++ trunk/src/terminal-window.c	Wed Mar 19 18:12:56 2008
@@ -1382,8 +1382,8 @@
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
   
-  object_class->finalize = terminal_window_finalize;
   object_class->dispose = terminal_window_dispose;
+  object_class->finalize = terminal_window_finalize;
 
   g_print ("window class init\n");
   widget_class->show = terminal_window_show;
@@ -1421,6 +1421,12 @@
 
   priv->disposed = TRUE;
 
+  if (priv->tabs_menu)
+    {
+      g_object_unref (priv->tabs_menu);
+      priv->tabs_menu = NULL;
+    }
+
   G_OBJECT_CLASS (terminal_window_parent_class)->dispose (object);
 }
    
@@ -1442,8 +1448,6 @@
 
   g_free (priv->startup_id);
 
-  g_object_unref (priv->tabs_menu);
-
   G_OBJECT_CLASS (terminal_window_parent_class)->finalize (object);
 }
 



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