Closed Bug 341218 Opened 18 years ago Closed 18 years ago

GTK2 filepicker "confirm overwrite" should use native GTK2 API when available

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: roc, Assigned: roc)

References

Details

(Keywords: verified1.8.0.9, verified1.8.1)

Attachments

(1 file)

Right now, if you do a "Save As" and choose an existing file, we ask "Are you sure (yes/no)" (or words to that effect). If you choose "no", we don't take you back to the dialog, you have to start the operation again.

This is because we're rolling our own confirmation dialog and we only show it after the filepicker is done. Instead we should just use the built-in GTK2 overwrite confirmation.
Attached patch fixSplinter Review
Attachment #225248 - Flags: superreview?(bryner)
Attachment #225248 - Flags: review?(bryner)
could we take the user back to the dialog even when this API does not exist?
I suppose we could. However, I do not care.
Comment on attachment 225248 [details] [diff] [review]
fix

>--- widget/src/gtk2/nsFilePicker.cpp	17 Aug 2005 13:41:44 -0000	1.11
>+++ widget/src/gtk2/nsFilePicker.cpp	12 Jun 2006 08:02:15 -0000
>@@ -555,43 +558,51 @@ nsFilePicker::Show(PRInt16 *aReturn)
>       const char *filter_pattern = mFilters[i]->get();
>       _gtk_file_filter_set_name (filter, filter_pattern);
>     }
> 
>     _gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_chooser), filter);
> 
>     // Set the initially selected filter
>     if (mSelectedType == i) {
>       _gtk_file_chooser_set_filter (GTK_FILE_CHOOSER(file_chooser), filter);
>     }
>   }
> 
>+  PRBool manualConfirm = PR_TRUE;

I'm not quite sure about the naming of this variable, it seems more like it's "autoConfirm" or "builtinConfirm".

In any case, r+sr=me
Attachment #225248 - Flags: superreview?(bryner)
Attachment #225248 - Flags: superreview+
Attachment #225248 - Flags: review?(bryner)
Attachment #225248 - Flags: review+
I'm making it checkForOverwrite.
Checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
*** Bug 318721 has been marked as a duplicate of this bug. ***
Blocks: 349790
Comment on attachment 225248 [details] [diff] [review]
fix

We should consider this (together with the fix in bug 349790) for Firefox 2.
Attachment #225248 - Flags: approval1.8.1?
Comment on attachment 225248 [details] [diff] [review]
fix

a=schrep for drivers.
Attachment #225248 - Flags: approval1.8.1? → approval1.8.1+
Checked into 1.8.1 branch
Keywords: fixed1.8.1
Comment on attachment 225248 [details] [diff] [review]
fix

Distros should probably get this fix.
Attachment #225248 - Flags: approval1.8.0.10?
Attachment #225248 - Flags: approval1.8.0.10? → approval1.8.0.9?
Comment on attachment 225248 [details] [diff] [review]
fix

Approved for 1.8.0 branch, a=jay for drivers.
Attachment #225248 - Flags: approval1.8.0.9? → approval1.8.0.9+
checked into 1.8.0 branch
Keywords: fixed1.8.0.9
Verified FIXED using the steps outlined in comment 0 using the following builds:
* Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9pre) Gecko/20061201 Firefox/1.5.0.9pre
* Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1pre) Gecko/20061201 BonEcho/2.0.0.1pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: