diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-03-11 14:19:01 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-03-11 14:19:01 +0000 |
commit | a0a667fd07e912b1dc425748e58a72fa9a50512f (patch) | |
tree | 027b0ed27a5c3d697dd1aa51a13ca0d3e1375582 /plugins/Dropbox/src/dropbox_menus.cpp | |
parent | f8f38839dba925d30c09d9b1527258973c24e591 (diff) |
Dropbox:
- fixed TabSrmm button behavior
- added ME_DROPBOX_SEND_SUCCEEDED and ME_DROPBOX_SEND_FAILED events
- remained only unicode version of MS_DROPBOX_SEND_FILE
- minor fixes
- version bumped
git-svn-id: http://svn.miranda-ng.org/main/trunk@8557 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_menus.cpp')
-rw-r--r-- | plugins/Dropbox/src/dropbox_menus.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp index a227bb4bb0..b7e60b6198 100644 --- a/plugins/Dropbox/src/dropbox_menus.cpp +++ b/plugins/Dropbox/src/dropbox_menus.cpp @@ -23,9 +23,11 @@ int CDropbox::OnPrebuildContactMenu(void *obj, WPARAM hContact, LPARAM lParam) Menu_ShowItem(instance->contactMenuItems[CMI_SEND_FILES], FALSE);
- WORD status = db_get_w(hContact, GetContactProto(hContact), "Status", ID_STATUS_OFFLINE);
+ char *proto = GetContactProto(hContact);
+ WORD status = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
+ bool canSendOffline = (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDOFFLINE) > 0;
- if (hContact != instance->GetDefaultContact() && status != ID_STATUS_OFFLINE && instance->HasAccessToken() && !instance->hTransferContact)
+ if (hContact != instance->GetDefaultContact() && (status != ID_STATUS_OFFLINE || canSendOffline) && instance->HasAccessToken() && !instance->hTransferContact)
Menu_ShowItem(instance->contactMenuItems[CMI_SEND_FILES], TRUE);
return 0;
|