aMule Bug Tracker - aMule
View Issue Details
0000588aMuleUtilitiespublic2005-09-30 01:562008-08-30 13:08
0000588: wxCas' image saving dialog doesn't handle extension correctly with gtk2
When compiling wxCas against wxGTK with gtk2 (tested with wxGTK 2.6.1), the extension selection is ignored and the user needs to manually fill the name with _some_ extension for the file to be saved.

Just wondering, is this our issue or wxW's? Just filling this for the record.
No tags attached.
patch wxcasframe.savedialog.patch (2,548) 2005-09-30 06:17
Issue History
2005-09-30 01:56nichNew Issue
2005-09-30 06:17nichFile Added: wxcasframe.savedialog.patch
2005-09-30 06:17nichNote Added: 0001297
2005-09-30 06:33nichNote Added: 0001298
2008-07-02 09:52WuischkeStatusnew => assigned
2008-07-02 09:52WuischkeAssigned To => Wuischke
2008-08-30 13:08WuischkeStatusassigned => resolved
2008-08-30 13:08WuischkeResolutionopen => fixed

2005-09-30 06:17   
Just found a "fix" for it. Works now. Sort of.

It'll try to check if the user _tried_ to insert any known* filetype. If it thinks the inserted path has no valid extension, it'll use whatever was left in the filter selection as a parameter to complete the filename.

Oh. And it also adds wxOVERWRITE_PROMPT, so it'll _try_ to tell the user he picked a used name already (doesn't work if the extension is filled in by the program later - sucks, but I'm not to happy with a lot of other stuff in here anyways).

And it removes one pipe bar from the last wildcard string. It would trigger a wxASSERT when running with debug wx on. (This was, btw, the error that got me into looking the functionality of the rest. :P )

How depressing. I'm probably the only who's viewed this page so far. ;(
2005-09-30 06:33   
My stupidity amazes me.

2 seconds reading what I wrote and I already found several flaws.

The major one is the insertion of 2 wxMessageBox'es I forgot to remove after testing.

Then there's the fact that, although it can tell the user about over writting when the user writes the extension himself, nothing happens when the overwriting happens with a path this extra code completed.

There's also the fact that the verification code can be greatly simplified (ok, not big issue for an util few seem to care about) and that it (this bit of code) is not really smart, so other screw ups might happen.

Bleh! I'm sleepy. Should any dev see this, please fix the fix and commit. :P