From 6646e16fecc868ba55783c07737a9197dc72f8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 29 Jul 2013 12:10:19 +0000 Subject: Facebook: Use Popup Classes git-svn-id: http://svn.miranda-ng.org/main/trunk@5522 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/dialogs.cpp | 69 +++--------------------------------- 1 file changed, 5 insertions(+), 64 deletions(-) (limited to 'protocols/FacebookRM/src/dialogs.cpp') diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index 113c08175e..fa29e6bc2f 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -456,36 +456,10 @@ INT_PTR CALLBACK FBEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpa LoadDBCheckState(proto, hwnd, IDC_CLIENT_ENABLE, FACEBOOK_KEY_EVENT_CLIENT_ENABLE, DEFAULT_EVENT_CLIENT_ENABLE); LoadDBCheckState(proto, hwnd, IDC_OTHER_ENABLE, FACEBOOK_KEY_EVENT_OTHER_ENABLE, DEFAULT_EVENT_OTHER_ENABLE); - SendDlgItemMessage(hwnd, IDC_COLBACK, CPM_SETCOLOUR, 0, proto->getDword(FACEBOOK_KEY_EVENT_NOTIFICATIONS_COLBACK,DEFAULT_EVENT_COLBACK)); - SendDlgItemMessage(hwnd, IDC_COLTEXT, CPM_SETCOLOUR, 0, proto->getDword(FACEBOOK_KEY_EVENT_NOTIFICATIONS_COLTEXT,DEFAULT_EVENT_COLTEXT)); - SetDlgItemInt(hwnd, IDC_TIMEOUT, proto->getDword(FACEBOOK_KEY_EVENT_NOTIFICATIONS_TIMEOUT, 0),TRUE); - SendDlgItemMessage(hwnd, IDC_COLBACK2, CPM_SETCOLOUR, 0, proto->getDword(FACEBOOK_KEY_EVENT_FEEDS_COLBACK,DEFAULT_EVENT_COLBACK)); - SendDlgItemMessage(hwnd, IDC_COLTEXT2, CPM_SETCOLOUR, 0, proto->getDword(FACEBOOK_KEY_EVENT_FEEDS_COLTEXT,DEFAULT_EVENT_COLTEXT)); - SetDlgItemInt(hwnd, IDC_TIMEOUT2, proto->getDword(FACEBOOK_KEY_EVENT_FEEDS_TIMEOUT, 0),TRUE); - SendDlgItemMessage(hwnd, IDC_COLBACK3, CPM_SETCOLOUR, 0, proto->getDword(FACEBOOK_KEY_EVENT_OTHER_COLBACK,DEFAULT_EVENT_COLBACK)); - SendDlgItemMessage(hwnd, IDC_COLTEXT3, CPM_SETCOLOUR, 0, proto->getDword(FACEBOOK_KEY_EVENT_OTHER_COLTEXT,DEFAULT_EVENT_COLTEXT)); - SetDlgItemInt(hwnd, IDC_TIMEOUT3, proto->getDword(FACEBOOK_KEY_EVENT_OTHER_TIMEOUT, 0),TRUE); - SendDlgItemMessage(hwnd, IDC_COLBACK4, CPM_SETCOLOUR, 0, proto->getDword(FACEBOOK_KEY_EVENT_CLIENT_COLBACK,DEFAULT_EVENT_COLBACK)); - SendDlgItemMessage(hwnd, IDC_COLTEXT4, CPM_SETCOLOUR, 0, proto->getDword(FACEBOOK_KEY_EVENT_CLIENT_COLTEXT,DEFAULT_EVENT_COLTEXT)); - SetDlgItemInt(hwnd, IDC_TIMEOUT4, proto->getDword(FACEBOOK_KEY_EVENT_CLIENT_TIMEOUT, 0),TRUE); - - LoadDBCheckState(proto, hwnd, IDC_NOTIFICATIONS_DEFAULT, FACEBOOK_KEY_EVENT_NOTIFICATIONS_DEFAULT, 0); - LoadDBCheckState(proto, hwnd, IDC_FEEDS_DEFAULT, FACEBOOK_KEY_EVENT_FEEDS_DEFAULT, 0); - LoadDBCheckState(proto, hwnd, IDC_CLIENT_DEFAULT, FACEBOOK_KEY_EVENT_CLIENT_DEFAULT, 0); - LoadDBCheckState(proto, hwnd, IDC_OTHER_DEFAULT, FACEBOOK_KEY_EVENT_OTHER_DEFAULT, 0); - - SendDlgItemMessage(hwnd, IDC_TIMEOUT, EM_LIMITTEXT, 4, 0); - SendDlgItemMessage(hwnd, IDC_TIMEOUT_SPIN, UDM_SETRANGE32, -1, 100); - SendDlgItemMessage(hwnd, IDC_TIMEOUT2, EM_LIMITTEXT, 4, 0); - SendDlgItemMessage(hwnd, IDC_TIMEOUT_SPIN2, UDM_SETRANGE32, -1, 100); - SendDlgItemMessage(hwnd, IDC_TIMEOUT3, EM_LIMITTEXT, 4, 0); - SendDlgItemMessage(hwnd, IDC_TIMEOUT_SPIN3, UDM_SETRANGE32, -1, 100); - SendDlgItemMessage(hwnd, IDC_TIMEOUT4, EM_LIMITTEXT, 4, 0); - SendDlgItemMessage(hwnd, IDC_TIMEOUT_SPIN4, UDM_SETRANGE32, -1, 100); - } return TRUE; - case WM_COMMAND: { + case WM_COMMAND: + { switch (LOWORD(wparam)) { case IDC_PREVIEW: @@ -497,25 +471,14 @@ INT_PTR CALLBACK FBEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpa proto->NotifyEvent(protoName, TranslateT("Sample newsfeed"), NULL, FACEBOOK_EVENT_NEWSFEED); proto->NotifyEvent(protoName, TranslateT("Sample notification"), NULL, FACEBOOK_EVENT_NOTIFICATION); } break; - - case IDC_COLTEXT: - case IDC_COLBACK: - case IDC_COLTEXT2: - case IDC_COLBACK2: - case IDC_COLTEXT3: - case IDC_COLBACK3: - case IDC_COLTEXT4: - case IDC_COLBACK4: - SendMessage(GetParent(hwnd),PSM_CHANGED,0,0); - // TODO: Required? There's a catching clause below } if ((LOWORD(wparam)==IDC_PREVIEW || (HWND)lparam!=GetFocus())) return 0; else - SendMessage(GetParent(hwnd),PSM_CHANGED,0,0); } + SendMessage(GetParent(hwnd),PSM_CHANGED,0,0); - return TRUE; + } return TRUE; case WM_NOTIFY: { @@ -529,30 +492,8 @@ INT_PTR CALLBACK FBEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpa StoreDBCheckState(proto, hwnd, IDC_FEEDS_ENABLE, FACEBOOK_KEY_EVENT_FEEDS_ENABLE); StoreDBCheckState(proto, hwnd, IDC_OTHER_ENABLE, FACEBOOK_KEY_EVENT_OTHER_ENABLE); StoreDBCheckState(proto, hwnd, IDC_CLIENT_ENABLE, FACEBOOK_KEY_EVENT_CLIENT_ENABLE); - - StoreDBCheckState(proto, hwnd, IDC_NOTIFICATIONS_DEFAULT, FACEBOOK_KEY_EVENT_NOTIFICATIONS_DEFAULT); - StoreDBCheckState(proto, hwnd, IDC_FEEDS_DEFAULT, FACEBOOK_KEY_EVENT_FEEDS_DEFAULT); - StoreDBCheckState(proto, hwnd, IDC_OTHER_DEFAULT, FACEBOOK_KEY_EVENT_OTHER_DEFAULT); - StoreDBCheckState(proto, hwnd, IDC_CLIENT_DEFAULT, FACEBOOK_KEY_EVENT_CLIENT_DEFAULT); - - proto->setDword(FACEBOOK_KEY_EVENT_NOTIFICATIONS_COLBACK, SendDlgItemMessage(hwnd,IDC_COLBACK,CPM_GETCOLOUR,0,0)); - proto->setDword(FACEBOOK_KEY_EVENT_NOTIFICATIONS_COLTEXT, SendDlgItemMessage(hwnd,IDC_COLTEXT,CPM_GETCOLOUR,0,0)); - proto->setDword(FACEBOOK_KEY_EVENT_NOTIFICATIONS_TIMEOUT, GetDlgItemInt(hwnd,IDC_TIMEOUT,NULL,TRUE)); - - proto->setDword(FACEBOOK_KEY_EVENT_FEEDS_COLBACK, SendDlgItemMessage(hwnd,IDC_COLBACK2,CPM_GETCOLOUR,0,0)); - proto->setDword(FACEBOOK_KEY_EVENT_FEEDS_COLTEXT, SendDlgItemMessage(hwnd,IDC_COLTEXT2,CPM_GETCOLOUR,0,0)); - proto->setDword(FACEBOOK_KEY_EVENT_FEEDS_TIMEOUT, GetDlgItemInt(hwnd,IDC_TIMEOUT2,NULL,TRUE)); - - proto->setDword(FACEBOOK_KEY_EVENT_OTHER_COLBACK, SendDlgItemMessage(hwnd,IDC_COLBACK3,CPM_GETCOLOUR,0,0)); - proto->setDword(FACEBOOK_KEY_EVENT_OTHER_COLTEXT, SendDlgItemMessage(hwnd,IDC_COLTEXT3,CPM_GETCOLOUR,0,0)); - proto->setDword(FACEBOOK_KEY_EVENT_OTHER_TIMEOUT, GetDlgItemInt(hwnd,IDC_TIMEOUT3,NULL,TRUE)); - - proto->setDword(FACEBOOK_KEY_EVENT_CLIENT_COLBACK, SendDlgItemMessage(hwnd,IDC_COLBACK4,CPM_GETCOLOUR,0,0)); - proto->setDword(FACEBOOK_KEY_EVENT_CLIENT_COLTEXT, SendDlgItemMessage(hwnd,IDC_COLTEXT4,CPM_GETCOLOUR,0,0)); - proto->setDword(FACEBOOK_KEY_EVENT_CLIENT_TIMEOUT, GetDlgItemInt(hwnd,IDC_TIMEOUT4,NULL,TRUE)); } - } - return TRUE; + } return TRUE; } -- cgit v1.2.3