]> spindle.queued.net Git - midori/commitdiff
Make console panel properly detachable
authorChristian Dywan <christian@twotoasts.de>
Thu, 23 Apr 2009 02:14:08 +0000 (04:14 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 23 Apr 2009 02:14:08 +0000 (04:14 +0200)
panels/midori-console.c

index 0f662ca5266e04c1660f976739a3e274905b46b0..f47227fc1b36fcd6ce861e7e3efc247a511b9a75 100644 (file)
@@ -231,8 +231,8 @@ static void
 midori_console_hierarchy_changed_cb (MidoriConsole* console,
                                      GtkWidget*     old_parent)
 {
-    GtkWidget* browser = gtk_widget_get_toplevel (GTK_WIDGET (console));
-    if (GTK_WIDGET_TOPLEVEL (browser))
+    MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (console));
+    if (MIDORI_IS_BROWSER (browser))
         g_signal_connect (browser, "add-tab",
             G_CALLBACK (midori_console_browser_add_tab_cb), console);
 }