diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-20 08:05:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-20 08:05:51 +0000 |
commit | 18540e71624543fd0181b764a6913aa6bf8eb75d (patch) | |
tree | 2fc7dc37339a353b53cbe878138ffd69227accfb /protocols/Twitter/proto.cpp | |
parent | a00d983ecdb1d58e2bc7f7b3a6d1b3c2c169ae70 (diff) |
more avatar fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@498 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/proto.cpp')
-rw-r--r-- | protocols/Twitter/proto.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/protocols/Twitter/proto.cpp b/protocols/Twitter/proto.cpp index ae1567e986..60f802d77c 100644 --- a/protocols/Twitter/proto.cpp +++ b/protocols/Twitter/proto.cpp @@ -50,11 +50,10 @@ TwitterProto::TwitterProto(const char *proto_name,const TCHAR *username) HookProtoEvent(ME_CLIST_PREBUILDSTATUSMENU, &TwitterProto::OnBuildStatusMenu, this);
HookProtoEvent(ME_OPT_INITIALISE, &TwitterProto::OnOptionsInit, this);
- char *profile = Utils_ReplaceVars("%miranda_avatarcache%");
- def_avatar_folder_ = std::string(profile)+"\\"+m_szModuleName;
+ TCHAR *profile = Utils_ReplaceVarsT( _T("%miranda_avatarcache%"));
+ def_avatar_folder_ = std::tstring(profile) + _T("\\") + m_tszUserName;
mir_free(profile);
- hAvatarFolder_ = FoldersRegisterCustomPath(m_szModuleName,"Avatars",
- def_avatar_folder_.c_str());
+ hAvatarFolder_ = FoldersRegisterCustomPathT(m_szModuleName, "Avatars", def_avatar_folder_.c_str());
// Initialize hotkeys
char text[512];
@@ -572,13 +571,13 @@ void TwitterProto::UpdateSettings() }
}
-std::string TwitterProto::GetAvatarFolder()
+std::tstring TwitterProto::GetAvatarFolder()
{
- char path[MAX_PATH];
- if(hAvatarFolder_ && FoldersGetCustomPath(hAvatarFolder_,path,sizeof(path), "") == 0)
+ TCHAR path[MAX_PATH];
+ if(hAvatarFolder_ && FoldersGetCustomPathT(hAvatarFolder_,path,SIZEOF(path), _T("")) == 0)
return path;
- else
- return def_avatar_folder_;
+
+ return def_avatar_folder_;
}
int TwitterProto::GetAvatar(WPARAM,LPARAM)
|