Ticket #2341 (s2b_design_finished tweak) — at Version 7

Opened 15 years ago

Last modified 13 years ago

file-dialog-filters -- add more filters to file dialogs

Reported by: deyan Owned by: pap
Priority: major Milestone: X3
Component: uncategorized Version: 2.0
Keywords: Cc:
Category: unknown Effort:
Importance: Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: deyan Design_owners: pap
Imp._owners: Test_owners:
Analysis_reviewers: pap Changelog: Changelog
Design_reviewers: Imp._reviewers:
Test_reviewers: Analysis_score: 4
Design_score: 4 Imp._score: 4
Test_score: 0

Description (last modified by pap) (diff)

Create and add the following filters:

All dialogs

All Files (*.*)

Image dialogs

  • All Image Files (*.jpg; *.jpeg; *.bmp; *.gif; *.png)
    • JPEG (*.jpg; *.jpeg)
    • Bitmap (*.bmp)
    • Graphics Interchange Format (*.gif)
    • Portable Network Graphics (*.png)

Video dialogs

  • All Video Files (*.avi; *.mov)
    • Audio Video Interleave (*.avi)
    • Quick Time (*.mov)

Audio dialogs

  • All Audio Files (*.wav; *.ogg)
    • Wave (*.wav)
    • Ogg Vorbis (*.ogg)
    • Mp3 (*.mp3)

Text dialogs

  • All Text Files (*.txt; *.rtf; *.htm; *.html)
    • Web Page file (*.htm; *.html)
    • Text file (*.txt)
    • Rich Text Format (*.rtf)

Books

  • Sophie 2.0 Book (*.book.s2)

PS

  • PostScript (*.ps)

PDF

  • Adobe PDF (*.pdf)

Import dialog

  • All supported files

Change History

comment:1 follow-up: ↓ 2 Changed 15 years ago by deyan

  • Owner set to deyan
  • Status changed from new to s1a_analysis_started

Create and add the following filters:

  • All supported files
  • All Image Files (*.jpg; *.jpeg; *.bmp; *.gif; *.png)
    • JPEG (*.jpg; *.jpeg)
    • Bitmap (*.bmp)
    • Graphics Interchange Format (*.gif)
    • Portable Network Graphics (*.png)
  • All Video Files (*.avi; *.mov)
    • Audio Video Interleave (*.avi)
    • Quick Time (*.mov)
  • All Audio Files (*.wav; *.ogg)
    • Wave (*.wav)
    • Ogg Vorbis (*.ogg)
    • Mp3 (*.mp3)
    • Web Page file (*.htm; *.html)
    • Sophie 2.0 Book (*.book.s2)
  • PostScript (*.ps)
  • Adobe PDF (*.pdf)

comment:2 in reply to: ↑ 1 Changed 15 years ago by deyan

  • Description modified (diff)

Replying to deyan:

comment:3 Changed 15 years ago by deyan

  • Description modified (diff)

comment:4 Changed 15 years ago by pap

  • Status changed from s1a_analysis_started to s1c_analysis_ok
  • Analysis_reviewers set to pap
  • Analysis_owners set to deyan
  • Analysis_score changed from 0 to 4
  • Seems good

comment:5 Changed 15 years ago by pap

  • Design_owners set to pap
  • Owner changed from deyan to pap
  • Status changed from s1c_analysis_ok to s2a_design_started
  • Taking for design

comment:6 Changed 15 years ago by deyan

  • Description modified (diff)

Batch update from file active_tickets.csv

Changed 15 years ago by pap

Design related code

comment:7 Changed 15 years ago by pap

  • Status changed from s2a_design_started to s2b_design_finished
  • Description modified (diff)
  • Create a new public static class in FileDialogInput called FileFilterInfo. It will contain a list of FileFilters and a list indicating whether the "accept all files" filter of JFileChooser should be used.
  • Add method public boolean accepts(File file) that checks the file against the FileFilterInfo.
  • Make FileDialogInput use FileFilterInfo instead of FileFilter.
  • Make the ResourceImportManagers use the FileFilterInfo instead of just a FileFilter.
  • These are generally straightforward especially with the FileFilterInfo.accepts method available.
  • The resource chooser also benefits from this class as it gets simpler. For that purpose the addFilters method was added.
  • Unresolved
    • Removing FileFilter constants from FileDialogInput.
    • Should FileFilterInfo be used in ResourceExportManager. How to handle appending an extension.
    • How to construct FileFilterInfos? How about using static initializers? I know they aren't nice but otherwise there should be some gigantic expression to create a filter info with 5-6 filters.
Note: See TracTickets for help on using tickets.