mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Completely removed common and platform code for tray from main window.
This commit is contained in:
@@ -255,24 +255,11 @@ void MainWindow::initHook() {
|
||||
LOG(("System tray available: %1").arg(Logs::b(TrayIconSupported())));
|
||||
}
|
||||
|
||||
bool MainWindow::hasTrayIcon() const {
|
||||
return trayIcon;
|
||||
}
|
||||
|
||||
bool MainWindow::isActiveForTrayMenu() {
|
||||
updateIsActive();
|
||||
return Platform::IsWayland() ? isVisible() : isActive();
|
||||
}
|
||||
|
||||
void MainWindow::psShowTrayMenu() {
|
||||
}
|
||||
|
||||
void MainWindow::psTrayMenuUpdated() {
|
||||
}
|
||||
|
||||
void MainWindow::psSetupTrayIcon() {
|
||||
}
|
||||
|
||||
void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {
|
||||
if (!TrayIconSupported()) {
|
||||
return;
|
||||
@@ -329,9 +316,6 @@ void MainWindow::updateIconCounters() {
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
}
|
||||
|
||||
void MainWindow::initTrayMenuHook() {
|
||||
}
|
||||
|
||||
void MainWindow::createGlobalMenu() {
|
||||
const auto ensureWindowShown = [=] {
|
||||
if (isHidden()) {
|
||||
|
@@ -22,8 +22,6 @@ class MainWindow : public Window::MainWindow {
|
||||
public:
|
||||
explicit MainWindow(not_null<Window::Controller*> controller);
|
||||
|
||||
void psShowTrayMenu();
|
||||
|
||||
bool isActiveForTrayMenu() override;
|
||||
|
||||
~MainWindow();
|
||||
@@ -35,21 +33,10 @@ protected:
|
||||
void unreadCounterChangedHook() override;
|
||||
void updateGlobalMenuHook() override;
|
||||
|
||||
void initTrayMenuHook() override;
|
||||
bool hasTrayIcon() const override;
|
||||
|
||||
void workmodeUpdated(Core::Settings::WorkMode mode) override;
|
||||
void createGlobalMenu() override;
|
||||
|
||||
QSystemTrayIcon *trayIcon = nullptr;
|
||||
QMenu *trayIconMenu = nullptr;
|
||||
|
||||
void psTrayMenuUpdated();
|
||||
void psSetupTrayIcon();
|
||||
|
||||
private:
|
||||
base::unique_qptr<Ui::PopupMenu> _trayIconMenuXEmbed;
|
||||
|
||||
QMenuBar *psMainMenu = nullptr;
|
||||
QAction *psLogout = nullptr;
|
||||
QAction *psUndo = nullptr;
|
||||
|
@@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QSystemTrayIcon>
|
||||
#include <QtCore/QStandardPaths>
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtGui/QWindow>
|
||||
|
Reference in New Issue
Block a user