Please give "Pickers" some love

Here are some improvement suggestions i have noted when working with SeaPrint, i hope you can take them into account.

DocumentPicker

  • Use icons for file types, now all show as “unknown”, which makes having icons a bit pointless. (Didn’t this work before? FilePicker has it, but DownloadPicker also doesn’t)
  • Add filtering by mime-type(s), or at least by extension like in FilePicker.
  • Consider making this (the base for) the first page in the Documents app, so it doesn’t get left behind.

ImagePicker

  • A possibility to preview images (long-press?) would be nice.
4 Likes

The missing icons seems like an oversight in some refactoring.
This fixes the issue:

--- DocumentPickerPage.qml.bak
+++ DocumentPickerPage.qml
@@ -73,6 +73,7 @@
 
             baseName: Theme.highlightText(documentModel.baseName(model.fileName), documentModel.filter, Theme.highlightColor)
             extension: Theme.highlightText(documentModel.extension(model.fileName), documentModel.filter, Theme.highlightColor)
+            mimeType: model.mimeType
             size: model.fileSize
             // Should be lastModified but QDocumentGallery (or tracker) doesn't return sane values
             // Worth adding QFileInfo Qml wrapper to nemo-qml-plugin-filemanager
4 Likes

That’s a very good idea, but the repo for pickers is private. Looking at the differences between the sailfish-document listing (which is on github) and the document picker will be tricky and contributing to the picker to implement what is missing will be proprietary…

Too bad, it was a very nice code sharing proposition.

Maybe try to contact @rainemak, he’s mentioned in the header ?

1 Like

If someone doesn’t have problems with NDAs that problem can be solved. I think at least.

Thanks for pinging. Created a PR for mimeType.

Will create tasks from other improvement ideas.

6 Likes

Thank you!

I was just going to ask if you applied the fix to DownloadPicker too, but on closer inspection it reuses DocumentPicker, so it is solved implicitly.
However, when used from ContentPicker, both of them still manage to remain broken despite the fix above.
If you didn’t already fix it, could you please take a look at that too?