From: Enrico Tröger Date: Sun, 31 May 2009 01:34:13 +0000 (+0200) Subject: Use midori_app_add_browser in panels to create new windows X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dced22f179af54ae45d1ad4f682bf3d13c9bc343;p=midori Use midori_app_add_browser in panels to create new windows This fixes a crash due to change of the signal signature. --- 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); } }