[Xfce4-commits] <midori:master> Don't save file dialog folder with GTK+ 3.1.10
Christian Dywan
noreply at xfce.org
Mon Oct 10 22:02:03 CEST 2011
Updating branch refs/heads/master
to cb6a4290d68dd87e03fec6cffd12c57da4ec1fd6 (commit)
from 2219399440065cfd148d2f87e978f881c1003007 (commit)
commit cb6a4290d68dd87e03fec6cffd12c57da4ec1fd6
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Oct 10 21:49:27 2011 +0200
Don't save file dialog folder with GTK+ 3.1.10
The last used folder is restored by default.
midori/midori-browser.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 2963faa..aeed406 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -2229,7 +2229,9 @@ static void
_action_open_activate (GtkAction* action,
MidoriBrowser* browser)
{
+ #if !GTK_CHECK_VERSION (3, 1, 10)
static gchar* last_dir = NULL;
+ #endif
gchar* uri = NULL;
gboolean folder_set = FALSE;
GtkWidget* dialog;
@@ -2260,8 +2262,10 @@ _action_open_activate (GtkAction* action,
}
}
+ #if !GTK_CHECK_VERSION (3, 1, 10)
if (!folder_set && last_dir && *last_dir)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), last_dir);
+ #endif
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
{
@@ -2270,10 +2274,11 @@ _action_open_activate (GtkAction* action,
folder = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dialog));
uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
midori_browser_set_current_uri (browser, uri);
-
- g_free (last_dir);
- last_dir = folder;
g_free (uri);
+
+ #if !GTK_CHECK_VERSION (3, 1, 10)
+ katze_assign (last_dir, folder);
+ #endif
}
gtk_widget_destroy (dialog);
}
More information about the Xfce4-commits
mailing list