summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwishmaster51@gmail.com <wishmaster51@gmail.com@c086bb3d-8645-0410-b8da-73a8550f86e7>2012-06-07 10:49:52 +0000
committerwishmaster51@gmail.com <wishmaster51@gmail.com@c086bb3d-8645-0410-b8da-73a8550f86e7>2012-06-07 10:49:52 +0000
commit5074b434bb7d14ada5b0da2b3a8937e1a36910e9 (patch)
tree110035f2a47630abfe5aa89ddf793ef207c0820c
parent8caf7ea3f5c4762f4444d5e503aa0469830f2e53 (diff)
-Updated m_folders.h
-Allow plugin to loas in Miranda 0.9.50 -version bump git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@253 c086bb3d-8645-0410-b8da-73a8550f86e7
-rw-r--r--Plugins/avatarhistory/AvatarHistory.cpp6
-rw-r--r--Plugins/avatarhistory/sdk/m_folders.h24
2 files changed, 19 insertions, 11 deletions
diff --git a/Plugins/avatarhistory/AvatarHistory.cpp b/Plugins/avatarhistory/AvatarHistory.cpp
index 46b0266..522f229 100644
--- a/Plugins/avatarhistory/AvatarHistory.cpp
+++ b/Plugins/avatarhistory/AvatarHistory.cpp
@@ -71,7 +71,7 @@ PLUGININFOEX pluginInfo={
#else
"Avatar History (Ansi)",
#endif
- PLUGIN_MAKE_VERSION(0,0,3,1),
+ PLUGIN_MAKE_VERSION(0,0,3,2),
"This plugin keeps backups of all your contacts' avatar changes and/or shows popups",
"Matthew Wild (MattJ), Ricardo Pescuma Domenecci",
"mwild1@gmail.com",
@@ -96,9 +96,9 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvRese
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
- if(mirandaVersion < PLUGIN_MAKE_VERSION(0,10,0,3))
+ if(mirandaVersion < PLUGIN_MAKE_VERSION(0,9,50,3))
{
- MessageBox(NULL,_T("AvatarHistory requires Miranda IM 0.10 Alpha #3 or later."),_T("Avatar History"),MB_OK);
+ MessageBox(NULL,_T("AvatarHistory requires Miranda IM 0.9.50 or later."),_T("Avatar History"),MB_OK);
return NULL;
}
mirVer = mirandaVersion;
diff --git a/Plugins/avatarhistory/sdk/m_folders.h b/Plugins/avatarhistory/sdk/m_folders.h
index 02d4d35..c6d021d 100644
--- a/Plugins/avatarhistory/sdk/m_folders.h
+++ b/Plugins/avatarhistory/sdk/m_folders.h
@@ -168,6 +168,7 @@ __inline static HANDLE FoldersRegisterCustomPath(const char *section, const char
return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
}
+#ifdef _UNICODE
__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
{
FOLDERSDATA fd = {0};
@@ -181,6 +182,7 @@ __inline static HANDLE FoldersRegisterCustomPathW(const char *section, const cha
fd.flags = FF_UNICODE;
return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
}
+#endif //_UNICODE
__inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
{
@@ -200,22 +202,25 @@ __inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, co
return res;
}
-__inline static INT_PTR FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
+#ifdef _UNICODE
+__inline static INT_PTR FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int size, const wchar_t *notFoundW)
{
FOLDERSGETDATA fgd = {0};
INT_PTR res;
fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
+ fgd.nMaxPathSize = size;
fgd.szPathW = pathW;
res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
if (res)
{
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
+ wchar_t buffer[MAX_PATH];
+ CallService(MS_UTILS_PATHTOABSOLUTEW, (WPARAM) notFoundW, (LPARAM) buffer);
+ mir_sntprintf(pathW, size, _T("%s"), buffer);
}
return res;
}
+#endif //_UNICODE
__inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
{
@@ -247,18 +252,20 @@ __inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path,
return res;
}
-__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
+#ifdef _UNICODE
+__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int size, wchar_t *notFoundW, wchar_t *fileNameW)
{
FOLDERSGETDATA fgd = {0};
INT_PTR res;
fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
+ fgd.nMaxPathSize = size;
fgd.szPathW = pathW;
res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
if (res)
{
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
+ wchar_t buffer[MAX_PATH];
+ CallService(MS_UTILS_PATHTOABSOLUTEW, (WPARAM) notFoundW, (LPARAM) buffer);
+ mir_sntprintf(pathW, size, _T("%s"), buffer);
}
if (wcslen(pathW) > 0)
@@ -276,6 +283,7 @@ __inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pa
return res;
}
+#endif //_UNICODE
# ifdef _UNICODE
# define FoldersGetCustomPathT FoldersGetCustomPathW