Commit graph

75 commits

Author SHA1 Message Date
Ilya Fedin
7ddcc47fcd Make UnsafeShowOpenWith inline on Linux 2023-10-01 06:54:39 +04:00
Ilya Fedin
70f22293cf Get rid of last non-standard piece in Linux FileDialog getter 2023-10-01 06:54:39 +04:00
Ilya Fedin
d2b5651c3b Patch Qt for better open url UX on Linux 2023-09-26 12:22:24 +04:00
Ilya Fedin
082b5ba782 Get rid of sandboxed paths workaround
This is fixed in xdg-desktop-portal 1.17.

There's no way to check xdg-desktop-portal version so it's either not having support for passing last used path at all in sandbox or encountering the bug on old systems.
2023-09-20 17:58:41 +04:00
Ilya Fedin
e0b4d1edce Avoid unneeded std::string casts in exception handling 2023-09-20 17:45:37 +04:00
Ilya Fedin
cf781e1043 Port AppLaunchContext to cppgir 2023-08-03 18:11:31 +04:00
Ilya Fedin
0a011db483 Get rid of DESKTOP_APP_DISABLE_DBUS_INTEGRATION
Desktop App Toolkit uses GLib as the D-Bus library for quite long time, but GLib is not only a D-Bus library, it's more a basic library providing native Linux APIs implementing various specs. The situation right now is that DESKTOP_APP_DISABLE_DBUS_INTEGRATION disables not only D-Bus code but all the native API integration such as MIME handling or .desktop file parsing. In other words, the option disables native Linux APIs on Linux what is absurd and doesn't have any sense.
2023-05-15 08:08:04 +04:00
23rd
2acedca6b7 Replaced some qstr with u""_q literal. 2022-11-29 14:12:50 +03:00
Ilya Fedin
1336a7149b Update glibmm to latest version 2022-11-03 14:45:01 +04:00
Ilya Fedin
d500714242 Use xdg-activation to open URLs&files 2022-08-03 15:26:08 +04:00
Ilya Fedin
391a3a77f6 Use Qt's xdg-desktop-portal file dialog implementation 2022-06-14 16:36:44 +04:00
Ilya Fedin
572eb1f5f8 Remove unneeded anymore xdg-open workaround for snap 2022-04-13 15:06:06 +04:00
Ilya Fedin
3fbd68cff9 Don't link glib with DESKTOP_APP_DISABLE_DBUS_INTEGRATION 2021-09-12 00:12:13 +03:00
Ilya Fedin
51df482571 Get rid of gtk open with dialog
Portal open with dialog works just fine and is a more universal solution... That allows to get rid of an additional process.
2021-08-25 12:52:43 +03:00
Ilya Fedin
0b21c04489 Remove the copy of gtk file dialog 2021-07-01 22:13:50 +03:00
Ilya Fedin
85f013ebdb Revert "Avoid removing portal platformtheme plugin in snap"
This reverts commit 12db51fe75.
2021-07-01 22:13:50 +03:00
Ilya Fedin
f011c84ce8 Make Linux file dialog API better 2021-06-24 11:26:24 +04:00
Ilya Fedin
896eee9841 Check whether portal dialog is failed to open 2021-04-30 08:43:25 +03:00
Ilya Fedin
12db51fe75 Avoid removing portal platformtheme plugin in snap 2021-03-22 07:57:18 +03:00
Ilya Fedin
ace5740125 Use QProcess::startDetached for xdg-open
Since it may running continously
2021-03-17 15:39:26 +03:00
Ilya Fedin
59e6fd9989 Fallback to plain xdg-open as a last resort
Even though QDesktopServices::openUrl calls xdg-open, it doesn't fallback to xdg-open in confined environments.
This is useful in snap where portals aren't guaranteed to be present.
2021-03-11 11:19:26 +04:00
Ilya Fedin
5d1601d9c9 Move Platform::FileDialog::Gtk::Supported to private namespace 2021-03-10 09:46:13 +04:00
Ilya Fedin
b918170464 Add portal-based open with dialog implementation 2021-03-10 09:46:13 +04:00
Ilya Fedin
8042a83fd2 Move glib usage to glibmm 2021-03-04 12:07:54 +04:00
Ilya Fedin
bbf49b024a Fix implicit conversions from QByteArray 2021-02-19 14:15:09 +04:00
Ilya Fedin
36acf60f7e Add XDG Desktop Portal based file dialog implementation from Qt
This allows to use portal dialogs more flexibly (e.g. fallback mechanism)
This also allows to have any changes we want for portal dialogs without patchig Qt

