From cc4fbca8e35814d0cd5614a4505e214140b9b48d Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 27 Aug 2012 22:27:48 +0200 Subject: [PATCH] Disable GtkRecentManager in private and portable mode --- midori/main.c | 6 ++++++ toolbars/midori-transferbar.c | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/midori/main.c b/midori/main.c index abce0a21..2e4ef811 100644 --- a/midori/main.c +++ b/midori/main.c @@ -2210,12 +2210,18 @@ main (int argc, NULL); #endif + g_object_set (gtk_settings_get_default (), + "gtk-recent-files-max-age", 0, NULL); midori_paths_init (MIDORI_RUNTIME_MODE_PRIVATE, "private://"); } else if (webapp) midori_paths_init (MIDORI_RUNTIME_MODE_APP, config ? config : "app://"); else if (portable) + { + g_object_set (gtk_settings_get_default (), + "gtk-recent-files-max-age", 0, NULL); midori_paths_init (MIDORI_RUNTIME_MODE_PORTABLE, "portable://"); + } midori_load_soup_session (settings); if (block_uris) diff --git a/toolbars/midori-transferbar.c b/toolbars/midori-transferbar.c index 64b9fc8d..5896fa10 100644 --- a/toolbars/midori-transferbar.c +++ b/toolbars/midori-transferbar.c @@ -158,11 +158,8 @@ midori_transferbar_download_notify_status_cb (WebKitDownload* download, } g_free (fingerprint); if (verified) - { - if (!midori_paths_is_readonly ()) - gtk_recent_manager_add_item (gtk_recent_manager_get_default (), - webkit_download_get_destination_uri (download)); - } + gtk_recent_manager_add_item (gtk_recent_manager_get_default (), + webkit_download_get_destination_uri (download)); else gtk_image_set_from_stock (GTK_IMAGE (icon), GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_MENU); -- 2.39.5