/unodevtools/

fice-5-0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
AgeCommit message (Collapse)Author
2019-07-22kf5/gtk3_kde5 fpickers: Drop unused 'allowRemoteUrls'Michael Weghorn
Change-Id: I591bf9fbe6e22bedda5a94334130a4f674cd66e6 Reviewed-on: https://gerrit.libreoffice.org/76110 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-01-30tdf#122752 gtk3_kde5: Use non-native fpicker for non-Plasma desktopsMichael Weghorn
Adding the custom widgets to the native dialog currently depends on the native dialog using a KFileWidget, which is just the case for the native QFileDialog implementation on Plasma/KDE5. In order not to lose custom controls for non-Plasma desktops, fall back to using the non-native QFileDialog there and adding the custom controls to its layout. This was mostly taken over from Qt5FileDialog. (This is a similar approach as that taken for the kde5 VCL plugin in https://gerrit.libreoffice.org/#/c/67106/ ). Adding the controls to the layout returned by 'QFileDialog::layout()' cannot be used for the native dialog as well, since a nullptr is returned in this case. From QFileDialog doc: > By default, a platform-native file dialog will be used if the platform > has one. In that case, the widgets which would otherwise be used to > construct the dialog will not be instantiated, so related accessors such > as layout() and itemDelegate() will return null. You can set the > DontUseNativeDialog option to ensure that the widget-based > implementation will be used instead of the native dialog. Change-Id: I75fbe7731da28d0dc7df878f4c57e141d4d89902 Reviewed-on: https://gerrit.libreoffice.org/67111 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Michael Weghorn <m.weghorn@posteo.de>
2018-02-16gtk3_kde5: Checkboxes on the left, texts on the rightKatarina Behrens
QFormLayout does it the other way round (text left, checkbox right) and it looks odd, so use QGridLayout Change-Id: Iff4255f695ce17561bac44e496a3567e1b438581 Reviewed-on: https://gerrit.libreoffice.org/49815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-01-23Various loplugin in --enable-gtk3-kde5 codeStephan Bergmann
Change-Id: I006e7fddcb58edb597867e0dd6f2b81ddac3457e
2018-01-23Support opening of (some) remote URLs through the KDE file dialogMilian Wolff
LO already supports http, https, webdav and webdavs through the WebDAVContentProvider. Ftp is supported via FTPContentProvider and then finally we have the GIOContentProvider that can potentially support SMB, if the dependencies for that are met. We now configure the KDE file dialog to allow these remote protocols. Note that this filtering depends on https://phabricator.kde.org/D10024 and https://phabricator.kde.org/D10025 to have any effect. Then we rewrite the URLs we receive from KIO to a format that is supported by LO. Most notably, we prepend `vnd.sun.star.` to the webdav URL schemes, such that they get picked up by the WebDAVContentProvider. Then finally, we clear the username from the smb:// URLs we get from KIO, as that prevents GIO from opening them. In all cases, the user will get prompted a second time for the credentials required to access the remote resource. This is unfortunate, but better than nothing. In the future, we may solve this issue through either a separate KIO UCP or by getting support for the FDO Secret Service specification in KWallet. Change-Id: I91df28434b115639c2698968e2a672b3320bf8e2 Reviewed-on: https://gerrit.libreoffice.org/48350 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-23Introduce gtk3_kde5 vcl pluginMilian Wolff
This is a hybrid plugin which mostly wraps the GTK3 vclplug. Only the file and folder picker are replaced by KDE dialogs. This gives us a well-maintained GTK LO base with basic KDE integration with minimum effort. To prevent issues with nested event loops, the KDE dialogs are launched from a separate process, the new lo_kde5filepicker helper executable. A trivial stdin/stdout IPC mechanism transfers the data between LO and the Qt/KDE helper. The usage of an external process also allows us to copy'n'paste between LO and the KDE file dialog without freezing the UI, as would happen when one would do this in-process. This is in general also the architecture applied by the kmozillahelper, which is used to integrate KDE file dialogs into Firefox. While the KDE dialog is shown, the GTK3 main window is disabled and close requests are ignored. The KDE dialog in turn also sets the LO window as transient parent. Together, this makes the illusion perfect and the KDE dialog behaves like a modal dialog. This works properly also with multiple LO main windows, and only individual windows will get blocked as one would expect. Functionality wise, most of the features of the KDE4 dialog are supported. You can pick files and folders, and save files under a new name. Some custom checkbox widgets are supported, but lists, buttons and preview widgets are not yet implemented. Also, loading remote files via KIO is not possible yet. Change-Id: I1a97cf7c272307a19ace4222d5f12253bc722829 Reviewed-on: https://gerrit.libreoffice.org/47718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>