diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ExtraIcons/ExtraIconGroup.cpp | 6 | ||||
-rw-r--r-- | plugins/ExtraIcons/Version.h | 20 | ||||
-rw-r--r-- | plugins/ExtraIcons/Version.rc | 38 | ||||
-rw-r--r-- | plugins/ExtraIcons/commons.h | 1 | ||||
-rw-r--r-- | plugins/ExtraIcons/extraicons.cpp | 28 | ||||
-rw-r--r-- | plugins/ExtraIcons/extraicons.vcxproj | 2 | ||||
-rw-r--r-- | plugins/ExtraIcons/extraicons.vcxproj.filters | 6 | ||||
-rw-r--r-- | plugins/ExtraIcons/options.cpp | 6 |
8 files changed, 87 insertions, 20 deletions
diff --git a/plugins/ExtraIcons/ExtraIconGroup.cpp b/plugins/ExtraIcons/ExtraIconGroup.cpp index b7862e0375..e5d785008a 100644 --- a/plugins/ExtraIcons/ExtraIconGroup.cpp +++ b/plugins/ExtraIcons/ExtraIconGroup.cpp @@ -122,8 +122,8 @@ int ExtraIconGroup::setIcon(int id, HANDLE hContact, void *icon) }
ExtraIcon *current = getCurrentItem(hContact);
- int currentPos = items.size();
- int storePos = items.size();
+ int currentPos = (int)items.size();
+ int storePos = (int)items.size();
for (unsigned int i = 0; i < items.size(); ++i)
{
if (items[i]->getID() == id)
@@ -162,7 +162,7 @@ int ExtraIconGroup::setIcon(int id, HANDLE hContact, void *icon) insideApply = true;
- for (++storePos; storePos < items.size(); ++storePos)
+ for (++storePos; storePos < (int)items.size(); ++storePos)
{
items[storePos]->applyIcon(hContact);
diff --git a/plugins/ExtraIcons/Version.h b/plugins/ExtraIcons/Version.h new file mode 100644 index 0000000000..c14746132e --- /dev/null +++ b/plugins/ExtraIcons/Version.h @@ -0,0 +1,20 @@ +#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 2
+#define __RELEASE_NUM 5
+#define __BUILD_NUM 0
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
+
+#define __STRINGIFY_IMPL(x) #x
+#define __STRINGIFY(x) __STRINGIFY_IMPL(x)
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS)
+
+#define __PLUGIN_NAME "Extra Icons Service"
+#define __INTERNAL_NAME "ExtraIcons"
+#define __FILENAME "ExtraIcons.dll"
+#define __DESCRIPTION "Extra Icons Service."
+#define __AUTHOR "Ricardo Pescuma Domenecci"
+#define __AUTHOREMAIL ""
+#define __AUTHORWEB "http://pescuma.org/miranda/extraicons"
+#define __COPYRIGHT "© 2009 Ricardo Pescuma Domenecci"
diff --git a/plugins/ExtraIcons/Version.rc b/plugins/ExtraIcons/Version.rc new file mode 100644 index 0000000000..e637f0cb33 --- /dev/null +++ b/plugins/ExtraIcons/Version.rc @@ -0,0 +1,38 @@ +// Microsoft Visual C++ generated resource script.
+//
+#include "afxres.h"
+#include "version.h"
+
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#endif //_WIN32
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "FileDescription", __DESCRIPTION
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __PLUGIN_NAME
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
diff --git a/plugins/ExtraIcons/commons.h b/plugins/ExtraIcons/commons.h index 296d7ae04e..4b896a8c52 100644 --- a/plugins/ExtraIcons/commons.h +++ b/plugins/ExtraIcons/commons.h @@ -63,6 +63,7 @@ using namespace std; #include "..\utils\mir_icons.h"
#include "resource.h"
+#include "Version.h"
#include "m_extraicons.h"
#include "ExtraIcon.h"
diff --git a/plugins/ExtraIcons/extraicons.cpp b/plugins/ExtraIcons/extraicons.cpp index ec6685c42c..ea3f803a32 100644 --- a/plugins/ExtraIcons/extraicons.cpp +++ b/plugins/ExtraIcons/extraicons.cpp @@ -22,17 +22,17 @@ // Prototypes ///////////////////////////////////////////////////////////////////////////
PLUGININFOEX pluginInfo = {
- sizeof(PLUGININFOEX),
- "Extra Icons Service",
- PLUGIN_MAKE_VERSION(0,2,5,0),
- "Extra Icons Service",
- "Ricardo Pescuma Domenecci",
- "",
- "© 2009 Ricardo Pescuma Domenecci",
- "http://pescuma.org/miranda/extraicons",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
- { 0x112f7d30, 0xcd19, 0x4c74, { 0xa0, 0x3b, 0xbf, 0xbb, 0x76, 0xb7, 0x5b, 0xc4 } } // {112F7D30-CD19-4c74-A03BBFBB76B75BC4}
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ 0, //doesn't replace anything built-in
+ { 0x112f7d30, 0xcd19, 0x4c74, { 0xa0, 0x3b, 0xbf, 0xbb, 0x76, 0xb7, 0x5b, 0xc4 } } // {112F7D30-CD19-4c74-A03BBFBB76B75BC4}
};
HINSTANCE hInst;
@@ -152,11 +152,11 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) upd.szBetaVersionURL = "http://pescuma.org/miranda/extraicons_version.txt";
upd.szBetaChangelogURL = "http://pescuma.org/miranda/extraicons#Changelog";
upd.pbBetaVersionPrefix = (BYTE *) "Extra Icons Service ";
- upd.cpbBetaVersionPrefix = strlen((char *) upd.pbBetaVersionPrefix);
+ upd.cpbBetaVersionPrefix = (int)strlen((char *) upd.pbBetaVersionPrefix);
upd.szBetaUpdateURL = "http://pescuma.org/miranda/extraicons.zip";
upd.pbVersion = (BYTE *) CreateVersionStringPlugin((PLUGININFO*) &pluginInfo, szCurrentVersion);
- upd.cpbVersion = strlen((char *) upd.pbVersion);
+ upd.cpbVersion = (int)strlen((char *) upd.pbVersion);
CallService(MS_UPDATE_REGISTER, 0, (LPARAM)&upd);
}
@@ -398,7 +398,7 @@ INT_PTR ExtraIcon_Register(WPARAM wParam, LPARAM lParam) return extra->getID();
}
- size_t id = registeredExtraIcons.size() + 1;
+ int id = (int)registeredExtraIcons.size() + 1;
switch (ei->type)
{
diff --git a/plugins/ExtraIcons/extraicons.vcxproj b/plugins/ExtraIcons/extraicons.vcxproj index 59f02db0fa..b5c1481c01 100644 --- a/plugins/ExtraIcons/extraicons.vcxproj +++ b/plugins/ExtraIcons/extraicons.vcxproj @@ -186,6 +186,7 @@ <ClInclude Include="options.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="usedIcons.h" />
+ <ClInclude Include="Version.h" />
</ItemGroup>
<ItemGroup>
<None Include="res\AlwaysVis.ico" />
@@ -201,6 +202,7 @@ </ItemGroup>
<ItemGroup>
<ResourceCompile Include="resource.rc" />
+ <ResourceCompile Include="Version.rc" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="BaseExtraIcon.cpp" />
diff --git a/plugins/ExtraIcons/extraicons.vcxproj.filters b/plugins/ExtraIcons/extraicons.vcxproj.filters index 9ea3a1ae86..3e4577b99b 100644 --- a/plugins/ExtraIcons/extraicons.vcxproj.filters +++ b/plugins/ExtraIcons/extraicons.vcxproj.filters @@ -51,6 +51,9 @@ <ClInclude Include="usedIcons.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="Version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="res\AlwaysVis.ico">
@@ -88,6 +91,9 @@ <ResourceCompile Include="resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
+ <ResourceCompile Include="Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="BaseExtraIcon.cpp">
diff --git a/plugins/ExtraIcons/options.cpp b/plugins/ExtraIcons/options.cpp index 64d98e686e..1d325d0e87 100644 --- a/plugins/ExtraIcons/options.cpp +++ b/plugins/ExtraIcons/options.cpp @@ -545,7 +545,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP sort.lpfnCompare = CompareFunc;
TreeView_SortChildrenCB(tree, &sort, 0);
- origTreeProc = (WNDPROC) SetWindowLongPtr(tree, -4, (INT_PTR)TreeProc);
+ origTreeProc = (WNDPROC) SetWindowLongPtr(tree, GWLP_WNDPROC, (INT_PTR)TreeProc);
return TRUE;
}
@@ -642,14 +642,14 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM) MODULE_NAME "Groups");
- DBWriteContactSettingWord(NULL, MODULE_NAME "Groups", "Count", groups.size());
+ DBWriteContactSettingWord(NULL, MODULE_NAME "Groups", "Count", (WORD)groups.size());
for (i = 0; i < groups.size(); ++i)
{
ExtraIconGroup *group = groups[i];
char setting[512];
mir_snprintf(setting, MAX_REGS(setting), "%d_count", i);
- DBWriteContactSettingWord(NULL, MODULE_NAME "Groups", setting, group->items.size());
+ DBWriteContactSettingWord(NULL, MODULE_NAME "Groups", setting, (WORD)group->items.size());
for (unsigned int j = 0; j < group->items.size(); ++j)
{
|