unregister server on shutdown, add tooltip to server task bar icon
This commit is contained in:
parent
0d81a824f9
commit
6596a464a4
2 changed files with 16 additions and 0 deletions
|
@ -132,6 +132,9 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP,
|
|||
|
||||
SystemTrayIcon.setContextMenu ( pSystemTrayIconMenu );
|
||||
|
||||
// set tool text
|
||||
SystemTrayIcon.setToolTip ( QString ( APP_NAME ) + tr ( " server" ) );
|
||||
|
||||
// show icon of state "inactive"
|
||||
SystemTrayIcon.setIcon ( QIcon ( BitmapSystemTrayInactive ) );
|
||||
SystemTrayIcon.show();
|
||||
|
@ -300,6 +303,18 @@ ListViewClients->setMinimumHeight ( 140 );
|
|||
Timer.start ( GUI_CONTRL_UPDATE_TIME );
|
||||
}
|
||||
|
||||
void CLlconServerDlg::closeEvent ( QCloseEvent* Event )
|
||||
{
|
||||
// if server was registered at the central server, unregister on shutdown
|
||||
if ( pServer->GetServerListEnabled() )
|
||||
{
|
||||
pServer->UnregisterSlaveServer();
|
||||
}
|
||||
|
||||
// default implementation of this event handler routine
|
||||
Event->accept();
|
||||
}
|
||||
|
||||
void CLlconServerDlg::OnStartOnOSStartStateChanged ( int value )
|
||||
{
|
||||
const bool bCurAutoStartMinState = ( value == Qt::Checked );
|
||||
|
|
|
@ -65,6 +65,7 @@ public:
|
|||
protected:
|
||||
virtual void customEvent ( QEvent* pEvent );
|
||||
virtual void changeEvent ( QEvent* pEvent );
|
||||
virtual void closeEvent ( QCloseEvent* Event );
|
||||
|
||||
void UpdateGUIDependencies();
|
||||
void UpdateSystemTrayIcon ( const bool bIsActive );
|
||||
|
|
Loading…
Reference in a new issue