Ticket #2282 (closed tweak: obsolete)

Opened 10 years ago

Last modified 8 years ago

improve-file-dialog -- Icons for files

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

Description (last modified by tanya) (diff)

File dialog needs icons for at least supported:

  • text files
  • audio files
  • video files
  • s2 files
  • pdf files
  • html files
  • zip files

It also needs icon for all other file types. You may research and eventually use LGPL artwork.

Attachments

design-code-file-icons.patch (10.3 KB) - added by tanya 9 years ago.

Change History

comment:1 Changed 10 years ago by dido

  • Category set to unknown
  • Description modified (diff)
  • Analysis_score set to 0
  • Importance set to 80
  • Test_score set to 0
  • Design_score set to 0
  • Imp._score set to 0

comment:2 Changed 9 years ago by deyan

  • Component changed from uncategorized to ui_consistency

Batch update from file query.csv

comment:3 Changed 9 years ago by tanya

  • Owner set to tanya
  • Status changed from new to s1a_analysis_started
  • Changelog set to [wiki:Changelog]

comment:4 Changed 9 years ago by tanya

  • Status changed from s1a_analysis_started to s1b_analysis_finished
  • Analysis_reviewers set to tanya
  • Analysis_score changed from 0 to 3

comment:5 Changed 9 years ago by tanya

  • Status changed from s1b_analysis_finished to s1c_analysis_ok

comment:6 Changed 9 years ago by tanya

  • Design_owners set to tanya
  • Status changed from s1c_analysis_ok to s2a_design_started

comment:7 Changed 9 years ago by deyan

  • Description modified (diff)

Batch update from file active_tickets.csv

Changed 9 years ago by tanya

comment:8 Changed 9 years ago by tanya

  • Status changed from s2a_design_started to s2b_design_finished
  • Description modified (diff)
  • The main.func.file module will provide extension point with FileIconProvider interface.
  • FileIconProvider will have a method - getIcon():Icon
  • Predefining FileView and setting it to the FileChooserDialog is what java provides for changing the icons.
  • SophieFileView is the implementation of FileView for Sophie - the getIcon() method will be overriden to define what icons different files will have. What icons different file will have will be defined according to what their file extension is.
  • For each file extension different class will be created that will implement FileIconPrivider.
  • FileIcon will be the base class for all classes that will provide icons for different files. What is more, this class will have property for the icon that will be skinnable.

comment:9 Changed 9 years ago by pap

  • Status changed from s2b_design_finished to s2c_design_ok
  • Design_score changed from 0 to 3
  • Design_reviewers set to pap, meddle
  • Singletons are not writen the way you have made FileView
  • Make sure to make a branch for the implementation as you have binary resources added.
  • It will be better if instead of file.getName().endsWith("ext") you use FileFilters to decide whether to use a specified icon. This way you can also make some implementation that will be easier to use.
    • This could be something like MyProvider.registerExtension(res, someFilter);
  • The name "Icons" for a class, especially a top-level one is almost horrible. Also because of its lack of JavaDoc I cannot understand what its purpose is.
  • The description of the design is not of very good quality. You should either write longer designs or have JavaDoc. Or best, have both.
  • Please when you put a mark to the analysis explain briefly why did you select that exact mark.

comment:10 Changed 9 years ago by tanya

  • Status changed from s2c_design_ok to s3a_implementation_started

comment:11 Changed 9 years ago by tanya

  • Imp._owners set to tanya

comment:12 Changed 9 years ago by tanya

  • Singleton is fixed
  • Branch is created - branches/private/tanya/fileicons 8800
  • FileFilters are used
  • Class Icons removed.
  • JavaDoc added
  • There are icons for:
    • Sophie Books
    • Sophie Resources
    • Default icon for files when non is available
    • Default icon for directories when non is available
    • Images
    • Videos
    • Audios
    • PDF documents
    • RTF documents
    • Plain text documents

comment:13 Changed 9 years ago by tanya

comment:14 Changed 9 years ago by tanya

  • Icons added for:
    • Html files
    • Zip files


8816

comment:15 Changed 9 years ago by tanya

  • Status changed from s3a_implementation_started to s3b_implementation_finished

comment:16 Changed 9 years ago by pap

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Imp._score changed from 0 to 3
  • Imp._reviewers set to deyan, todor, pap
  • Commited to trunk in [8838]
  • You use loging bad in FileIconProviderPoint.getProvider method. You shouldn't be logging at WARN level in a loop like this. This should be a TRACE (as it is used to log the progress of a method) and you should set the minimum log level in FakeAuthorMain.
  • The JavaDoc of the FileIcon class is bad. It say totally nothing.
  • The name of the instance variable for the FileIconProvider extension point is bad - "dndDataExtensionPoint". :(
  • I think that the FileIconProviderExtensionPoint.getProvider method would better be called findIcon and placed in SophieFileIcon but this doesn't seem very neccessary.
  • Malformed JavaDoc in FileIcon - missing newlines.
  • Very bad exception handling(almost swallowing) in FileIcon.register.
  • Also the aforementioned method may be named better - "registerExtension"
  • In the JavaDoc of FileIconProvider.getIcon you should mention that returning null means something.
  • These FileFilters you used would better be placed in the corresponding FileIcon implementations instead. They won't be used in other places anyway. And also this way they can be made without any descriptions.
  • I think that making FileIcon a singleton and then having lots of ancestors is not nice.
  • FileIcon is designed so that its ancestors use the constructor with parameter so making it private is very very strange.
  • Also if you have a constructor with parameters there is no need in hiding the default constructor like you did, as you don't have such unless it is explicitly defined.
  • You should've added sort keys to extensions. Right now if I swap the places of the SophieBookIcon and SophieResourceIcon extensions in FileFunctionalityModule I get messed up icons.
  • Also this way you can easily implement UnknownFileIcon and DirectoryIcon without that unnice singleton.
  • You don't need to put public modifier in front of interface methods as it is put by default.
  • Please have a look at the commited source code.

comment:17 Changed 8 years ago by meddle

  • Status changed from s3c_implementation_ok to closed
  • Resolution set to obsolete

Closing all the tickets before M Y1

Note: See TracTickets for help on using tickets.