From 56d2637020ef1055d3f72997ba3a3c7a504b3ff4 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 22 May 2009 23:15:53 +0200 Subject: [PATCH] Add tabs to new browser windows *after* emitting NEW_WINDOW The app takes care of settings as well as other state when the NEW_WINDOW signal of a browser is emitted. So we need to add tabs after emitting the signal, otherwise the new tab has default settings for a limited period of time. --- midori/midori-browser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 510f003b..d955917f 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -1100,8 +1100,8 @@ midori_view_new_window_cb (GtkWidget* view, MidoriBrowser* browser) { MidoriBrowser* new_browser = g_object_new (MIDORI_TYPE_BROWSER, NULL); - midori_browser_add_uri (new_browser, uri); g_signal_emit (browser, signals[NEW_WINDOW], 0, new_browser); + midori_browser_add_uri (new_browser, uri); } static void @@ -1113,9 +1113,9 @@ midori_view_new_view_cb (GtkWidget* view, if (where == MIDORI_NEW_VIEW_WINDOW) { MidoriBrowser* new_browser = g_object_new (MIDORI_TYPE_BROWSER, NULL); + g_signal_emit (browser, signals[NEW_WINDOW], 0, new_browser); midori_browser_add_tab (new_browser, new_view); midori_browser_set_current_tab (new_browser, new_view); - g_signal_emit (browser, signals[NEW_WINDOW], 0, new_browser); } else { @@ -1849,8 +1849,8 @@ _action_window_new_activate (GtkAction* action, MidoriBrowser* browser) { MidoriBrowser* new_browser = g_object_new (MIDORI_TYPE_BROWSER, NULL); - midori_browser_add_uri (new_browser, ""); g_signal_emit (browser, signals[NEW_WINDOW], 0, new_browser); + midori_browser_add_uri (new_browser, ""); } static void @@ -3177,8 +3177,8 @@ midori_browser_bookmark_open_in_window_activate_cb (GtkWidget* menuitem, if (uri && *uri) { MidoriBrowser* new_browser = g_object_new (MIDORI_TYPE_BROWSER, NULL); - midori_browser_add_uri (new_browser, uri); g_signal_emit (browser, signals[NEW_WINDOW], 0, new_browser); + midori_browser_add_uri (new_browser, uri); } } -- 2.39.5