summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-06-15 19:31:55 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-06-15 19:31:55 +0000
commitdeba5f68550f2b0100f85e317a148351ca72d221 (patch)
treea998fb4db30613f987e64adfab3c8033e461f0d2 /protocols/FacebookRM/src
parent3c183a5fe4a4f08306a99565e52933c810261ac8 (diff)
Facebook: Fixed Apply button
git-svn-id: http://svn.miranda-ng.org/main/trunk@9512 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r--protocols/FacebookRM/src/dialogs.cpp64
1 files changed, 35 insertions, 29 deletions
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp
index ffe1168e93..0c6a91a3bb 100644
--- a/protocols/FacebookRM/src/dialogs.cpp
+++ b/protocols/FacebookRM/src/dialogs.cpp
@@ -379,22 +379,19 @@ INT_PTR CALLBACK FBOptionsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
case WM_COMMAND:
{
- if (LOWORD(wparam) == IDC_NEWACCOUNTLINK)
- {
+ switch (LOWORD(wparam)) {
+ case IDC_NEWACCOUNTLINK:
proto->OpenUrl(std::string(FACEBOOK_URL_HOMEPAGE));
return TRUE;
- }
-
- if (LOWORD(wparam) == IDC_SECURE) {
- EnableWindow(GetDlgItem(hwnd, IDC_SECURE_CHANNEL), IsDlgButtonChecked(hwnd, IDC_SECURE));
- }
-
- if ((LOWORD(wparam)==IDC_UN || LOWORD(wparam)==IDC_PW || LOWORD(wparam)==IDC_GROUP) &&
- (HIWORD(wparam)!=EN_CHANGE || (HWND)lparam!=GetFocus()))
- return 0;
- else
+ case IDC_UN:
+ case IDC_PW:
+ case IDC_GROUP:
+ if (HIWORD(wparam)==EN_CHANGE && (HWND)lparam==GetFocus())
+ SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
+ break;
+ default:
SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
-
+ }
} break;
case WM_NOTIFY:
@@ -471,15 +468,26 @@ INT_PTR CALLBACK FBOptionsAdvancedProc(HWND hwnd, UINT message, WPARAM wparam, L
}
case WM_COMMAND: {
- if (LOWORD(wparam) == IDC_SECURE) {
+ switch (LOWORD(wparam)) {
+ case IDC_SECURE:
EnableWindow(GetDlgItem(hwnd, IDC_SECURE_CHANNEL), IsDlgButtonChecked(hwnd, IDC_SECURE));
+ SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
+ break;
+ case IDC_URL_SERVER:
+ if(HIWORD(wparam) == CBN_SELCHANGE)
+ SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
+ break;
+ case IDC_MESSAGES_COUNT:
+ if(HIWORD(wparam) == EN_CHANGE && (HWND)lparam==GetFocus())
+ SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
+ break;
+ case IDC_SECURE_CHANNEL:
+ if (IsDlgButtonChecked(hwnd, IDC_SECURE_CHANNEL))
+ MessageBox(hwnd, TranslateT("Note: Make sure you have disabled 'Validate SSL certificates' option in Network options to work properly."), proto->m_tszUserName, MB_OK);
+ default:
+ SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
+ break;
}
-
- if (LOWORD(wparam) == IDC_SECURE_CHANNEL && IsDlgButtonChecked(hwnd, IDC_SECURE_CHANNEL))
- MessageBox(hwnd, TranslateT("Note: Make sure you have disabled 'Validate SSL certificates' option in Network options to work properly."), proto->m_tszUserName, MB_OK);
-
- SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
-
break;
}
@@ -553,7 +561,6 @@ INT_PTR CALLBACK FBEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpa
} return TRUE;
case WM_COMMAND:
- {
switch (LOWORD(wparam))
{
case IDC_PREVIEW:
@@ -562,14 +569,14 @@ INT_PTR CALLBACK FBEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpa
proto->NotifyEvent(proto->m_tszUserName, TranslateT("Sample newsfeed"), NULL, FACEBOOK_EVENT_NEWSFEED);
proto->NotifyEvent(proto->m_tszUserName, TranslateT("Sample notification"), NULL, FACEBOOK_EVENT_NOTIFICATION);
break;
- }
-
- if ((LOWORD(wparam)==IDC_PREVIEW || (HWND)lparam!=GetFocus()))
- return 0;
- else
+ case IDC_FEED_TYPE:
+ if(HIWORD(wparam) == CBN_SELCHANGE)
+ SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
+ break;
+ default:
SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
-
- } return TRUE;
+ }
+ return TRUE;
case WM_NOTIFY:
{
@@ -578,7 +585,6 @@ INT_PTR CALLBACK FBEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpa
proto->setByte(FACEBOOK_KEY_FEED_TYPE, SendDlgItemMessage(hwnd, IDC_FEED_TYPE, CB_GETCURSEL, 0, 0));
StoreDBCheckState(proto, hwnd, IDC_SYSTRAY_NOTIFY, FACEBOOK_KEY_SYSTRAY_NOTIFY);
-
StoreDBCheckState(proto, hwnd, IDC_NOTIFICATIONS_ENABLE, FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE);
StoreDBCheckState(proto, hwnd, IDC_FEEDS_ENABLE, FACEBOOK_KEY_EVENT_FEEDS_ENABLE);
StoreDBCheckState(proto, hwnd, IDC_OTHER_ENABLE, FACEBOOK_KEY_EVENT_OTHER_ENABLE);