diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-05-13 19:37:17 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-05-13 19:37:17 +0000 |
commit | 5865e7f3b1013d8540e8bd5a8a012da26d6f6768 (patch) | |
tree | 3306e638bbeb49588e4e2134d04be4aac517da7d /plugins | |
parent | e3bcb957b3f5f84900f770085a6aa32d352cce9b (diff) |
git-svn-id: http://svn.miranda-ng.org/main/trunk@13576 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Dropbox/src/dropbox.h | 3 | ||||
-rw-r--r-- | plugins/Dropbox/src/dropbox_dialogs.cpp | 80 |
2 files changed, 1 insertions, 82 deletions
diff --git a/plugins/Dropbox/src/dropbox.h b/plugins/Dropbox/src/dropbox.h index e8340d5fcd..6889c0467a 100644 --- a/plugins/Dropbox/src/dropbox.h +++ b/plugins/Dropbox/src/dropbox.h @@ -104,9 +104,6 @@ private: static INT_PTR SendFilesToDropboxCommand(void *obj, WPARAM wParam, LPARAM lParam);
- // dialogs
- static INT_PTR CALLBACK MainOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
// SRMM
static void DisableSrmmButton(MCONTACT hContact);
diff --git a/plugins/Dropbox/src/dropbox_dialogs.cpp b/plugins/Dropbox/src/dropbox_dialogs.cpp index 0634fab398..a83b5e9f4c 100644 --- a/plugins/Dropbox/src/dropbox_dialogs.cpp +++ b/plugins/Dropbox/src/dropbox_dialogs.cpp @@ -13,82 +13,4 @@ void CDropboxDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE ty void CDropboxDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, TCHAR *szValue)
{
ctrl.CreateDbLink(MODULE, szSetting, szValue);
-}
-
-/////////////////////////////////////////////////////////////
-
-INT_PTR CALLBACK CDropbox::MainOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- CDropbox *instance = (CDropbox*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- switch (msg)
- {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- instance = (CDropbox*)lParam;
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_AUTHORIZE), FALSE);
- {
- LOGFONT lf;
- HFONT hFont = (HFONT)SendDlgItemMessage(hwndDlg, IDC_AUTH_STATUS, WM_GETFONT, 0, 0);
- GetObject(hFont, sizeof(lf), &lf);
- lf.lfWeight = FW_BOLD;
- SendDlgItemMessage(hwndDlg, IDC_AUTH_STATUS, WM_SETFONT, (WPARAM)CreateFontIndirect(&lf), 0);
-
- if (instance->HasAccessToken())
- SetDlgItemText(hwndDlg, IDC_AUTH_STATUS, TranslateT("you are already authorized"));
- else
- SetDlgItemText(hwndDlg, IDC_AUTH_STATUS, TranslateT("you are not authorized yet"));
-
- CheckDlgButton(hwndDlg, IDC_USE_SHORT_LINKS, db_get_b(NULL, MODULE, "UseSortLinks", 1) ? BST_CHECKED : BST_UNCHECKED);
- if (db_get_b(NULL, MODULE, "UrlAutoSend", 1))
- CheckDlgButton(hwndDlg, IDC_URL_AUTOSEND, BST_CHECKED);
- else if (db_get_b(NULL, MODULE, "UrlPasteToMessageInputArea", 1))
- CheckDlgButton(hwndDlg, IDC_URL_COPYTOMIA, BST_CHECKED);
- CheckDlgButton(hwndDlg, IDC_URL_COPYTOCB, db_get_b(NULL, MODULE, "UrlCopyToClipboard", 0) ? BST_CHECKED : BST_UNCHECKED);
- }
- return TRUE;
-
- case WM_COMMAND:
- switch (LOWORD(wParam))
- {
- case IDC_GETAUTH:
- CallService(MS_UTILS_OPENURL, 0, (LPARAM)DROPBOX_WWW_URL DROPBOX_API_VER "/oauth2/authorize?response_type=code&client_id=" DROPBOX_APP_KEY);
- SetFocus(GetDlgItem(hwndDlg, IDC_REQUEST_CODE));
- break;
-
- case IDC_REQUEST_CODE:
- if ((HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0;
-
- char requestToken[128];
- GetDlgItemTextA(hwndDlg, IDC_REQUEST_CODE, requestToken, SIZEOF(requestToken));
- EnableWindow(GetDlgItem(hwndDlg, IDC_AUTHORIZE), strlen(requestToken) != 0);
- break;
-
- case IDC_AUTHORIZE:
- mir_forkthreadowner(CDropbox::RequestAccessTokenAsync, instance, hwndDlg, 0);
- break;
-
- case IDC_USE_SHORT_LINKS:
- case IDC_URL_AUTOSEND:
- case IDC_URL_COPYTOML:
- case IDC_URL_COPYTOCB:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- }
- break;
-
- case WM_NOTIFY:
- if (reinterpret_cast<NMHDR*>(lParam)->code == PSN_APPLY)
- {
- db_set_b(NULL, MODULE, "UseSortLinks", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USE_SHORT_LINKS));
- db_set_b(NULL, MODULE, "UrlAutoSend", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_URL_AUTOSEND));
- db_set_b(NULL, MODULE, "UrlPasteToMessageInputArea", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_URL_COPYTOMIA));
- db_set_b(NULL, MODULE, "UrlCopyToClipboard", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_URL_COPYTOCB));
- }
- break;
- }
- return FALSE;
-}
+}
\ No newline at end of file |