If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[FIX]XP filepicker's modeGetFolder looks too much like modeOpen

RESOLVED FIXED in mozilla1.2beta

Status

SeaMonkey
UI Design
P2
normal
RESOLVED FIXED
15 years ago
13 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
mozilla1.2beta
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

The error messages could use some work, as could the textfield label
Created attachment 93699 [details] [diff] [review]
Something like this
timeless, would you review?
Looks good to me, but I'm no filepicker wizard (though it's pretty
straight-forward).  Brian, would you have time to take a look at this patch? 
This would be great to have for Buffy.
Keywords: nsbeta1
*** Bug 160591 has been marked as a duplicate of this bug. ***
Comment on attachment 93699 [details] [diff] [review]
Something like this

>--- components/filepicker/res/content/filepicker.js	7 Jul 2002 07:21:34 -0000	1.76
>+++ components/filepicker/res/content/filepicker.js	2 Aug 2002 12:02:51 -0000
>@@ -234,9 +239,16 @@
>     //promptService.alert(window, "Problem", "normalize failed, continuing");
>   }
> 
>-  if (!file.exists() && (filePickerMode != nsIFilePicker.modeSave)) {
>+  if (!file.exists() && (filePickerMode == nsIFilePicker.modeOpen)) {
>     showErrorDialog("errorOpenFileDoesntExistTitle",
>                     "errorOpenFileDoesntExistMessage",
>+                    file);
>+    return false;
>+  }
>+
>+  if (!file.exists() && (filePickerMode == nsIFilePicker.modeGetFolder)) {
>+    showErrorDialog("errorDirDoesntExistTitle",
>+                    "errorDirDoesntExistMessage",
>                     file);
>     return false;
>   }

Uh, let's not check for file.exists() twice here.  something like:

if (!file.exists() && filePickerMode != nsIFilePicker.modeSave) {
  if (filePickerMode == nsIFilePicker.modeOpen) {
    showErrorDialog(...); 
  } else {
    showErrorDialog(...);
  }
  return false;
}
Created attachment 97693 [details] [diff] [review]
patch updated to bryner's comments
keeping on my radar
Assignee: sgehani → bzbarsky
Priority: -- → P2
Summary: XP filepicker's modeGetFolder looks too much like modeOpen → [FIX]XP filepicker's modeGetFolder looks too much like modeOpen
Target Milestone: --- → mozilla1.2beta

Updated

15 years ago
Attachment #97693 - Flags: review+
Created attachment 98492 [details] [diff] [review]
unrot from sspitzer's landing

Yay patch rot.
Attachment #93699 - Attachment is obsolete: true
Attachment #97693 - Attachment is obsolete: true
Comment on attachment 98492 [details] [diff] [review]
unrot from sspitzer's landing

>Index: xpfe/components/filepicker/res/content/filepicker.js
>===================================================================
>+  if (filePickerMode == nsIFilePicker.modeGetFolder) {
>+    var textInputLabel = document.getElementById("textInputLabel");
>+    textInputLabel.value = gFilePickerBundle.getString("dirTextInputLabel");
>+  }
>+  

Nittiest of nits:  Kill the spaces on the blank line you're adding.

>-  if (!file.exists() && (filePickerMode != nsIFilePicker.modeSave)) {
>+  var fileExists = file.exists();
>+  

Here too.

>+  if (!fileExists && (filePickerMode == nsIFilePicker.modeOpen ||
>+                      filePickerMode == nsIFilePicker.modeOpenMultiple)) {


r=caillon
Attachment #98492 - Flags: review+
Comment on attachment 98492 [details] [diff] [review]
unrot from sspitzer's landing

sr=bryner
Attachment #98492 - Flags: superreview+
fixed.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.