Closed PCMan closed 6 years ago
It also needs to remember the chosen view and have filtering. Maybe all these could be implemented later.
EDIT: I was too hasty; they should be added before merging.
With the proposed changes, name filters are shown but without being elided when necessary:
Also, filter has no effect and save dialog doesn't put the file name in the line-edit.
OK, I can't add a commit yet because many things are missing; waiting until the gaps are filled.
@tsujan what's missing? BTW, I found that this does not compatible with older version of Qt 5. I'll work on this.
@PCMan Proabably related with QString QFileDialotg:::selectedMimeTypeFilter()
It's only present since 5.9.
@PCMan I usually have the latest stable Qt (5.9.1 for now). There are many things missing. My happiness was just about seeing the new, feature-rich dialog instead of the default one; otherwise, the former isn't usable in its current form.
(1) As the above screenshot shows, the list of extensions isn't elided (that may be because I changed your code a little). (2) The extension list is just there without doing anything; files aren't filtered according to it. (3) When a name is typed in the name line-edit, no selection list pops up (in contrast to the default dialog); actually, there's no filtering. (4) The save dialog is terrible because the "save" name doesn't appear in its line-edit. (5) Auto-selection is annoying and interferes with the real job but there's no way to disable it. (6) No setting is remembered.
Apart from that, as far as I saw the code, some functions and/or variables aren't used anywhere. So, I thought this should be a preliminary sketch on which you would work later. Anyhow -- and sorry if my emphasis sounds annoying -- this shouldn't be merged in its current state, IMHO.
If the missing parts are added, I'll gladly work on it to remove bugs and/or add features.
@luis-pereira
Fm::FileDialog
is a QDialog
, not a QFileDialog
. It doesn't have selectMimeTypeFilter
. Of course, we should add it.
With some changes to this and https://github.com/lxde/libfm-qt/pull/112, the type filtering and that super wide combo can be fixed:
Will try to fix other important things one by one...
Fm::FileDialog is a QDialog, not a QFileDialog. It doesn't have selectMimeTypeFilter. Of course, we should add it
@tsujan You probably misread my comment. I said selectedMimeTypeFilter
not selectMimeTypeFilter
.
By looking at your commit https://github.com/lxde/lxqt-qtplugin/pull/23/commits/54a5a332c39fb1fa491cf73ae9279ec57840bb8b, you already realized the difference.
@luis-pereira You're tight. Sorry! My mind was occupied by possibilities and I misread your comment.
@tsujan for incompatible parts, just add
... Qt 5.9 specific code here
rather than comment it out. Otherwise it won't work well for newer Qt versions.
@PCMan Yes, I know but thanks for mentioning!
I've succeeded in fixing several issues and adding some necessary features (offline). Still other issues were found when I started to use the dialog. I'll add commits for fixes and other things and will tell everyone when this is ready for use.
KDE file dialog can also remember the view mode regardless of the poor options Qt provides. I tested with a small "menu button" at the top right corner of the dialog for saving the view mode. If there's no objection, I might add a separate PR for it later.
If there are no objections, I'm going to merge this PR.
Please do so!
I might just add a PR for remembering the view later.
Am I missing something? Recompiled libfm-qt, qtplugin and even pcmanfm-qt but I never see the new dialog.
@stefonarch This is the order of compilation and installation:
(1) libfm-qt; (2) pcmanfm-qt (might crash without recompilation but I'm not sure); (2) lxqt-qtplugin.
After that, use a Qt app with open-file or save-file dialog (like QupZilla) and try to open/save something.
BTW, if you used FeatherPad for testing, install its latest git version and check the new setting "Native file dialog" in Preferences.
Thanks, now solved, the culprit was a badly updated lxqt-qtplugin folder. Nice work!
PS: Small bug: Translations are not picked up for right click menu ( open|copy|paste ecc) and in the left panel "devices" "places"
PS: Small bug: Translations are not picked up for right click menu ( open|copy|paste ecc) and in the left panel "devices" "places"
Please open an issue for that!
@stefonarch - are there translations yet?
@agaida File dialog should use the existing translations. So, https://github.com/lxde/lxqt/issues/1338 is a bug.
Of course, its strings need translation but the context menu, for example, is just called by it.
This implement the feature discussed here. https://github.com/lxde/pcmanfm-qt/issues/551#event-1187260629