diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-08-30 11:37:47 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-08-30 11:37:47 +0000 |
commit | ce49c84f3a26f016f9232d2bffdc830d7fd6169f (patch) | |
tree | c6bbdab7b5a42f65461a5d495d962c4ff69b9e97 /protocols/Tox/src/tox_options.cpp | |
parent | beaf93e92827b7bcc77c9f6b2a0c7097d355151c (diff) |
Tox:
- switch to offline when connection is lost
- file transfer support
- code refactoring
- project reordering
- version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@10340 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r-- | protocols/Tox/src/tox_options.cpp | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 2c920f95b2..7df550d585 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -1,27 +1,5 @@ #include "common.h"
-INT_PTR CToxProto::SearchDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- CToxProto *proto = (CToxProto*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
-
- switch (uMsg)
- {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwnd);
- {
- proto = (CToxProto*)lParam;
- SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
-
- //ShowWindow(GetDlgItem(GetParent(hwnd), 1408/*IDC_BYCUSTOM*/), SW_HIDE);
- //ShowWindow(GetDlgItem(GetParent(hwnd), 1402/*IDC_ADVANCEDGROUP*/), SW_HIDE);
- SetDlgItemText(GetParent(hwnd), 1408/*IDC_BYCUSTOM*/, TranslateT("Query"));
- }
- return TRUE;
- }
-
- return FALSE;
-}
-
INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
CToxProto *proto = (CToxProto*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
@@ -122,82 +100,4 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l }
return FALSE;
-}
-
-INT_PTR CToxProto::ToxProfileManagerProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- CToxProto *proto = (CToxProto*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
- TCHAR *profilePath = (TCHAR*)GetWindowLongPtr(hwnd, DWLP_USER);
-
- switch (uMsg)
- {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwnd);
- {
- proto = (CToxProto*)lParam;
- SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
-
- profilePath = (TCHAR*)mir_calloc(sizeof(TCHAR)* MAX_PATH);
- SetWindowLongPtr(hwnd, DWLP_USER, (LONG_PTR)profilePath);
-
- CheckDlgButton(hwnd, IDC_CREATE_NEW, TRUE);
- }
- return TRUE;
-
- case WM_CLOSE:
- EndDialog(hwnd, 0);
- break;
-
- case WM_DESTROY:
- mir_free(profilePath);
- break;
-
- case WM_COMMAND:
- switch (LOWORD(wParam))
- {
- case IDC_USE_EXISTING:
- EnableWindow(GetDlgItem(hwnd, IDC_PROFILE_PATH), IsDlgButtonChecked(hwnd, IDC_USE_EXISTING));
- EnableWindow(GetDlgItem(hwnd, IDC_BROWSE_PROFILE), IsDlgButtonChecked(hwnd, IDC_USE_EXISTING));
- break;
-
- case IDC_BROWSE_PROFILE:
- {
- TCHAR filter[MAX_PATH] = { 0 };
- mir_sntprintf(filter, MAX_PATH, _T("%s\0*.*"), TranslateT("All files (*.*)"));
-
- OPENFILENAME ofn = { sizeof(ofn) };
- ofn.hwndOwner = hwnd;
- ofn.lpstrFilter = filter;
- ofn.nFilterIndex = 1;
- ofn.lpstrFile = profilePath;
- ofn.lpstrTitle = TranslateT("Select tox profile");
- ofn.nMaxFile = MAX_PATH;
- ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER;
-
- if (GetOpenFileName(&ofn) && profilePath)
- {
- SetDlgItemText(hwnd, IDC_PROFILE_PATH, profilePath);
- }
- }
- break;
-
- case IDOK:
- {
- if (IsDlgButtonChecked(hwnd, IDC_USE_EXISTING))
- {
- if (profilePath != NULL)
- {
- std::tstring toxProfilePath = proto->GetToxProfilePath();
- CopyFile(profilePath, toxProfilePath.c_str(), FALSE);
- }
- }
- EndDialog(hwnd, 1);
- }
- break;
-
- }
- break;
- }
-
- return FALSE;
}
\ No newline at end of file |