summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-02-20 16:16:01 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-02-20 16:16:01 +0000
commitca47a5fdfb3d2c845b1dcc6c3668a180046501e1 (patch)
tree6cb2b66c4e9fe303c16b0456d646791ae45edbe0
parentd363c51d46ee4cd1775ea5b28a50b80175e25dcc (diff)
IRC: no need to display connection dialogs as many times as ::SetStatus was called
git-svn-id: http://svn.miranda-ng.org/main/trunk@16315 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/IRCG/src/ircproto.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp
index 91c2744542..98de854279 100644
--- a/protocols/IRCG/src/ircproto.cpp
+++ b/protocols/IRCG/src/ircproto.cpp
@@ -709,10 +709,13 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal)
{
if (iNewStatus != ID_STATUS_OFFLINE && !m_network[0]) {
if (m_nick[0] && !m_disableDefaultServer) {
- CQuickDlg* dlg = new CQuickDlg(this);
- dlg->GetProto()->m_quickComboSelection = dlg->GetProto()->m_serverComboSelection + 1;
- dlg->Show();
- HWND hwnd = dlg->GetHwnd();
+ if (m_quickDlg == NULL) {
+ m_quickDlg = new CQuickDlg(this);
+ m_quickComboSelection = m_serverComboSelection + 1;
+ m_quickDlg->Show();
+ }
+
+ HWND hwnd = m_quickDlg->GetHwnd();
SetWindowTextA(hwnd, "Miranda IRC");
SetDlgItemText(hwnd, IDC_TEXT, TranslateT("Please choose an IRC-network to go online. This network will be the default."));
SetDlgItemText(hwnd, IDC_CAPTION, TranslateT("Default network"));