summaryrefslogtreecommitdiff
path: root/protocols/Omegle/src/dialogs.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-05-16 20:46:27 +0000
committerRobert Pösel <robyer@seznam.cz>2013-05-16 20:46:27 +0000
commit296157204cb8c89827ee68c39f5e1783d2de7e86 (patch)
tree0f923ec1c6530e45dfc7c5e2725d2e92afe09bb2 /protocols/Omegle/src/dialogs.cpp
parent693b7a10ad35934e9e91656642e2c2321b27fab3 (diff)
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
Diffstat (limited to 'protocols/Omegle/src/dialogs.cpp')
-rw-r--r--protocols/Omegle/src/dialogs.cpp22
1 files changed, 16 insertions, 6 deletions
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<LPARAM>(Translate(servers[0])));
for(size_t i=1; i<SIZEOF(servers); i++)
- {
SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(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<SIZEOF(languages); i++)
+ SendDlgItemMessageA(hwnd, IDC_LANGUAGE, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(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<OmegleProto*>(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<LPARAM>(Translate(servers[0])));
for(size_t i=1; i<SIZEOF(servers); i++)
- {
SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(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<SIZEOF(languages); i++)
+ SendDlgItemMessageA(hwnd, IDC_LANGUAGE, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(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<OmegleProto*>(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);