summaryrefslogtreecommitdiff
path: root/protocols/Tox/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-05-29 15:45:42 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-05-29 15:45:42 +0300
commita885f65161f8bb5ddfc6286dbe50905cf14c4c51 (patch)
tree15a64b1774ba567ad43d7090e13ed0d176bac3ea /protocols/Tox/src
parentd8e912f0644fe9f0ff8902465e62bc163d3ad788 (diff)
fixes #1962 (Tox: add icons to proto menu)
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r--protocols/Tox/src/resource.h1
-rw-r--r--protocols/Tox/src/tox_icons.cpp7
-rw-r--r--protocols/Tox/src/tox_menus.cpp5
-rw-r--r--protocols/Tox/src/tox_profile.cpp2
4 files changed, 9 insertions, 6 deletions
diff --git a/protocols/Tox/src/resource.h b/protocols/Tox/src/resource.h
index 0b62cff30d..db0cf0fc55 100644
--- a/protocols/Tox/src/resource.h
+++ b/protocols/Tox/src/resource.h
@@ -5,6 +5,7 @@
#define IDI_TOX 100
#define IDI_ME 101
#define IDI_EDIT 102
+#define IDI_COPY 103
#define IDD_USER_INFO 150
#define IDD_PASSWORD_ENTER 151
#define IDD_PASSWORD_CHANGE 152
diff --git a/protocols/Tox/src/tox_icons.cpp b/protocols/Tox/src/tox_icons.cpp
index 50d11f5303..2cefa1133a 100644
--- a/protocols/Tox/src/tox_icons.cpp
+++ b/protocols/Tox/src/tox_icons.cpp
@@ -2,9 +2,10 @@
static IconItem iconList[] =
{
- { LPGEN("Protocol icon"), "main", IDI_TOX },
- { LPGEN("Action icon"), "main", IDI_ME },
- { LPGEN("Correction icon"), "edit", IDI_EDIT },
+ { LPGEN("Protocol icon"), "main", IDI_TOX },
+ { LPGEN("Action icon"), "main", IDI_ME },
+ { LPGEN("Correction icon"), "edit", IDI_EDIT },
+ { LPGEN("Copy ID"), "copy", IDI_COPY },
};
void CToxProto::InitIcons()
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp
index debe3b5ae6..2ea767b0e4 100644
--- a/protocols/Tox/src/tox_menus.cpp
+++ b/protocols/Tox/src/tox_menus.cpp
@@ -35,7 +35,6 @@ int CToxProto::UpdateStatusMenu(WPARAM, LPARAM)
Menu_ShowItem(StatusMenuItems[SMI_PASSWORD_CREATE], !passwordExists);
Menu_ShowItem(StatusMenuItems[SMI_PASSWORD_CHANGE], passwordExists);
Menu_ShowItem(StatusMenuItems[SMI_PASSWORD_REMOVE], passwordExists);
-
return 0;
}
@@ -49,16 +48,18 @@ void CToxProto::OnBuildProtoMenu()
mi.pszService = "/CopyToxID";
CreateProtoService(mi.pszService, &CToxProto::OnCopyToxID);
mi.name.w = LPGENW("Copy Tox ID");
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_COPY);
mi.position = SMI_POSITION + SMI_TOXID_COPY;
StatusMenuItems[SMI_TOXID_COPY] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
// Password
mi.pszService = nullptr;
mi.name.w = LPGENW("Password");
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_KEYS);
StatusMenuItems[SMI_PASSWORD] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mi.root = StatusMenuItems[SMI_PASSWORD];
// Create password command
+ mi.root = StatusMenuItems[SMI_PASSWORD];
mi.pszService = "/CreatePassword";
CreateProtoService(mi.pszService, &CToxProto::OnCreatePassword);
mi.name.w = LPGENW("Create password");
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp
index c514dacf3c..57fbb83a18 100644
--- a/protocols/Tox/src/tox_profile.cpp
+++ b/protocols/Tox/src/tox_profile.cpp
@@ -89,7 +89,7 @@ bool CToxProto::LoadToxProfile(Tox_Options *options)
}
mir_free(data);
data = decryptedData;
- size = decryptedSize;
+ size = (long)decryptedSize;
}
if (data) {