diff options
author | George Hazan <george.hazan@gmail.com> | 2014-09-13 18:25:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-09-13 18:25:48 +0000 |
commit | a6adee75cb2203221213268847f08006107fe2c9 (patch) | |
tree | 7e631e7ca93e4143e0949a90a59c8624dea25408 /src | |
parent | f4ddf8de528cb486816ed9a4e9e51b51a7b1b142 (diff) |
restored ability to launch a service-mode plugin for a newly created profile
git-svn-id: http://svn.miranda-ng.org/main/trunk@10441 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/database/profilemanager.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index 540a95f45e..9d7d738799 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -53,7 +53,7 @@ struct DetailsPageData struct DlgProfData
{
PROPSHEETHEADER *psh;
- HWND hwndOK, hwndSM;
+ HWND hwndOK;
PROFILEMANAGERDATA *pd;
HANDLE hFileNotify;
};
@@ -226,7 +226,6 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA case WM_SHOWWINDOW:
if (wParam) {
- EnableWindow(dat->hwndSM, FALSE);
SetWindowText(dat->hwndOK, TranslateT("&Create"));
SendMessage(hwndDlg, WM_INPUTCHANGED, 0, 0);
}
@@ -365,7 +364,6 @@ void DeleteProfile(HWND hwndList, int iItem, DlgProfData *dat) return;
mir_sntprintf(profilef, SIZEOF(profilef), TranslateT("Are you sure you want to remove profile \"%s\"?"), profile);
-
if (IDYES != MessageBox(NULL, profilef, _T("Miranda NG"), MB_YESNO | MB_TASKMODAL | MB_ICONWARNING))
return;
@@ -557,10 +555,8 @@ static INT_PTR CALLBACK DlgProfileSelect(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case WM_SHOWWINDOW:
- if (wParam) {
+ if (wParam)
CheckRun(hwndDlg, 0);
- EnableWindow(dat->hwndSM, TRUE);
- }
break;
case WM_CONTEXTMENU:
@@ -625,7 +621,6 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, dat = (DetailsData*)mir_alloc(sizeof(DetailsData));
dat->prof = prof;
prof->hwndOK = GetDlgItem(hwndDlg, IDOK);
- prof->hwndSM = GetDlgItem(hwndDlg, IDC_SM_COMBO);
EnableWindow(prof->hwndOK, FALSE);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
@@ -818,14 +813,13 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case WM_DESTROY:
- if (dat->currentPage != 1) {
- LRESULT curSel = SendDlgItemMessage(hwndDlg, IDC_SM_COMBO, CB_GETCURSEL, 0, 0);
- if (curSel != CB_ERR) {
- int idx = SendDlgItemMessage(hwndDlg, IDC_SM_COMBO, CB_GETITEMDATA, (WPARAM)curSel, 0);
- if (idx != CB_ERR)
- SetServiceModePlugin(servicePlugins[idx]);
- }
+ LRESULT curSel = SendDlgItemMessage(hwndDlg, IDC_SM_COMBO, CB_GETCURSEL, 0, 0);
+ if (curSel != CB_ERR) {
+ int idx = SendDlgItemMessage(hwndDlg, IDC_SM_COMBO, CB_GETITEMDATA, (WPARAM)curSel, 0);
+ if (idx != CB_ERR)
+ SetServiceModePlugin(servicePlugins[idx]);
}
+
DestroyIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, 0));
DestroyIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, 0));
DeleteObject(dat->hBoldFont);
|