Closed Bug 160672 Opened 22 years ago Closed 22 years ago

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

Categories

(SeaMonkey :: UI Design, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.2beta

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file, 2 obsolete files)

The error messages could use some work, as could the textfield label
Attached patch Something like this (obsolete) — Splinter Review
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;
}
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
Attachment #97693 - Flags: review+
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
Closed: 22 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.

Attachment

General

Created:
Updated:
Size: