Closed Bug 136941 Opened 23 years ago Closed 16 years ago

filters from filepicker.properties should should have case insensitive test

Categories

(Core :: Widget: Gtk, enhancement)

All
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b3

People

(Reporter: geraint.edwards, Assigned: ventnor.bugzilla)

References

Details

(Keywords: fixed1.9.1)

Attachments

(1 file, 3 obsolete files)

Trying to open a file "XXX.JPG" using the "filepicker" and the image filter fails and I cannot see the file, but if I add "*.JPG" to the imageFilter field in filepicker.properties I do see the file. The file extensions should be compared on a case insensitive basis or both the lower case and upper case extensions should be added as file filters to filepicker.properties?
what's the status of this?
xpfilepicker
Assignee: law → bryner
QA Contact: sairuh → petersen
I'm going to confirm this as an enhancement request. It seems reasonable enough.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: bryner → file-handling
QA Contact: chrispetersen → ian
What with all the dupes being on Linux, and even the XUL filepicker on Linux working fine, this would seem to be a Widget: GTK bug.
Assignee: file-handling → nobody
Component: File Handling → Widget: Gtk
QA Contact: ian → gtk
Assignee: nobody → ventnor.bugzilla
Attached patch Patch (obsolete) — Splinter Review
For some reason I'm getting the feeling that this approach is a little dangerous, but so far it works. GTK takes a shell blob for its pattern matching which is like regular expressions ultra lite. It seems to me from documentation /*/i wouldn't work.
Attachment #349674 - Flags: superreview?(roc)
Attachment #349674 - Flags: review?(roc)
Looks OK, but g_strstrip needs its result to be freed, so this is actually leaking (and always was). +MakeCaseInsensitiveShellGlob(const char* existingString) { aExistingString You should also add a comment that aExistingString is a UTF8 string, but that this function is OK because g_ascii_isalpha will return false for any non-ASCII character in the string so all non-ASCII characters are just passed through.
Attached patch Patch 2 (obsolete) — Splinter Review
g_strstrip is a macro which doesn't need freeing (as I've explained IRL). Added the comment.
Attachment #349674 - Attachment is obsolete: true
Attachment #349677 - Flags: superreview?(roc)
Attachment #349677 - Flags: review?(roc)
Attachment #349674 - Flags: superreview?(roc)
Attachment #349674 - Flags: review?(roc)
(In reply to comment #9) > +MakeCaseInsensitiveShellGlob(const char* existingString) { > > aExistingString You didn't address this comment. Please mention in your comment that aExistingString is UTF8.
Attached patch Patch 3 (obsolete) — Splinter Review
Whoops, sorry, I missed that comment.
Attachment #349677 - Attachment is obsolete: true
Attachment #349684 - Flags: superreview?
Attachment #349684 - Flags: review?(roc)
Attachment #349677 - Flags: superreview?(roc)
Attachment #349677 - Flags: review?(roc)
Attachment #349684 - Flags: superreview?
Attachment #349684 - Flags: superreview+
Attachment #349684 - Flags: review?(roc)
Attachment #349684 - Flags: review+
Flags: wanted1.9.1?
Comment on attachment 349684 [details] [diff] [review] Patch 3 Since this old bug has a fairly trivial fix (ignore my first comment, I now know what shell globs are/aren't capable of) it would be nice to get this out for 1.9.1.
Attachment #349684 - Flags: approval1.9.1?
Hardware: PC → All
Attachment #349684 - Flags: approval1.9.1? → approval1.9.1+
Comment on attachment 349684 [details] [diff] [review] Patch 3 a191=beltzner - should we add a test for this new test?
I don't think you can, really. This bug is all about a modal dialog for an external toolkit. The best you can get is a Litmus test, I suppose.
Keywords: checkin-needed
For checkin
Attachment #349684 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b3
Keywords: fixed1.9.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: