summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-01 21:11:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-01 21:11:59 +0000
commitb2269a81668efaf157d541f2ffd67e52b89417c6 (patch)
tree128980a09b93abf48f63ee78bb51a041b607e8a2 /plugins/TabSRMM
parentbe6c3121411e55055383900f45d17a1ef887ccdd (diff)
useless Folders support checks removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@3824 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/include/mim.h1
-rw-r--r--plugins/TabSRMM/src/mim.cpp27
2 files changed, 10 insertions, 18 deletions
diff --git a/plugins/TabSRMM/src/include/mim.h b/plugins/TabSRMM/src/include/mim.h
index c971cb7fdf..30d89406e6 100644
--- a/plugins/TabSRMM/src/include/mim.h
+++ b/plugins/TabSRMM/src/include/mim.h
@@ -159,7 +159,6 @@ public:
const TCHAR* getSkinPath() const { return(m_szSkinsPath); }
const TCHAR* getSavedAvatarPath() const { return(m_szSavedAvatarsPath); }
const TCHAR* getChatLogPath() const { return(m_szChatLogsPath); }
- const bool haveFoldersPlugin() const { return(m_haveFolders); }
const TCHAR* getUserDir();
void configureCustomFolders();
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index f491210554..809a7b0a56 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -318,17 +318,13 @@ int CMimAPI::FoldersPathChanged(WPARAM wParam, LPARAM lParam)
void CMimAPI::configureCustomFolders()
{
- m_haveFolders = false;
- if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) {
- m_hDataPath = (HANDLE)FoldersRegisterCustomPathT("TabSRMM", "Data path", const_cast<TCHAR *>(getDataPath()));
- m_hSkinsPath = (HANDLE)FoldersRegisterCustomPathT("TabSRMM", "Skins root", const_cast<TCHAR *>(getSkinPath()));
- m_hAvatarsPath = (HANDLE)FoldersRegisterCustomPathT("TabSRMM", "Saved Avatars", const_cast<TCHAR *>(getSavedAvatarPath()));
- m_hChatLogsPath = (HANDLE)FoldersRegisterCustomPathT("TabSRMM", "Group chat logs root", const_cast<TCHAR *>(getChatLogPath()));
+ m_hDataPath = FoldersRegisterCustomPathT("TabSRMM", "Data path", const_cast<TCHAR *>(getDataPath()));
+ m_hSkinsPath = FoldersRegisterCustomPathT("TabSRMM", "Skins root", const_cast<TCHAR *>(getSkinPath()));
+ m_hAvatarsPath = FoldersRegisterCustomPathT("TabSRMM", "Saved Avatars", const_cast<TCHAR *>(getSavedAvatarPath()));
+ m_hChatLogsPath = FoldersRegisterCustomPathT("TabSRMM", "Group chat logs root", const_cast<TCHAR *>(getChatLogPath()));
+
+ if (m_hDataPath)
CGlobals::m_event_FoldersChanged = HookEvent(ME_FOLDERS_PATH_CHANGED, CMimAPI::FoldersPathChanged);
- m_haveFolders = true;
- }
- else
- m_hDataPath = m_hSkinsPath = m_hAvatarsPath = m_hChatLogsPath = 0;
foldersPathChanged();
}
@@ -381,15 +377,12 @@ INT_PTR CMimAPI::foldersPathChanged()
const TCHAR* CMimAPI::getUserDir()
{
if (m_userDir[0] == 0) {
- wchar_t* userdata;
- if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
- userdata = L"%%miranda_userdata%%";
+ if ( ServiceExists(MS_FOLDERS_REGISTER_PATH))
+ lstrcpyn(m_userDir, L"%%miranda_userdata%%", SIZEOF(m_userDir));
else
- userdata = ::Utils_ReplaceVarsT(L"%miranda_userdata%");
- mir_sntprintf(m_userDir, MAX_PATH, userdata);
+ lstrcpyn(m_userDir, VARST( _T("%miranda_userdata%")), SIZEOF(m_userDir));
+
Utils::ensureTralingBackslash(m_userDir);
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH))
- mir_free(userdata);
}
return(m_userDir);
}