Bug #3302 - GUI does not show/hide when tray icon is double clicked
This commit is contained in:
parent
377858334b
commit
57327fba19
|
@ -342,12 +342,18 @@
|
||||||
</action>
|
</action>
|
||||||
<action name="m_pActionMinimize">
|
<action name="m_pActionMinimize">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Minimize</string>
|
<string>&Hide</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Hide</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_pActionRestore">
|
<action name="m_pActionRestore">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Restore</string>
|
<string>&Show</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_pActionSave">
|
<action name="m_pActionSave">
|
||||||
|
|
|
@ -112,7 +112,7 @@ void MainWindow::start(bool firstRun)
|
||||||
createTrayIcon();
|
createTrayIcon();
|
||||||
|
|
||||||
// always show. auto-hide only happens when we have a connection.
|
// always show. auto-hide only happens when we have a connection.
|
||||||
show();
|
showNormal();
|
||||||
|
|
||||||
m_versionChecker.checkLatest();
|
m_versionChecker.checkLatest();
|
||||||
}
|
}
|
||||||
|
@ -172,6 +172,9 @@ void MainWindow::createTrayIcon()
|
||||||
m_pTrayIcon = new QSystemTrayIcon(this);
|
m_pTrayIcon = new QSystemTrayIcon(this);
|
||||||
m_pTrayIcon->setContextMenu(m_pTrayIconMenu);
|
m_pTrayIcon->setContextMenu(m_pTrayIconMenu);
|
||||||
|
|
||||||
|
connect(m_pTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
||||||
|
this, SLOT(trayActivated(QSystemTrayIcon::ActivationReason)));
|
||||||
|
|
||||||
setIcon(synergyDisconnected);
|
setIcon(synergyDisconnected);
|
||||||
|
|
||||||
m_pTrayIcon->show();
|
m_pTrayIcon->show();
|
||||||
|
@ -232,9 +235,6 @@ void MainWindow::initConnections()
|
||||||
connect(m_pActionStopSynergy, SIGNAL(triggered()), this, SLOT(stopSynergy()));
|
connect(m_pActionStopSynergy, SIGNAL(triggered()), this, SLOT(stopSynergy()));
|
||||||
connect(m_pActionQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
|
connect(m_pActionQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
|
||||||
connect(&m_versionChecker, SIGNAL(updateFound(const QString&)), this, SLOT(updateFound(const QString&)));
|
connect(&m_versionChecker, SIGNAL(updateFound(const QString&)), this, SLOT(updateFound(const QString&)));
|
||||||
|
|
||||||
if (m_pTrayIcon)
|
|
||||||
connect(m_pTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::saveSettings()
|
void MainWindow::saveSettings()
|
||||||
|
@ -259,7 +259,7 @@ void MainWindow::setIcon(qSynergyState state)
|
||||||
m_pTrayIcon->setIcon(icon);
|
m_pTrayIcon->setIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::iconActivated(QSystemTrayIcon::ActivationReason reason)
|
void MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason)
|
||||||
{
|
{
|
||||||
if (reason == QSystemTrayIcon::DoubleClick)
|
if (reason == QSystemTrayIcon::DoubleClick)
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,7 +106,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||||
void on_m_pActionWizard_triggered();
|
void on_m_pActionWizard_triggered();
|
||||||
void on_m_pElevateCheckBox_toggled(bool checked);
|
void on_m_pElevateCheckBox_toggled(bool checked);
|
||||||
void synergyFinished(int exitCode, QProcess::ExitStatus);
|
void synergyFinished(int exitCode, QProcess::ExitStatus);
|
||||||
void iconActivated(QSystemTrayIcon::ActivationReason reason);
|
void trayActivated(QSystemTrayIcon::ActivationReason reason);
|
||||||
void startSynergy();
|
void startSynergy();
|
||||||
void stopSynergy();
|
void stopSynergy();
|
||||||
void logOutput();
|
void logOutput();
|
||||||
|
|
Loading…
Reference in New Issue