From 296157204cb8c89827ee68c39f5e1783d2de7e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Thu, 16 May 2013 20:46:27 +0000 Subject: Omegle: - Show in status bar when Stranger is typing - Added option to chose language of Stranger - Use version.h file - Updated copyright year - Small fixes. - Version bump. git-svn-id: http://svn.miranda-ng.org/main/trunk@4691 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Omegle/src/dialogs.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'protocols/Omegle/src/dialogs.cpp') diff --git a/protocols/Omegle/src/dialogs.cpp b/protocols/Omegle/src/dialogs.cpp index a3dff58abc..057a43955f 100644 --- a/protocols/Omegle/src/dialogs.cpp +++ b/protocols/Omegle/src/dialogs.cpp @@ -3,7 +3,7 @@ Omegle plugin for Miranda Instant Messenger _____________________________________________ -Copyright © 2011-12 Robert Pösel +Copyright © 2011-13 Robert Pösel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -77,11 +77,14 @@ INT_PTR CALLBACK OmegleAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPAR // Server SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, 0, reinterpret_cast(Translate(servers[0]))); for(size_t i=1; i(servers[i])); - } SendDlgItemMessage(hwnd, IDC_SERVER, CB_SETCURSEL, db_get_b(NULL, proto->m_szModuleName, OMEGLE_KEY_SERVER, 0), 0); + // Language + for(size_t i=0; i(Translate(languages[i].lang))); + SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_SETCURSEL, db_get_b(NULL, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, 0), 0); + LoadDBText(proto, hwnd, IDC_NAME, OMEGLE_KEY_NAME); LoadDBText(proto, hwnd, IDC_INTERESTS, OMEGLE_KEY_INTERESTS); LoadDBCheckState(proto, hwnd, IDC_MEET_COMMON, OMEGLE_KEY_MEET_COMMON); @@ -91,6 +94,7 @@ INT_PTR CALLBACK OmegleAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPAR case WM_COMMAND: switch(LOWORD(wparam)) { + case IDC_LANGUAGE: case IDC_SERVER: if (HIWORD(wparam) == CBN_SELCHANGE) { SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); @@ -115,6 +119,7 @@ INT_PTR CALLBACK OmegleAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPAR proto = reinterpret_cast(GetWindowLongPtr(hwnd,GWLP_USERDATA)); db_set_b(NULL, proto->m_szModuleName, OMEGLE_KEY_SERVER, SendDlgItemMessage(hwnd, IDC_SERVER, CB_GETCURSEL, 0, 0)); + db_set_b(NULL, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_GETCURSEL, 0, 0)); StoreDBText(proto, hwnd, IDC_NAME, OMEGLE_KEY_NAME); StoreDBText(proto, hwnd, IDC_INTERESTS, OMEGLE_KEY_INTERESTS); @@ -149,11 +154,14 @@ INT_PTR CALLBACK OmegleOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPAR // Server SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, 0, reinterpret_cast(Translate(servers[0]))); for(size_t i=1; i(servers[i])); - } SendDlgItemMessage(hwnd, IDC_SERVER, CB_SETCURSEL, db_get_b(NULL, proto->m_szModuleName, OMEGLE_KEY_SERVER, 0), 0); + // Language + for(size_t i=0; i(Translate(languages[i].lang))); + SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_SETCURSEL, db_get_b(NULL, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, 0), 0); + LoadDBText(proto, hwnd, IDC_NAME, OMEGLE_KEY_NAME); LoadDBText(proto, hwnd, IDC_INTERESTS, OMEGLE_KEY_INTERESTS); LoadDBText(proto, hwnd, IDC_HI_MESSAGE, OMEGLE_KEY_HI); @@ -175,7 +183,8 @@ INT_PTR CALLBACK OmegleOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPAR switch(LOWORD(wparam)) { - case IDC_SERVER: + case IDC_SERVER: + case IDC_LANGUAGE: if (HIWORD(wparam) == CBN_SELCHANGE) { SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); } break; @@ -209,6 +218,7 @@ INT_PTR CALLBACK OmegleOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPAR proto = reinterpret_cast(GetWindowLongPtr(hwnd,GWLP_USERDATA)); db_set_b(NULL, proto->m_szModuleName, OMEGLE_KEY_SERVER, SendDlgItemMessage(hwnd, IDC_SERVER, CB_GETCURSEL, 0, 0)); + db_set_b(NULL, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_GETCURSEL, 0, 0)); StoreDBText(proto, hwnd, IDC_NAME, OMEGLE_KEY_NAME); StoreDBText(proto, hwnd, IDC_INTERESTS, OMEGLE_KEY_INTERESTS); -- cgit v1.2.3