diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-09 19:38:12 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-09 19:38:12 +0000 |
commit | 8e2a004d967dd3faea172fbed655b0b45c826d54 (patch) | |
tree | d9927aa8060439235584bd0b4bbd27df86c577fe /protocols/SkypeClassic/src/contacts.cpp | |
parent | 7feae2a81f7c4784805329e1d1c1682e689a4008 (diff) |
SkypeClassic:
Upmerge with leecher's repo:
-Implemented Filetransfer extensions for receiving files and avatars via SkypeProxy (sending via SkypeProxy not working yet).
-Added option to disable the check for SENT messages as newer Skype versions don't send this notification anymore.
-Various little code fixes.
Other changes:
- Fixed memory leak
- Fixed crash in x64 builds
- Translation fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11805 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeClassic/src/contacts.cpp')
-rw-r--r-- | protocols/SkypeClassic/src/contacts.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp index 1e94deb493..f07139775d 100644 --- a/protocols/SkypeClassic/src/contacts.cpp +++ b/protocols/SkypeClassic/src/contacts.cpp @@ -12,7 +12,7 @@ // Imported Globals
extern HINSTANCE hInst;
-extern BOOL bSkypeOut, bIsImoproxy;
+extern BOOL bSkypeOut, bIsImoproxy, bHasFileXfer;
extern char protocol, g_szProtoName[];
// Handles
@@ -173,8 +173,10 @@ HANDLE add_contextmenu(MCONTACT) { // We cannot use flag PF1_FILESEND for sending files, as Skype opens its own
// sendfile-Dialog.
- mi = FileTransferItem();
- hMenuFileTransferItem = Menu_AddContactMenuItem(&mi);
+ if (!bHasFileXfer) {
+ mi = FileTransferItem();
+ hMenuFileTransferItem = Menu_AddContactMenuItem(&mi);
+ }
mi = ChatInitItem();
hMenuChatInitItem = Menu_AddContactMenuItem(&mi);
@@ -255,11 +257,19 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM) { // File sending and groupchat-creation works starting with protocol version 5
if (protocol >= 5) {
- mi = FileTransferItem();
- if (db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0)
- mi.flags ^= CMIF_HIDDEN;
- mi.flags |= CMIM_FLAGS;
- Menu_ModifyItem(hMenuFileTransferItem, &mi);
+ if (!bHasFileXfer) {
+ mi = FileTransferItem();
+ if (db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0)
+ mi.flags ^= CMIF_HIDDEN;
+ mi.flags |= CMIM_FLAGS;
+ Menu_ModifyItem(hMenuFileTransferItem, &mi);
+ }
+ mi = BlockContactItem();
+ mi.flags ^= CMIF_HIDDEN;
+ mi.flags |= CMIM_FLAGS | CMIM_NAME;
+ if (db_get_b(hContact, SKYPE_PROTONAME, "IsBlocked", 0) == 1)
+ mi.ptszName = LPGENT("Unblock contact");
+ Menu_ModifyItem(hMenuBlockContactItem, &mi);
}
if (protocol >= 5 || bIsImoproxy) {
@@ -269,12 +279,6 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM) { mi.flags ^= CMIF_HIDDEN;
mi.flags |= CMIM_FLAGS;
Menu_ModifyItem(hMenuChatInitItem, &mi);
- mi = BlockContactItem();
- mi.flags ^= CMIF_HIDDEN;
- mi.flags |= CMIM_FLAGS | CMIM_NAME;
- if (db_get_b(hContact, SKYPE_PROTONAME, "IsBlocked", 0) == 1)
- mi.ptszName = LPGENT("Unblock contact");
- Menu_ModifyItem(hMenuBlockContactItem, &mi);
}
}
|