diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2016-09-17 15:08:31 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2016-09-17 15:08:31 +0000 |
commit | 17e345e621254103a98bbc7e662a2829b7aa3ce6 (patch) | |
tree | 2375a9061c1017330b2c6c6af373ad4c11704934 /plugins | |
parent | 120cf25c9986127259ceb413a46f2ba9716d8bf6 (diff) |
StartupStatus: Cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@17308 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/StatusPlugins/StartupStatus/options.cpp | 74 |
1 files changed, 35 insertions, 39 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index 36681553ee..d5a68121a0 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -21,10 +21,6 @@ #include "startupstatus.h"
#include "../resource.h"
-// prototypes
-INT_PTR CALLBACK CmdlOptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam);
-INT_PTR CALLBACK OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam);
-INT_PTR CALLBACK addProfileDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam);
/////////////////////////////////////////////////////////////////////////////////////////
@@ -538,6 +534,41 @@ static int ClearDatabase(char* filter) static OBJLIST<PROFILEOPTIONS> arProfiles(5);
+INT_PTR CALLBACK addProfileDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ static HWND hwndParent;
+
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ hwndParent = (HWND)lParam;
+ EnableWindow(GetDlgItem(hwndDlg, IDC_OK), FALSE);
+ break;
+
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDC_OK) {
+ wchar_t profileName[128];
+ GetDlgItemText(hwndDlg, IDC_PROFILENAME, profileName, _countof(profileName));
+ SendMessage(hwndParent, UM_ADDPROFILE, 0, (LPARAM)profileName);
+ // done and exit
+ DestroyWindow(hwndDlg);
+ }
+ else if (LOWORD(wParam) == IDC_CANCEL) {
+ DestroyWindow(hwndDlg);
+ }
+ else if (LOWORD(wParam) == IDC_PROFILENAME) {
+ (SendDlgItemMessage(hwndDlg, IDC_PROFILENAME, EM_LINELENGTH, 0, 0) > 0) ? EnableWindow(GetDlgItem(hwndDlg, IDC_OK), TRUE) : EnableWindow(GetDlgItem(hwndDlg, IDC_OK), FALSE);
+ }
+ break;
+
+ case WM_DESTROY:
+ EnableWindow(hwndParent, TRUE);
+ break;
+ }
+
+ return 0;
+}
+
static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
{
static BOOL bNeedRebuildMenu = FALSE;
@@ -890,41 +921,6 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP return 0;
}
-INT_PTR CALLBACK addProfileDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
-{
- static HWND hwndParent;
-
- switch(msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- hwndParent = (HWND)lParam;
- EnableWindow(GetDlgItem(hwndDlg, IDC_OK), FALSE);
- break;
-
- case WM_COMMAND:
- if (LOWORD(wParam) == IDC_OK) {
- wchar_t profileName[128];
- GetDlgItemText(hwndDlg, IDC_PROFILENAME, profileName, _countof(profileName));
- SendMessage(hwndParent, UM_ADDPROFILE, 0, (LPARAM)profileName);
- // done and exit
- DestroyWindow(hwndDlg);
- }
- else if (LOWORD(wParam) == IDC_CANCEL) {
- DestroyWindow(hwndDlg);
- }
- else if (LOWORD(wParam) == IDC_PROFILENAME) {
- (SendDlgItemMessage(hwndDlg,IDC_PROFILENAME,EM_LINELENGTH,0,0) > 0)?EnableWindow(GetDlgItem(hwndDlg, IDC_OK), TRUE):EnableWindow(GetDlgItem(hwndDlg, IDC_OK), FALSE);
- }
- break;
-
- case WM_DESTROY:
- EnableWindow(hwndParent, TRUE);
- break;
- }
-
- return 0;
-}
-
int OptionsInit(WPARAM wparam,LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
|