summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-07-30 17:30:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-07-30 17:30:39 +0300
commit6fad3235de6bec045fec19a7265e19e880ac84e2 (patch)
treeea375f721c2cc7e586142ccd0298b096a7a5b31f /protocols
parent4aab3b6bc3d66ade09b25649d389b8aef358bfbd (diff)
Hotkeys: code cleaning
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/src/proto.cpp10
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp14
-rw-r--r--protocols/Twitter/src/proto.cpp6
3 files changed, 15 insertions, 15 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index fe95fb1ee0..c43f9c8d4c 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -1095,22 +1095,22 @@ void FacebookProto::InitHotkeys()
mir_strncpy(text, m_szModuleName, 100);
char *tDest = text + mir_strlen(text);
- HOTKEYDESC hkd = { sizeof(hkd) };
+ HOTKEYDESC hkd = {};
hkd.pszName = text;
hkd.pszService = text;
- hkd.pwszSection = m_tszUserName;
+ hkd.szSection.w = m_tszUserName;
hkd.dwFlags = HKD_UNICODE;
mir_strcpy(tDest, "/VisitProfile");
- hkd.pwszDescription = LPGENW("Visit profile");
+ hkd.szDescription.w = LPGENW("Visit profile");
Hotkey_Register(&hkd);
mir_strcpy(tDest, "/VisitNotifications");
- hkd.pwszDescription = LPGENW("Visit notifications");
+ hkd.szDescription.w = LPGENW("Visit notifications");
Hotkey_Register(&hkd);
mir_strcpy(tDest, "/Mind");
- hkd.pwszDescription = LPGENW("Show 'Share status' window");
+ hkd.szDescription.w = LPGENW("Show 'Share status' window");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT | HOTKEYF_EXT, 'F');
Hotkey_Register(&hkd);
}
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index 5af6eaa2b9..e08731dded 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -795,29 +795,29 @@ void CJabberProto::GlobalMenuInit()
// Hotkeys
char text[200];
- strncpy(text, m_szModuleName, sizeof(text) - 1);
+ strncpy_s(text, m_szModuleName, _TRUNCATE);
char* tDest = text + mir_strlen(text);
- HOTKEYDESC hkd = { sizeof(hkd) };
+ HOTKEYDESC hkd = {};
hkd.pszName = text;
hkd.pszService = text;
- hkd.pwszSection = m_tszUserName;
+ hkd.szSection.w = m_tszUserName;
hkd.dwFlags = HKD_UNICODE;
mir_strcpy(tDest, "/Groupchat");
- hkd.pwszDescription = LPGENW("Join conference");
+ hkd.szDescription.w = LPGENW("Join conference");
Hotkey_Register(&hkd);
mir_strcpy(tDest, "/Bookmarks");
- hkd.pwszDescription = LPGENW("Open bookmarks");
+ hkd.szDescription.w = LPGENW("Open bookmarks");
Hotkey_Register(&hkd);
mir_strcpy(tDest, "/PrivacyLists");
- hkd.pwszDescription = LPGENW("Privacy lists");
+ hkd.szDescription.w = LPGENW("Privacy lists");
Hotkey_Register(&hkd);
mir_strcpy(tDest, "/ServiceDiscovery");
- hkd.pwszDescription = LPGENW("Service discovery");
+ hkd.szDescription.w = LPGENW("Service discovery");
Hotkey_Register(&hkd);
}
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index 19bc5452e7..4153006ee9 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -46,11 +46,11 @@ TwitterProto::TwitterProto(const char *proto_name, const wchar_t *username) :
char text[512];
mir_snprintf(text, "%s/Tweet", m_szModuleName);
- HOTKEYDESC hkd = { sizeof(hkd) };
+ HOTKEYDESC hkd = {};
hkd.pszName = text;
hkd.pszService = text;
- hkd.pszSection = m_szModuleName; // Section title; TODO: use username?
- hkd.pszDescription = "Send Tweet";
+ hkd.szSection.a = m_szModuleName; // Section title; TODO: use username?
+ hkd.szDescription.a = "Send Tweet";
Hotkey_Register(&hkd);
// set Tokens and stuff