No more need to override QT_QPA_PLATFORM to use portal dialogs
2021-02-05 20:23:00 +04:00
Ilya Fedin
ea9813825d Move EscapeShell to specific_linux 2021-01-22 17:22:37 +04:00
Ilya Fedin
ada22ee6cc Split GTK integration into a singleton 2021-01-22 17:22:37 +04:00
Ilya Fedin
5affb168a2 Fix callback function name in open with dialog 2021-01-04 17:08:49 +04:00
Ilya Fedin
15a9842b9f Make open with dialog modal on Linux 2021-01-04 11:54:17 +04:00
Ilya Fedin
b4cb47cf7f Prefer gtk3 headers 2020-11-16 12:37:42 +03:00
Ilya Fedin
91a2ec225a Add support for open with on linux 2020-11-09 11:23:01 +03:00
Ilya Fedin
acaf8e4931 Use g_filename_to_uri 2020-11-09 11:19:03 +03:00
John Preston
74d2313784 Build Linux version with Qt 5.15.1 in CentOS 7 docker. 2020-11-06 11:21:34 +03:00
Ilya Fedin
aec2b8df7e Fix choosing directories in snap and flatpak 2020-11-06 09:48:42 +03:00
Ilya Fedin
44c24f9fff Fix TDESKTOP_USE_PORTAL on gtk environments 2020-11-02 10:20:53 +03:00
Ilya Fedin
a38b4f039a Use some methods from lib_base 2020-10-30 10:52:49 +03:00
Ilya Fedin
3742db2b91 Use portals via glib to open urls & files in snap 2020-10-28 09:57:46 +03:00
Ilya Fedin
41e0e4fba7 Use glib to open files & urls 2020-10-27 17:39:37 +03:00
Ilya Fedin
022fc9a779 Fix gtk dialog condition + make it more readable 2020-10-27 17:37:33 +03:00
Ilya Fedin
786bedf271 Disable Qt's integration mechanism on GTK-based DE to avoid early GTK loading
This also removes TDESKTOP_USE_GTK_FILE_DIALOG since it doesn't forces GTK dialog for anyone and there is no reason to leave it

TDESKTOP_DISABLE_GTK_INTEGRATION can be also tested via action now
2020-08-15 17:43:28 +04:00
Ilya Fedin
449fa0ef2c Don't focus parent window after opening file dialog 2020-08-11 10:57:11 +04:00
Ilya Fedin
c61cabb075 Make qt_make_filter_list a part of file_utilities_linux.cpp 2020-07-13 06:53:45 +04:00
Ilya Fedin
4922768086 Don't use QLibrary for glib 2020-06-29 16:27:45 +04:00
John Preston
83538675ce Move a lot of settings to Core::Settings. 2020-06-23 21:53:42 +04:00
John Preston
ad4afe9293 Move session data localstorage -> storage_account. 2020-06-23 21:53:39 +04:00
Ilya Fedin
c776f81dc7 Add support for choosing directories via xdg-desktop-portal 2020-06-03 11:31:34 +04:00
Ilya Fedin
7f29f57c3d Use custom gtk file dialog only on gtk-based DEs 2020-06-01 18:19:34 +04:00
Ilya Fedin
95b4f56b86 Don't use QDesktopServices::openUrl on snap 2020-05-01 12:06:01 +04:00
Ilya Fedin
7bc86cc9af Fix directory opening with portal and use them by default with KDE 2020-04-24 14:33:26 +04:00