Sort the list of file types in Save/Open dialogs alphabetically

Bug #682462 reported by su_v
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Wishlist
Unassigned

Bug Description

Follow-up report to
Bug #681625 “sort template names under File->New->...”:
<https://bugs.launchpad.net/inkscape/+bug/681625>

The list of available import/export file types listed in the 'File > Open…' and 'File > Save (as)…' dialogs appears to be sorted first by source (internal, user, shared), then by name. This makes it difficult to determine whether a custom/user input or output extension overrides the default one (defined as internal or shared extension) - determined by the position in the list (AFAICT the first one listed is used if the file type is not explicitly selected or if a file is opened by double-clicking it in the (system) file manager).

Proposed solution: sort the list of all loaded input/output extensions disregarding the source of the extension definition, so that the position in the file type list is determined by its name only.

Variations (possibly useful?):
- add an option to sort the list by file extension instead of file type name
- add an option to sort by 'id' tag as defined in the INX definition file

Tags: ui
Revision history for this message
su_v (suv-lp) wrote :

Related:
Bug #570527 “Fails importing .ai files written by matlab”
<https://bugs.launchpad.net/inkscape/+bug/570527>

Revision history for this message
su_v (suv-lp) wrote :

… or not related after all: No kind of sorting helps with two extensions available for the same file type (*.ai in the reference report) but different versions of it.

jazzynico (jazzynico)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
John Smith (john-smithi) wrote :

Patch to sort by "file type name".
Unfortunately there are inconsistencies in the file type names, which means things aren't always "ordered" well.

* Cairo PNG
* Compressed Inkscape SVG
* Compressed plain SVG
* Inkscape SVG
* Microsoft XAML
* Optimized SVG

Perhaps the file types should follow a consistent names pattern like <file type>(<variation>)<implementation>.<extension>

* PNG Cairo
* SVG Compressed Inkscape
* SVG Compressed (plain)
* SVG Inkscape
* SVG (Optimized)
* XAML Microsoft

Changed in inkscape:
assignee: nobody → John Smith (john-smithi)
status: Confirmed → In Progress
Revision history for this message
su_v (suv-lp) wrote :

In hindsight, I would probably better retract the feature request, or refine it based on better knowledge how it works internally - detailed explanation of my concerns will follow later: it relates to how Inkscape chooses the default file type used when opening a file directly, and how to avoid that the basic internal extensions are overridden (or even broken) by malfunctioning plugins or high-jacked by script-based user extensions.

Will test the patch later today (thanks for looking into this).

<off-topic>'Cairo PNG' needs to go (tracked elsewhere)</off-topic>

John Smith (john-smithi)
Changed in inkscape:
status: In Progress → Confirmed
assignee: John Smith (john-smithi) → nobody
Revision history for this message
su_v (suv-lp) wrote :

Retracting - not applicable to 'File > Open' as is (inkscape needs to have control over what default input extension is used to open a file in case multiple extensions register for the same file type). Feature requests should be filed separately for 'File > Open…' and 'File > Save …'.

Changed in inkscape:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.