From ca47a5fdfb3d2c845b1dcc6c3668a180046501e1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 20 Feb 2016 16:16:01 +0000 Subject: 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 --- protocols/IRCG/src/ircproto.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'protocols/IRCG') 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")); -- cgit v1.2.3