diff --git a/src/llconserverdlg.cpp b/src/llconserverdlg.cpp index 517e1dd8..8e2bd5aa 100755 --- a/src/llconserverdlg.cpp +++ b/src/llconserverdlg.cpp @@ -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 ); diff --git a/src/llconserverdlg.h b/src/llconserverdlg.h index 0dc50cdc..a22dc0ae 100755 --- a/src/llconserverdlg.h +++ b/src/llconserverdlg.h @@ -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 );