diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-02-24 18:08:46 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-02-24 18:08:46 +0000 |
commit | 03563512f9572fe74bc60adba3f7b6cdcc1d1047 (patch) | |
tree | fc2989c4c6a495ab461a5234184711624362e714 /plugins/Dropbox/src/dropbox_menus.cpp | |
parent | e62bc2a6f28f6a7b7fcb3996e9fab86fae3239f7 (diff) |
Dropbox: fixed status detection
git-svn-id: http://svn.miranda-ng.org/main/trunk@8264 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_menus.cpp')
-rw-r--r-- | plugins/Dropbox/src/dropbox_menus.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp index f510858240..a4047d4be8 100644 --- a/plugins/Dropbox/src/dropbox_menus.cpp +++ b/plugins/Dropbox/src/dropbox_menus.cpp @@ -40,17 +40,18 @@ int CDropbox::OnPrebuildContactMenu(WPARAM hContact, LPARAM lParam) return 0;
//bool ctrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
- WORD status = CallContactService(hContact, PS_GETSTATUS, 0, 0);
+ char *module = GetContactProto(hContact);
+ WORD status = db_get_w(hContact, module, "Status", ID_STATUS_OFFLINE);
+ CallContactService(hContact, PS_GETSTATUS, 0, 0);
if (hContact == INSTANCE->GetDefaultContact() || status == ID_STATUS_OFFLINE)
Menu_ShowItem(INSTANCE->ContactMenuItems[CMI_SEND_FILES], FALSE);
else
- {
Menu_DisableItem(INSTANCE->ContactMenuItems[CMI_SEND_FILES], INSTANCE->hContactTransfer);
- if (strcmp(GetContactProto(hContact), MODULE))
- {
- Menu_ShowItem(INSTANCE->ContactMenuItems[CMI_API_REQUEST_AUTH], FALSE);
- }
+
+ if (strcmp(module, MODULE))
+ {
+ Menu_ShowItem(INSTANCE->ContactMenuItems[CMI_API_REQUEST_AUTH], FALSE);
}
return 0;
|