mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Support running on systems without a system tray. Fixes #3316
This commit is contained in:
@@ -16,30 +16,24 @@
|
||||
|
||||
// QT headers
|
||||
#include <QWidget>
|
||||
#include <QMessageBox>
|
||||
|
||||
// App headers
|
||||
#include "LogWindow.h"
|
||||
#include "MenuActions.h"
|
||||
|
||||
class TrayIcon : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TrayIcon(QString logFile);
|
||||
TrayIcon();
|
||||
~TrayIcon();
|
||||
|
||||
bool Init();
|
||||
void setAppServerUrl(QString appServerUrl);
|
||||
void Init();
|
||||
void enableShutdownMenu();
|
||||
void setMenuActions(MenuActions * menuActions);
|
||||
|
||||
private:
|
||||
void createTrayIcon();
|
||||
bool isSystemTrayAvailable();
|
||||
void createActions();
|
||||
|
||||
void wait(int msec);
|
||||
|
||||
QAction *m_newAction;
|
||||
QAction *m_configAction;
|
||||
QAction *m_logAction;
|
||||
@@ -48,18 +42,7 @@ private:
|
||||
QSystemTrayIcon *m_trayIcon;
|
||||
QMenu *m_trayIconMenu;
|
||||
|
||||
QString m_appServerUrl, m_logFile;
|
||||
|
||||
LogWindow *m_logWindow;
|
||||
|
||||
private slots:
|
||||
void onNew();
|
||||
void onConfig();
|
||||
void onLog();
|
||||
void onQuit();
|
||||
|
||||
signals:
|
||||
void shutdownSignal(QUrl);
|
||||
MenuActions *m_menuActions;
|
||||
};
|
||||
|
||||
#endif // TRAYICON_H
|
||||
|
||||
Reference in New Issue
Block a user