summaryrefslogtreecommitdiff
path: root/plugins/Folders/src/folderItem.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-02 13:38:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-02 13:38:53 +0000
commit3d26dc75537137d829cc388abe0b9fe4b2df0d9d (patch)
tree61ee0925fca5f4d9ab10ef3ea5a8e14f213a1a11 /plugins/Folders/src/folderItem.cpp
parent6d46936f5711c2b927b88f4c93cf1431a776bbba (diff)
unicode folders custom names (gotten from szName by default, as usual)
git-svn-id: http://svn.miranda-ng.org/main/trunk@3835 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Folders/src/folderItem.cpp')
-rw-r--r--plugins/Folders/src/folderItem.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/Folders/src/folderItem.cpp b/plugins/Folders/src/folderItem.cpp
index fe16f30d7a..4125d43d4a 100644
--- a/plugins/Folders/src/folderItem.cpp
+++ b/plugins/Folders/src/folderItem.cpp
@@ -20,13 +20,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "commonheaders.h"
-CFolderItem::CFolderItem(const char *sectionName, const char *name, const TCHAR *format, const DWORD flags)
+CFolderItem::CFolderItem(const char *sectionName, const char *name, const TCHAR *format, const TCHAR *userName)
{
m_szSection = mir_strdup(sectionName);
m_szName = mir_strdup(name);
+ if (userName)
+ m_tszUserName = mir_tstrdup(userName);
+ else
+ m_tszUserName = mir_a2t(name);
m_tszFormat = NULL;
m_tszOldFormat = NULL;
- m_flags = flags;
GetDataFromDatabase(format);
FolderCreateDirectory();
}
@@ -48,17 +51,17 @@ void CFolderItem::SetFormat(const TCHAR *newFormat)
int CFolderItem::IsEqual(const CFolderItem *other)
{
- return (IsEqual(other->GetSection(), other->GetName()));
+ return (IsEqual(other->GetSection(), other->GetUserName()));
}
-int CFolderItem::IsEqual(const char *section, const char *name)
+int CFolderItem::IsEqual(const char *section, const TCHAR *name)
{
- return ((strcmp(m_szName, name) == 0) && (strcmp(m_szSection, section) == 0));
+ return !_tcscmp(m_tszUserName, name) && !strcmp(m_szSection, section);
}
-int CFolderItem::IsEqualTranslated(const char *trSection, const char *trName)
+int CFolderItem::IsEqualTranslated(const char *trSection, const TCHAR *trName)
{
- return ((strcmp(Translate(m_szName), trName) == 0) && (strcmp(Translate(m_szSection), trSection) == 0));
+ return !_tcscmp( TranslateTS(m_tszUserName), trName) && !strcmp(Translate(m_szSection), trSection);
}
int CFolderItem::operator ==(const CFolderItem *other)