mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Improve D-Bus notifications handling
Make notifications clickable on Linux by assigning "default" action. Don't react to unrelated notifications clicked by keeping track of qBittorrent notifications IDs and filter out unrelated ones. Make D-Bus Notifications interface proxy class to be maintained manually and fix coding style in it. Closes #9084. PR #17282.
This commit is contained in:
committed by
GitHub
parent
cc0a0b56ed
commit
ac8a6887b6
@@ -72,6 +72,11 @@ namespace Ui
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB)
|
||||
#define QBT_USES_CUSTOMDBUSNOTIFICATIONS
|
||||
class DBusNotifier;
|
||||
#endif
|
||||
|
||||
class MainWindow final : public QMainWindow, public GUIApplicationComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -266,8 +271,9 @@ private:
|
||||
SettingValue<bool> m_storeNotificationTorrentAdded;
|
||||
CachedSettingValue<Log::MsgTypes> m_storeExecutionLogTypes;
|
||||
|
||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB)
|
||||
#ifdef QBT_USES_CUSTOMDBUSNOTIFICATIONS
|
||||
SettingValue<int> m_storeNotificationTimeOut;
|
||||
DBusNotifier *m_notifier = nullptr;
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
|
||||
|
||||
Reference in New Issue
Block a user