From dced22f179af54ae45d1ad4f682bf3d13c9bc343 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enrico=20Tr=C3=B6ger?= Date: Sun, 31 May 2009 03:34:13 +0200 Subject: [PATCH] Use midori_app_add_browser in panels to create new windows This fixes a crash due to change of the signal signature. --- panels/midori-bookmarks.c | 6 ++++-- panels/midori-history.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/panels/midori-bookmarks.c b/panels/midori-bookmarks.c index a6658b9a..123b0ea8 100644 --- a/panels/midori-bookmarks.c +++ b/panels/midori-bookmarks.c @@ -725,8 +725,10 @@ midori_bookmarks_open_in_window_activate_cb (GtkWidget* menuitem, if (uri && *uri) { - MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (bookmarks)); - g_signal_emit_by_name (browser, "new-window", uri); + MidoriBrowser* new_browser = midori_app_create_browser (bookmarks->app); + midori_app_add_browser (bookmarks->app, new_browser); + gtk_widget_show (GTK_WIDGET (new_browser)); + midori_browser_add_uri (new_browser, uri); } } diff --git a/panels/midori-history.c b/panels/midori-history.c index 83aa3086..80f5a695 100644 --- a/panels/midori-history.c +++ b/panels/midori-history.c @@ -757,8 +757,10 @@ midori_history_open_in_window_activate_cb (GtkWidget* menuitem, if (uri && *uri) { - MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (history)); - g_signal_emit_by_name (browser, "new-window", uri); + MidoriBrowser* new_browser = midori_app_create_browser (history->app); + midori_app_add_browser (history->app, new_browser); + gtk_widget_show (GTK_WIDGET (new_browser)); + midori_browser_add_uri (new_browser, uri); } } -- 2.39.5