From: Christian Dywan Date: Wed, 3 Mar 2010 22:52:07 +0000 (+0100) Subject: Always append tabs added from a loaded session X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ae3633dce4e4ed6c892f6090ed4f7feb2de0c9c;p=midori Always append tabs added from a loaded session We shouldn't honor user preferences for new tabs when loading the session. Rather we append in the order they were saved in. This is currently a hack. In the future we should consider public API additions to insert tabs in a particular order. --- diff --git a/midori/main.c b/midori/main.c index 9e2f3770..d02bb7cb 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1261,7 +1261,10 @@ midori_load_session (gpointer data) session = midori_browser_get_proxy_array (browser); i = 0; while ((item = katze_array_get_nth_item (_session, i++))) + { + g_object_set_data (G_OBJECT (item), "midori-view-append", (void*)1); midori_browser_add_item (browser, item); + } current = katze_item_get_meta_integer (KATZE_ITEM (_session), "current"); if (current < 0) current = 0; diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 759e1ec6..3f877594 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -7333,6 +7333,10 @@ midori_browser_add_item (MidoriBrowser* browser, midori_view_set_uri (MIDORI_VIEW (view), uri); gtk_widget_show (view); + /* FIXME: We should have public API for that */ + if (g_object_get_data (G_OBJECT (item), "midori-view-append")) + g_object_set_data (G_OBJECT (view), "midori-view-append", (void*)1); + page = midori_browser_add_tab (browser, view); proxy_item = midori_view_get_proxy_item (MIDORI_VIEW (view)); if ((keys = katze_item_get_meta_keys (item)))