Use midori_app_add_browser in panels to create new windows

This fixes a crash due to change of the signal signature.
This commit is contained in:
Enrico Tröger 2009-05-31 03:34:13 +02:00 committed by Christian Dywan
parent 09f0940bac
commit dced22f179
2 changed files with 8 additions and 4 deletions

View file

@ -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);
}
}

View file

@ -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);
}
}