diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp
index 9df63d5623..b5a0a8a82f 100644
--- a/src/connectdlg.cpp
+++ b/src/connectdlg.cpp
@@ -96,6 +96,12 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR
cbxServerAddr->setAccessibleName ( tr ( "Server address edit box" ) );
cbxServerAddr->setAccessibleDescription ( tr ( "Holds the current server address. It also stores old addresses in the combo box list." ) );
+ tbtDeleteServerAddr->setAccessibleName ( tr ( "Delete server address button" ) );
+ tbtDeleteServerAddr->setWhatsThis ( "" + tr ( "Delete Server Address" ) + ": " +
+ tr ( "Click the button to clear the currently selected server address "
+ "and delete it from the list of stored servers." ) );
+ tbtDeleteServerAddr->setText ( u8"\u232B" );
+
UpdateDirectoryComboBox();
// init server address combo box (max MAX_NUM_SERVER_ADDR_ITEMS entries)
@@ -179,6 +185,9 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR
QObject::connect ( butConnect, &QPushButton::clicked, this, &CConnectDlg::OnConnectClicked );
+ // tool buttons
+ QObject::connect ( tbtDeleteServerAddr, &QPushButton::clicked, this, &CConnectDlg::OnDeleteServerAddrClicked );
+
// timers
QObject::connect ( &TimerPing, &QTimer::timeout, this, &CConnectDlg::OnTimerPing );
@@ -731,6 +740,12 @@ void CConnectDlg::OnConnectClicked()
done ( QDialog::Accepted );
}
+void CConnectDlg::OnDeleteServerAddrClicked()
+{
+ pSettings->vstrIPAddress.erase ( pSettings->vstrIPAddress.begin() + cbxServerAddr->currentIndex() );
+ showEvent ( nullptr );
+}
+
void CConnectDlg::OnTimerPing()
{
// send ping messages to the servers in the list
diff --git a/src/connectdlg.h b/src/connectdlg.h
index 078d9ba2ee..13f9ca81e1 100644
--- a/src/connectdlg.h
+++ b/src/connectdlg.h
@@ -101,6 +101,7 @@ public slots:
void OnExpandAllStateChanged ( int value ) { ShowAllMusicians ( value == Qt::Checked ); }
void OnCustomDirectoriesChanged();
void OnConnectClicked();
+ void OnDeleteServerAddrClicked();
void OnTimerPing();
void OnTimerReRequestServList();
diff --git a/src/connectdlgbase.ui b/src/connectdlgbase.ui
index 021d1663e5..279c76dc0b 100644
--- a/src/connectdlgbase.ui
+++ b/src/connectdlgbase.ui
@@ -107,6 +107,9 @@
+ -
+
+
-