summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
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
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')
-rw-r--r--protocols/FacebookRM/res/facebook.rc8
-rw-r--r--protocols/FacebookRM/src/dialogs.cpp64
2 files changed, 39 insertions, 33 deletions
diff --git a/protocols/FacebookRM/res/facebook.rc b/protocols/FacebookRM/res/facebook.rc
index 7c0961e2d3..fba81488a7 100644
--- a/protocols/FacebookRM/res/facebook.rc
+++ b/protocols/FacebookRM/res/facebook.rc
@@ -107,13 +107,13 @@ EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
GROUPBOX "User details",IDC_STATIC,7,7,291,60
- LTEXT "E-mail:",IDC_STATIC,17,19,61,8
+ LTEXT "E-mail:",IDC_STATIC,17,19,61,8,0,WS_EX_RIGHT
EDITTEXT IDC_UN,84,17,123,13,ES_AUTOHSCROLL
- LTEXT "Password:",IDC_STATIC,17,35,61,8
+ LTEXT "Password:",IDC_STATIC,17,35,61,8,0,WS_EX_RIGHT
EDITTEXT IDC_PW,84,33,123,13,ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "Create a new Facebook account",IDC_NEWACCOUNTLINK,
"Hyperlink",WS_TABSTOP,84,52,189,10
- LTEXT "Default group:",IDC_STATIC,17,85,61,8
+ LTEXT "Default group:",IDC_STATIC,17,85,61,8,0,WS_EX_RIGHT
EDITTEXT IDC_GROUP,84,84,123,13,ES_AUTOHSCROLL
CONTROL "Automatically set 'Ignore status change' flag",IDC_SET_IGNORE_STATUS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,101,271,10
@@ -156,7 +156,7 @@ BEGIN
CONTROL "Allow posting statuses to my pages (may slow down login)",IDC_LOAD_PAGES,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,84,267,10
RTEXT "Use this server for opening links:",IDC_STATIC,17,100,135,8
- COMBOBOX IDC_URL_SERVER,156,97,96,59,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_URL_SERVER,156,97,128,59,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Enable support for Custom smileys (EXPERIMENTAL + BUGGY!)",IDC_CUSTOM_SMILEYS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,136,267,10
CONTROL "Use local time for received messages",IDC_USE_LOCAL_TIME,
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);