diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-02-06 07:52:46 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-02-06 07:52:46 +0000 |
commit | 7aa194b9f14d8f1520ee248b6dbc643bc57aefa9 (patch) | |
tree | 4a1e81885319625cfdeaa30a6ced3d26606d62f9 /protocols/VKontakte/src/vk_proto.cpp | |
parent | 890f005fb098f226924dd04eb402a8dc8490a753 (diff) |
VKontakte:
code cleanup and optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@12016 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index d8215f969e..49a3736e81 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -317,7 +317,7 @@ int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) {
LONG userID = getDword(hContact, "ID", -1);
bool bisFriend = (getByte(hContact, "Auth", -1) == 0);
- bool bisBroadcast = !(CMString(ptrT(db_get_tsa(hContact, m_szModuleName, "AudioUrl"))).IsEmpty());
+ bool bisBroadcast = !(IsEmpty(ptrT(db_get_tsa(hContact, m_szModuleName, "AudioUrl"))));
Menu_ShowItem(g_hContactMenuItems[CMI_VISITPROFILE], !isChatRoom(hContact));
Menu_ShowItem(g_hContactMenuItems[CMI_ADDASFRIEND], !bisFriend && !isChatRoom(hContact) && userID != VK_FEED_USER);
Menu_ShowItem(g_hContactMenuItems[CMI_DELETEFRIEND], bisFriend && userID != VK_FEED_USER);
@@ -656,12 +656,11 @@ void CVkProto::OnReceiveAuthRequest(NETLIBHTTPREQUEST *reply, AsyncHttpRequest * int iRet = json_as_int(pResponse);
setByte(param->hContact, "Auth", 0);
if (iRet == 2) {
- CMString msg,
- msgformat = TranslateT("User %s added as friend"),
+ CMString msg,
tszNick = ptrT(db_get_tsa(param->hContact, m_szModuleName, "Nick"));
if (tszNick.IsEmpty())
tszNick = TranslateT("(Unknown contact)");
- msg.AppendFormat(msgformat, tszNick.GetBuffer());
+ msg.AppendFormat(TranslateT("User %s added as friend"), tszNick.GetBuffer());
MsgPopup(param->hContact, msg.GetBuffer(), tszNick.GetBuffer());
}
}
|