summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-06-04 16:21:08 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-06-04 16:21:08 +0000
commit625d0a8916327ffe942fc8683291c6355e814963 (patch)
treec6521e70f0758f7959f91b1e0ee987526c060260 /protocols
parent85b8e59c6eaca1dd444789db06ffdd9582045c05 (diff)
SkypeWeb: Setting for place.
git-svn-id: http://svn.miranda-ng.org/main/trunk@14000 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/SkypeWeb/res/resource.rc31
-rw-r--r--protocols/SkypeWeb/src/requests/capabilities.h9
-rw-r--r--protocols/SkypeWeb/src/resource.h3
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_login.cpp15
-rw-r--r--protocols/SkypeWeb/src/skype_options.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_options.h1
7 files changed, 41 insertions, 24 deletions
diff --git a/protocols/SkypeWeb/res/resource.rc b/protocols/SkypeWeb/res/resource.rc
index 345ed4612f..6c0ac9776e 100644
--- a/protocols/SkypeWeb/res/resource.rc
+++ b/protocols/SkypeWeb/res/resource.rc
@@ -13,11 +13,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// Neutral (Default) resources
+// Нейтральный (по умолчанию) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUD)
LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
-#pragma code_page(1250)
+#pragma code_page(1251)
/////////////////////////////////////////////////////////////////////////////
//
@@ -35,12 +35,12 @@ IDI_CALL ICON "Icons\\call.ico"
IDI_NOTIFY ICON "Icons\\notify.ico"
IDI_ACTION_ME ICON "Icons\\me.ico"
IDI_ERRORICON ICON "Icons\\error.ico"
-#endif // Neutral (Default) resources
+#endif // Нейтральный (по умолчанию) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Russian (Russia) resources
+// Русский (Россия) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
@@ -128,12 +128,12 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
-#endif // Russian (Russia) resources
+#endif // Русский (Россия) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// English resources
+// Английский resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
@@ -169,12 +169,12 @@ BEGIN
EDITTEXT IDC_PASSWORD,81,33,217,12,ES_PASSWORD | ES_AUTOHSCROLL
LTEXT "Default group:",IDC_STATIC,13,51,69,12
EDITTEXT IDC_GROUP,81,49,217,12,ES_AUTOHSCROLL
- GROUPBOX "Others",IDC_STATIC,5,79,298,51
+ GROUPBOX "Others",IDC_STATIC,5,79,298,65
CONTROL "Automatic messages synchronization",IDC_AUTOSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,89,282,10
- CONTROL "Use local time for received messages",IDC_LOCALTIME,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,100,282,10
- CONTROL "Always notify as unread for all incoming message",IDC_MESASUREAD,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,112,209,10
+ CONTROL "Use local time for received messages",IDC_LOCALTIME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,100,282,10
+ CONTROL "Always notify as unread for all incoming message",IDC_MESASUREAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,112,209,10
+ EDITTEXT IDC_PLACE,81,124,109,14,ES_AUTOHSCROLL
+ LTEXT "Place:",IDC_STATIC,13,127,33,9
END
IDD_PASSWORD_EDITOR DIALOGEX 0, 0, 209, 75
@@ -207,9 +207,14 @@ BEGIN
IDD_OPTIONS_MAIN, DIALOG
BEGIN
VERTGUIDE, 13
+ VERTGUIDE, 81
HORZGUIDE, 89
HORZGUIDE, 99
- HORZGUIDE, 142
+ HORZGUIDE, 110
+ HORZGUIDE, 117
+ HORZGUIDE, 120
+ HORZGUIDE, 131
+ HORZGUIDE, 138
HORZGUIDE, 153
END
@@ -219,7 +224,7 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
-#endif // English resources
+#endif // Английский resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/SkypeWeb/src/requests/capabilities.h b/protocols/SkypeWeb/src/requests/capabilities.h
index 5ac258db10..bc965e5a9b 100644
--- a/protocols/SkypeWeb/src/requests/capabilities.h
+++ b/protocols/SkypeWeb/src/requests/capabilities.h
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
class SendCapabilitiesRequest : public HttpRequest
{
public:
- SendCapabilitiesRequest(const char *regToken, const char *endpointID, const char *server = SKYPE_ENDPOINTS_HOST) :
+ SendCapabilitiesRequest(const char *regToken, const char *endpointID, const char *hostname, const char *server = SKYPE_ENDPOINTS_HOST) :
HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/users/ME/endpoints/%s/presenceDocs/messagingService", server, ptrA(mir_urlEncode(endpointID)))
{
Headers
@@ -29,14 +29,9 @@ public:
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
<< FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken);
-
- TCHAR compName[MAX_COMPUTERNAME_LENGTH + 1];
- DWORD size = SIZEOF(compName);
- GetComputerName(compName, &size);
-
JSONNode privateInfo(JSON_NODE);
privateInfo.set_name("privateInfo");
- privateInfo.push_back(JSONNode("epname", (char*)T2Utf(compName)));
+ privateInfo.push_back(JSONNode("epname", hostname));
JSONNode publicInfo(JSON_NODE);
publicInfo.set_name("publicInfo");
diff --git a/protocols/SkypeWeb/src/resource.h b/protocols/SkypeWeb/src/resource.h
index 0e6ade4cb5..43bc008820 100644
--- a/protocols/SkypeWeb/src/resource.h
+++ b/protocols/SkypeWeb/src/resource.h
@@ -26,6 +26,7 @@
#define IDC_TITLE 1031
#define IDC_CONTACT 1032
#define IDC_MESASUREAD 1033
+#define IDC_PLACE 1034
// Next default values for new objects
//
@@ -33,7 +34,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 124
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1034
+#define _APS_NEXT_CONTROL_VALUE 1035
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index fca06e2f91..1ca0f61b94 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -254,7 +254,7 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response)
do
{
LIST<char> users(1);
- for (; i < skypenames.getCount() && users.getCount() < 20; i++)
+ for (; i < skypenames.getCount() && users.getCount() < 25; i++)
{
users.insert(skypenames[i]);
}
diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp
index 056f3df9bc..28131e1062 100644
--- a/protocols/SkypeWeb/src/skype_login.cpp
+++ b/protocols/SkypeWeb/src/skype_login.cpp
@@ -141,8 +141,21 @@ void CSkypeProto::OnSubscriptionsCreated(const NETLIBHTTPREQUEST *response)
SetStatus(ID_STATUS_OFFLINE);
return;
}
+ char *cName;
+ ptrT place(getTStringA("Place"));
- PushRequest(new SendCapabilitiesRequest(RegToken, EndpointId, Server), &CSkypeProto::OnCapabilitiesSended);
+ if (place && *place)
+ cName = mir_utf8encodeT(place);
+ else
+ {
+ char compName[MAX_COMPUTERNAME_LENGTH + 1];
+ DWORD size = SIZEOF(compName);
+ GetComputerNameA(compName, &size);
+ cName = compName;
+ }
+ PushRequest(new SendCapabilitiesRequest(RegToken, EndpointId, cName, Server), &CSkypeProto::OnCapabilitiesSended);
+
+ mir_free(cName);
}
void CSkypeProto::OnCapabilitiesSended(const NETLIBHTTPREQUEST *response)
diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp
index 7ef8886381..a257514c70 100644
--- a/protocols/SkypeWeb/src/skype_options.cpp
+++ b/protocols/SkypeWeb/src/skype_options.cpp
@@ -24,12 +24,14 @@ CSkypeOptionsMain::CSkypeOptionsMain(CSkypeProto *proto, int idDialog)
m_group(this, IDC_GROUP),
m_autosync(this, IDC_AUTOSYNC),
m_localtime(this, IDC_LOCALTIME),
- m_allasunread(this, IDC_MESASUREAD)
+ m_allasunread(this, IDC_MESASUREAD),
+ m_place(this, IDC_PLACE)
{
CreateLink(m_group, SKYPE_SETTINGS_GROUP, _T("Skype"));
CreateLink(m_autosync, "AutoSync", DBVT_BYTE, 1);
CreateLink(m_localtime, "UseLocalTime", DBVT_BYTE, 0);
CreateLink(m_allasunread, "MarkMesUnread", DBVT_BYTE, 0);
+ CreateLink(m_place, "Place", _T(""));
}
void CSkypeOptionsMain::OnInitDialog()
diff --git a/protocols/SkypeWeb/src/skype_options.h b/protocols/SkypeWeb/src/skype_options.h
index f9eeea1177..35a2a743e6 100644
--- a/protocols/SkypeWeb/src/skype_options.h
+++ b/protocols/SkypeWeb/src/skype_options.h
@@ -24,6 +24,7 @@ private:
CCtrlEdit m_skypename;
CCtrlEdit m_password;
CCtrlEdit m_group;
+ CCtrlEdit m_place;
CCtrlCheck m_autosync;
CCtrlCheck m_localtime;
CCtrlCheck m_allasunread;