Improve startup window state handling

Replace current "Start qBittorrent minimized" option with "Initial window state" that allows to start qBittorrent as "hidden in system tray" while retaining regular "minimize to panel" functionality.

PR #18252.
Closes #487.
This commit is contained in:
Vladimir Golovnev
2023-01-16 14:57:56 +03:00
committed by GitHub
parent 0d376e7fd6
commit 32e4371208
15 changed files with 151 additions and 59 deletions

View File

@@ -1,7 +1,7 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2022 Mike Tzou (Chocobo1)
* Copyright (C) 2015, 2019 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2015-2022 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2006 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
@@ -31,6 +31,7 @@
#pragma once
#include "base/interfaces/iapplication.h"
#include "gui/windowstate.h"
class DesktopIntegration;
class MainWindow;
@@ -43,6 +44,9 @@ public:
virtual DesktopIntegration *desktopIntegration() = 0;
virtual MainWindow *mainWindow() = 0;
virtual WindowState startUpWindowState() const = 0;
virtual void setStartUpWindowState(WindowState windowState) = 0;
virtual bool isTorrentAddedNotificationsEnabled() const = 0;
virtual void setTorrentAddedNotificationsEnabled(bool value) = 0;
};