From cf06d201f0fd276f6fda7797d7f469cbdb2115b3 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 18 Jan 2005 21:43:16 +0000 Subject: [PATCH] Don't queue an operation to select the first file if we are in SAVE or 2005-01-18 Federico Mena Quintero * gtk/gtkfilechooserdefault.c (pending_op_queue): Don't queue an operation to select the first file if we are in SAVE or CREATE_FOLDER modes. Executing that operation would overwrite the contents of the save-name entry. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkfilechooserdefault.c | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1df83d430b..dfc1b66d93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-01-18 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (pending_op_queue): Don't queue an + operation to select the first file if we are in SAVE or + CREATE_FOLDER modes. Executing that operation would overwrite the + contents of the save-name entry. + 2005-01-18 Matthias Clasen * gtk/gtkstyle.c (gtk_default_draw_check) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1df83d430b..dfc1b66d93 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2005-01-18 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (pending_op_queue): Don't queue an + operation to select the first file if we are in SAVE or + CREATE_FOLDER modes. Executing that operation would overwrite the + contents of the save-name entry. + 2005-01-18 Matthias Clasen * gtk/gtkstyle.c (gtk_default_draw_check) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1df83d430b..dfc1b66d93 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2005-01-18 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (pending_op_queue): Don't queue an + operation to select the first file if we are in SAVE or + CREATE_FOLDER modes. Executing that operation would overwrite the + contents of the save-name entry. + 2005-01-18 Matthias Clasen * gtk/gtkstyle.c (gtk_default_draw_check) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 28af0a36d2..47c63f6d5c 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -4392,6 +4392,13 @@ pending_op_queue (GtkFileChooserDefault *impl, PendingOp op, const GtkFilePath * impl->pending_select_path = NULL; } + if (op == PENDING_OP_SELECT_FIRST && + (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)) + { + impl->pending_op == PENDING_OP_NONE; + return; + } + impl->pending_op = op; if (impl->pending_op == PENDING_OP_SELECT_PATH)