Commit Graph

299 Commits

Author SHA1 Message Date
Ilya Fedin 2a6e2fa353 Bundle kcoreaddons 2022-09-28 23:59:59 +04:00
Ilya Fedin cfa12fb0cc Move AppRuntimeDirectory to private namespace 2022-09-19 14:23:27 +04:00
Ilya Fedin d9318c9935 Move icon name getter to cross-platform header 2022-09-19 14:23:27 +04:00
Ilya Fedin 5132fd5010 Use KSandbox to check flatpak/snap environment 2022-09-19 14:23:27 +04:00
Ilya Fedin 89879e355d Replace EscapeShell with KShell::joinArgs 2022-09-19 14:20:02 +04:00
Ilya Fedin 88f1f8ff22 Move QGuiApplication::setDesktopFileName call to Platform::start
It depends on Core::UpdaterDisabled that is not initialized in Launcher::initHook yet
2022-09-05 08:24:48 +04:00
Ilya Fedin 38da0e086d Get rid of lib_waylandshells 2022-09-02 21:27:41 +04:00
Ilya Fedin f1092753fc Remove version from the .desktop file
Some desktop environments hide the launcher if they don't know the version
2022-09-01 13:53:53 +04:00
Ilya Fedin 5fc7caeec9 Provide old version to Platform::NewVersionLaunched 2022-09-01 13:53:53 +04:00
Ilya Fedin 8c1bef929e A better way of PiP aspect ratio handling on Wayland 2022-08-08 11:05:52 +04:00
Ilya Fedin 9e63fc5acd Let PiP have custom buffer size on Wayland 2022-08-04 16:41:25 +04:00
Ilya Fedin bb8ffcac3a Default to Wayland on GNOME for new installs 2022-07-28 20:17:49 +04:00
Ilya Fedin e8477e5911 Get rid of 'paramtersCopy' in dbus code 2022-07-26 21:09:30 +04:00
Ilya Fedin 391a3a77f6 Use Qt's xdg-desktop-portal file dialog implementation 2022-06-14 16:36:44 +04:00
Ilya Fedin 088cca7452 Adapt for XCB::IsSupportedByWM changes 2022-06-14 16:36:44 +04:00
Ilya Fedin a2a401c0b0 Use public Qt API for native dialogs modality 2022-05-19 17:23:47 +04:00
Ilya Fedin acd18a57fb Get rid of the IBUS_USE_PORTAL workaround
It's been a while after the ibus breaking change, the new socket path should be in all major distros and this hack shouldn't be needed anymore.
2022-05-19 17:23:47 +04:00
Ilya Fedin 6a80b1b94c Get rid of __HAIKU__ checks
This is a leftover of something that wasn't finiched and looks like won't be finished. It also feels that's not a good idea to mix Linux and Haiku in the same file though...
2022-05-19 17:23:47 +04:00
23rd 0e16a50bbc Completely removed common and platform code for tray from main window. 2022-05-03 04:25:36 +03:00
Sergey A. Osokin 3ba5b825e5 Fix -Wunused-const-variable warnings by removing unused variables
Fixes #24432
2022-04-26 21:25:05 +04:00
Hugo Osvaldo Barrera c52a5927e5 Avoid a second query for the current color-scheme
Telegram listens for a signal that indicates when the color-scheme
changes. The signal itself includes the new value, but Telegram
currently queries for the value immediately after getting the signal.
This second round-trip is unnecessary, since the signal itself contains
the same information.

