#491 closed enhancement (discarded)
refactor AW_file.cxx
Reported by: | epruesse | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | no idea | Version: | gtkport |
Keywords: | Cc: |
Description
The current file chooser API is fragile and incompatible with GTK provided choosers. It may therefore make sense to refactor.
Concept:
- Use only one awar to back widget. Path mangling/separation can be done with functions from core.
- Incorporate sub-widgets:
- Make "suffix" pattern a drop down using a name:pattern list supplied at widget creation time. (No-one ever wants anything but typical file types or all=*)
- Filename field only for "SAVE" mode.
Change History (8)
comment:1 in reply to: ↑ description Changed 11 years ago by westram
- Owner changed from devel to westram
- Status changed from new to accepted
comment:2 follow-up: ↓ 4 Changed 11 years ago by epruesse
For completeness, the rest of my "original plan" as #263 is affected as well.
None of the OS or toolkit file choosers allow "show no directories". So if we moved to say the GTK browser, most of AW_file would have to remain just for the AWTI import/export filter selection.
The concept of using the file chooser to select import/export filters probably sounded elegant at the time. It has it's issues though. For example, if we want multiple directories, we run into the "duplicate filename" problem. Also, I'd like to see some extra features in AWTI that would be easier to do by parsing all the filter into memory anyway:
- show human readable name instead of filename in selection list
- display long description for selected filter in second box
- display preview result of parsing/exporting one sequence in third box
- remove or fix autodetect (consensus among seems to be "doesn't work")
I didn't implement any of this at the time, because the next step would be GUI-designable import/export filters. For export filters, I think "|nds()" would be cool, e.g. so that the can configure what he/she wants in the FASTA header w/o having to write a new filter.
comment:3 Changed 11 years ago by westram
Yes, AW_file can be crunched aftermerge.
comment:4 in reply to: ↑ 2 Changed 11 years ago by westram
- Owner westram deleted
- Status changed from accepted to new
Replying to epruesse:
For example, if we want multiple directories, we run into the "duplicate filename" problem.
No problem - duplicates can co-exist.
Also, I'd like to see some extra features in AWTI that would be easier to do by parsing all the filter into memory anyway:
- show human readable name instead of filename in selection list
- display long description for selected filter in second box
- display preview result of parsing/exporting one sequence in third box
No need to load filters to provide that. Can be done in callback bound to file-name awar.
- remove or fix autodetect (consensus among seems to be "doesn't work")
If autodetect fails, the import-filters need to be fixed
comment:5 Changed 11 years ago by westram
- Milestone changed from arb6.1 to aftermerge
comment:6 Changed 7 years ago by westram
- Version set to gtkport
comment:7 Changed 7 years ago by westram
- Resolution set to discarded
- Status changed from new to closed
gtk-port is dead
comment:8 Changed 7 years ago by westram
- Milestone aftermerge deleted
Ticket retargeted after milestone deleted
Replying to epruesse:
Requires changes throughout, as much code depends on existence of the 3 awars used currently.
Filename field can be disabled by removing the corresponding at-label from xfig.
Accepting ticket because i need to do some changes for #263