diff options
-rw-r--r-- | protocols/SkypeWeb/res/resource.rc | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/resource.h | 5 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_chats.cpp | 14 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_options.cpp | 3 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_options.h | 1 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_profile.cpp | 38 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 6 |
7 files changed, 47 insertions, 24 deletions
diff --git a/protocols/SkypeWeb/res/resource.rc b/protocols/SkypeWeb/res/resource.rc index 29e2448f21..31f6dbcd79 100644 --- a/protocols/SkypeWeb/res/resource.rc +++ b/protocols/SkypeWeb/res/resource.rc @@ -114,7 +114,8 @@ BEGIN LTEXT "Default group:",IDC_STATIC,12,51,69,12
EDITTEXT IDC_GROUP,81,49,217,12,ES_AUTOHSCROLL
GROUPBOX "Others",IDC_STATIC,5,79,298,71
- CONTROL "Automatic messages synchronization",IDC_AUTOSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,94,160,10
+ CONTROL "Automatic messages synchronization",IDC_AUTOSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,94,160,10
+ CONTROL "Use local time for received messages",IDC_LOCALTIME,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,12,108,133,10
END
IDD_PASSWORD_EDITOR DIALOGEX 0, 0, 209, 75
@@ -145,6 +146,7 @@ BEGIN IDD_OPTIONS_MAIN, DIALOG
BEGIN
+ VERTGUIDE, 12
END
IDD_PASSWORD_EDITOR, DIALOG
diff --git a/protocols/SkypeWeb/src/resource.h b/protocols/SkypeWeb/src/resource.h index d86676ff3c..61027d0438 100644 --- a/protocols/SkypeWeb/src/resource.h +++ b/protocols/SkypeWeb/src/resource.h @@ -10,9 +10,8 @@ #define IDC_GROUP 106
#define IDD_PASSWORD_EDITOR 107
#define IDC_SAVEPERMANENTLY 108
-#define IDC_RADIO1 1027
-#define IDC_CHECK2 1028
#define IDC_AUTOSYNC 1028
+#define IDC_LOCALTIME 1029
// Next default values for new objects
//
@@ -20,7 +19,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1029
+#define _APS_NEXT_CONTROL_VALUE 1030
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/protocols/SkypeWeb/src/skype_chats.cpp b/protocols/SkypeWeb/src/skype_chats.cpp index 98259480e2..32608e0228 100644 --- a/protocols/SkypeWeb/src/skype_chats.cpp +++ b/protocols/SkypeWeb/src/skype_chats.cpp @@ -58,10 +58,22 @@ MCONTACT CSkypeProto::AddChatRoom(const char *chatname) void CSkypeProto::SetChatStatus(MCONTACT hContact, int iStatus)
{
ptrT tszChatID(getTStringA(hContact, "ChatID"));
+ ptrT tszNick(getTStringA(hContact, "Nick"));
if (tszChatID == NULL)
return;
+ // start chat session
+ GCSESSION gcw = {0};
+ gcw.cbSize = sizeof(gcw);
+ gcw.iType = GCW_CHATROOM;
+ gcw.pszModule = m_szModuleName;
+ gcw.ptszName = tszNick;
+ gcw.ptszID = tszChatID;
+ gcw.dwItemData = (DWORD)tszChatID;
+ CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw);
+
GCDEST gcd = { m_szModuleName, tszChatID, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
- CallServiceSync(MS_GC_EVENT, (iStatus == ID_STATUS_OFFLINE) ? SESSION_OFFLINE : SESSION_ONLINE, (LPARAM)&gce);
+ CallServiceSync(MS_GC_EVENT, true ? SESSION_INITDONE : WINDOW_HIDDEN, (LPARAM)&gce);
+ CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce);
}
\ No newline at end of file diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp index 9b6b48b448..538f914337 100644 --- a/protocols/SkypeWeb/src/skype_options.cpp +++ b/protocols/SkypeWeb/src/skype_options.cpp @@ -22,7 +22,8 @@ CSkypeOptionsMain::CSkypeOptionsMain(CSkypeProto *proto, int idDialog, HWND hwnd m_skypename(this, IDC_SKYPENAME),
m_password(this, IDC_PASSWORD),
m_group(this, IDC_GROUP),
- m_autosync(this, IDC_AUTOSYNC)
+ m_autosync(this, IDC_AUTOSYNC),
+ m_localtime(this, IDC_LOCALTIME)
{
CreateLink(m_group, SKYPE_SETTINGS_GROUP, _T("Skype"));
CreateLink(m_autosync, "AutoSync", DBVT_BYTE, 1);
diff --git a/protocols/SkypeWeb/src/skype_options.h b/protocols/SkypeWeb/src/skype_options.h index c7c79fcec3..4b5c785337 100644 --- a/protocols/SkypeWeb/src/skype_options.h +++ b/protocols/SkypeWeb/src/skype_options.h @@ -25,6 +25,7 @@ private: CCtrlEdit m_password;
CCtrlEdit m_group;
CCtrlCheck m_autosync;
+ CCtrlCheck m_localtime;
protected:
CSkypeOptionsMain(CSkypeProto *proto, int idDialog, HWND hwndParent = NULL);
diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp index 7ff989f610..3290041229 100644 --- a/protocols/SkypeWeb/src/skype_profile.cpp +++ b/protocols/SkypeWeb/src/skype_profile.cpp @@ -464,24 +464,28 @@ void CSkypeProto::LoadProfile(const NETLIBHTTPREQUEST *response) JSONROOT root(response->pData);
if (root == NULL)
return;
+ ptrA username(mir_t2a(ptrT(json_as_string(json_get(root, "username")))));
+ MCONTACT hContact = NULL;
+ if (!IsMe(username))
+ hContact = GetContact(username);
- UpdateProfileFirstName(root);
- UpdateProfileLastName(root);
- UpdateProfileDisplayName(root);
- UpdateProfileGender(root);
- UpdateProfileBirthday(root);
- UpdateProfileCountry(root);
- UpdateProfileState(root);
- UpdateProfileCity(root);
- UpdateProfileLanguage(root);
- UpdateProfileHomepage(root);
- UpdateProfileAbout(root);
+ UpdateProfileFirstName(root, hContact);
+ UpdateProfileLastName(root, hContact);
+ UpdateProfileDisplayName(root, hContact);
+ UpdateProfileGender(root, hContact);
+ UpdateProfileBirthday(root, hContact);
+ UpdateProfileCountry(root, hContact);
+ UpdateProfileState(root, hContact);
+ UpdateProfileCity(root, hContact);
+ UpdateProfileLanguage(root, hContact);
+ UpdateProfileHomepage(root, hContact);
+ UpdateProfileAbout(root, hContact);
//jobtitle
- UpdateProfileEmails(root);
- UpdateProfilePhoneMobile(root);
- UpdateProfilePhoneHome(root);
- UpdateProfilePhoneOffice(root);
- UpdateProfileStatusMessage(root);
+ UpdateProfileEmails(root, hContact);
+ UpdateProfilePhoneMobile(root, hContact);
+ UpdateProfilePhoneHome(root, hContact);
+ UpdateProfilePhoneOffice(root, hContact);
+ UpdateProfileStatusMessage(root, hContact);
//richMood
- UpdateProfileAvatar(root);
+ UpdateProfileAvatar(root, hContact);
}
\ No newline at end of file diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 8eadeadd08..16c1481374 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -137,7 +137,11 @@ int CSkypeProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* int CSkypeProto::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** tszFilename) { return 0; }
-int CSkypeProto::GetInfo(MCONTACT, int) { return 0; }
+int CSkypeProto::GetInfo(MCONTACT hContact, int)
+{
+ PushRequest(new GetProfileRequest(ptrA(getStringA("TokenSecret")), ptrA(db_get_sa(hContact, m_szModuleName, SKYPE_SETTINGS_ID))), &CSkypeProto::LoadProfile);
+ return 0;
+}
HANDLE CSkypeProto::SearchByEmail(const PROTOCHAR*) { return 0; }
|