This changeset avoids this follow-up query, and drops the now-unused
`Setter`.
2022-04-25 22:38:08 +04:00
Ilya Fedin 62e82a42fb Adapt to lib_base's XDP API changes 2022-04-14 09:15:50 +04:00
Ilya Fedin 80f1f079f1 Move waitForInterfaceAnnounce call to the uses of announced interfaces 2022-04-14 09:11:05 +04:00
Ilya Fedin 17fcc729a2 Implement org.freedesktop.appearance.color-scheme 2022-04-12 17:35:51 +04:00
Ilya Fedin 6fd02ccbae Match socket length check with Qt 2022-03-08 12:41:38 +04:00
Ilya Fedin 99e8d22c51 Move xdg-foreign support to lib_base 2022-02-04 16:31:40 +03:00
Ilya Fedin e5981ed22b Move jemalloc initialization code to cmake_helpers 2022-02-01 14:41:54 +03:00
Ilya Fedin b65d40a22b Get rid of custom SNI implementation
XDG is inventing new tray specification, so SNI will be outdated soon and it's better to just use QSystemTrayIcon.
I believe all the major drawbacks of QSystemTrayIcon are solved and we can live with minor ones.
Given the planned MainWindow refactoring, it seems it's the best time to do that.
2022-01-22 21:18:37 +04:00
Ilya Fedin 726aa3316d Rework DE detection
Variables can point to a mixed environment, make DE detection non-exclusive.
Remove unused methods.
2022-01-07 19:14:59 +03:00
Ilya Fedin 8592326a3c Revert "Use kernel accelerated sendfile to copy files on Linux"
This reverts commit 34534a9653.
2021-12-02 09:15:23 +04:00
Ilya Fedin 2ad20d6c4a Instantiate a local dbus server for webview IPC 2021-11-29 16:23:51 +04:00
Ilya Fedin 22b37c4bf8 Use webkitgtk without its headers 2021-11-06 16:33:39 +04:00
John Preston 1ea6224e60 Fix autostart toggling. 2021-11-05 10:15:41 +04:00
John Preston f10ed4b9bc Support autostart in Windows Store version.
Fixes #3234.
2021-11-04 12:36:28 +04:00
Ilya Fedin 847c01d605 Add Qt 6 support
Tested only on Linux so far
2021-10-21 13:15:00 +04:00
Gleb Smirnoff 59f2f750b4 On FreeBSD the system malloc is jemalloc and non-portable
extensions are enabled including malloc_np.h.
2021-09-15 23:24:39 +03:00
John Preston 8069fdd873 Use base/random.h instead of openssl::RandomValue. 2021-09-15 13:42:22 +03:00
Ilya Fedin e92ae40ecb Implement close to taskbar option 2021-09-13 17:46:53 +03:00
Ilya Fedin 3fbd68cff9 Don't link glib with DESKTOP_APP_DISABLE_DBUS_INTEGRATION 2021-09-12 00:12:13 +03:00
Gleb Smirnoff 720f238cf8 Close a race between Gio threads and Qt application init.
QApplication has a historical feature[1] of calling setlocale(3) at init,
which today cause more harm than good.  Such call isn't thread safe neither
per C standard, not per any known libc implementation.  The Gio threads
would call into locale reading functions all the time, so early access to
locale by Gio may race with setlocale() by Qt leading to undefined behavior.

Platform specific start before the Sandbox (aka QApplication) is at core
design of tdesktop and that order can't be changed. There is no way to pause
Gio until QApplication instantiates.

Fortunately, Qt library itself has a static global flag that prevents it
from calling setlocale() twice. We don't even need to instantiate a
temporary QCoreApplication, we can just call into the method.  So call
it form Platform::start before any existing or future calls to Gio.

Fixes #16922

[1] https://chat.stackoverflow.com/rooms/63812/discussion-between-phil-armstrong-and-matteo-italia
2021-09-10 13:18:20 +03:00
Ilya Fedin 05d4d58f8b Replace GTK integration with xsettings + XDP 2021-09-06 15:43:28 +03:00
Ilya Fedin 6192413f0b Split webview initialization from GtkIntegration class 2021-08-25 12:52:43 +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 e7d39e6046 Get rid of GtkIntegration::initializeSettings use 2021-08-13 15:21:19 +03:00
Ilya Fedin 63a92cb90a Log icon theme 2021-08-13 15:21:19 +03:00
Ilya Fedin 414456d003 Revert "Use gtk clipboard when available to avoid https://bugreports.qt.io/browse/QTBUG-56595"
Fixed in Qt by https://codereview.qt-project.org/c/qt/qtbase/+/306771

This reverts commit 3a91003eea.
2021-08-12 08:51:10 +03:00
Ilya Fedin 1ebf27bfa1 Switch MainWindow to Ui::RpWindow 2021-07-28 18:05:39 +03:00
John Preston 245909e381 Beta version 2.8.12: Prune icon cache on Linux. 2021-07-23 19:39:31 +03:00
Ilya Fedin dc81f9eeaf Remove SetWatchingMediaKeys
Since SPMediaKeyTap has been removed on Mac, Linux is the only platform where this function is implemented, but that's not really needed due to MPRIS support, so SetWatchingMediaKeys can be dropped entirely
2021-07-19 22:56:14 +03:00
Ilya Fedin 49fed41dfa Use RegisterUrlScheme from lib_base 2021-07-19 22:55:57 +03:00