[Xfce4-commits] <midori:master> Disable GtkRecentManager in private and portable mode

Christian Dywan noreply at xfce.org
Mon Aug 27 22:30:01 CEST 2012


Updating branch refs/heads/master
         to cc4fbca8e35814d0cd5614a4505e214140b9b48d (commit)
       from 7f37162fe009e7f7f6b51497fe4c20a4445e2cd8 (commit)

commit cc4fbca8e35814d0cd5614a4505e214140b9b48d
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Aug 27 22:27:48 2012 +0200

    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 abce0a2..2e4ef81 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 64b9fc8..5896fa1 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);


More information about the Xfce4-commits mailing list