add padlock icon when use secure connection #4313

This commit is contained in:
XinyuHou 2015-02-13 10:14:11 +00:00
parent 629f4b1781
commit d642714fe8
4 changed files with 25 additions and 0 deletions

View File

@ -307,6 +307,19 @@
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="m_pLabelPadlock">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="Synergy.qrc">:/res/icons/16x16/padlock.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="m_pStatusLabel">
<property name="text">

View File

@ -52,5 +52,6 @@
<file>lang/Languages.xml</file>
<file>icons/16x16/money.png</file>
<file>image/spinning-wheel.gif</file>
<file>icons/16x16/padlock.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

View File

@ -129,6 +129,8 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
m_pComboServerList->hide();
updateEdition();
m_pLabelPadlock->hide();
}
MainWindow::~MainWindow()
@ -726,13 +728,22 @@ void MainWindow::setSynergyState(qSynergyState state)
switch (state)
{
case synergyConnected: {
if (m_AppConfig.getCryptoEnabled()) {
m_pLabelPadlock->show();
}
else {
m_pLabelPadlock->hide();
}
setStatus(tr("Synergy is running."));
break;
}
case synergyConnecting:
m_pLabelPadlock->hide();
setStatus(tr("Synergy is starting."));
break;
case synergyDisconnected:
m_pLabelPadlock->hide();
setStatus(tr("Synergy is not running."));
break;
}