summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-12-15 17:22:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-12-15 17:22:20 +0000
commitf43be0afa0cfc3262d040e6e28642e5d10b215ca (patch)
tree9d16073b616190120a7d6121dacad63fab9a8e81 /src
parent1eddaf7d6cd4f6b322641f02bd3675add09d8c13 (diff)
fix for creating erroneous .dat in Profile Manager
git-svn-id: http://svn.miranda-ng.org/main/trunk@15868 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/profilemanager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mir_app/src/profilemanager.cpp b/src/mir_app/src/profilemanager.cpp
index caa4215997..c530aae139 100644
--- a/src/mir_app/src/profilemanager.cpp
+++ b/src/mir_app/src/profilemanager.cpp
@@ -127,6 +127,7 @@ class CCreateProfileDlg : public CDlgBase
return 1;
}
+ bool m_bFocused;
CCtrlCombo m_driverList;
CCtrlEdit m_profileName;
CCtrlBase m_warning;
@@ -136,6 +137,7 @@ public:
CDlgBase(g_hInst, IDD_PROFILE_NEW),
m_btnOk(_btn),
m_pd(_pd),
+ m_bFocused(false),
m_driverList(this, IDC_PROFILEDRIVERS),
m_profileName(this, IDC_PROFILENAME),
m_warning(this, IDC_NODBDRIVERS)
@@ -196,7 +198,9 @@ public:
if (wParam) {
m_btnOk.SetText(TranslateT("&Create"));
SendMessage(m_hwnd, WM_INPUTCHANGED, 0, 0);
+ m_bFocused = true;
}
+ else m_bFocused = false;
break;
}
return CDlgBase::DlgProc(msg, wParam, lParam);
@@ -205,11 +209,11 @@ public:
virtual void OnApply()
{
LRESULT curSel = m_driverList.GetCurSel();
- if (curSel == -1)
+ if (curSel == -1 || !m_bFocused)
return; // should never happen
ptrT szName(m_profileName.GetText());
- if (szName == 0)
+ if (mir_tstrlen(szName) == 0)
return;
// profile placed in "profile_name" subfolder