summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_menus.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-03-19 08:01:21 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-03-19 08:01:21 +0000
commitc3ac85191fbe50a4afb5a670cb57ff4a189507d0 (patch)
tree97c0bd3d3f473d91356e8ded930beee6e4b1b40f /plugins/Dropbox/src/dropbox_menus.cpp
parent97ae2f5d6913b9519b28a95bf6921cf06cd000c4 (diff)
Dropbox: hides menu item and tabsrmm button when hasn't access to dropbox account
git-svn-id: http://svn.miranda-ng.org/main/trunk@8658 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_menus.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_menus.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp
index b7e60b6198..fe5f38d234 100644
--- a/plugins/Dropbox/src/dropbox_menus.cpp
+++ b/plugins/Dropbox/src/dropbox_menus.cpp
@@ -23,6 +23,9 @@ int CDropbox::OnPrebuildContactMenu(void *obj, WPARAM hContact, LPARAM lParam)
Menu_ShowItem(instance->contactMenuItems[CMI_SEND_FILES], FALSE);
+ if (!instance->HasAccessToken())
+ return 0;
+
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;