diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-02 16:58:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-02 16:58:06 +0000 |
commit | 090353f5daa6bbe3e80225392bcd3de6ca39f3a1 (patch) | |
tree | 67bda2377778cb10ac5f00188549a4146bb58b13 /protocols/Twitter | |
parent | 4cc24bc64c4de09208457b3e3a315cdc097e0ec1 (diff) |
fix for registering relative avatar path in Twitter
git-svn-id: http://svn.miranda-ng.org/main/trunk@3845 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter')
-rw-r--r-- | protocols/Twitter/src/proto.cpp | 16 | ||||
-rw-r--r-- | protocols/Twitter/src/proto.h | 1 | ||||
-rw-r--r-- | protocols/Twitter/src/version.h | 2 |
3 files changed, 8 insertions, 11 deletions
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 7f587d73c5..3f42a70d17 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -48,18 +48,17 @@ TwitterProto::TwitterProto(const char *proto_name,const TCHAR *username) HookProtoEvent(ME_CLIST_PREBUILDSTATUSMENU, &TwitterProto::OnBuildStatusMenu, this);
HookProtoEvent(ME_OPT_INITIALISE, &TwitterProto::OnOptionsInit, this);
- def_avatar_folder_ = std::tstring( VARST( _T("%miranda_avatarcache%"))) + _T("\\") + m_tszUserName;
- hAvatarFolder_ = FoldersRegisterCustomPathT("Avatars", m_szModuleName, def_avatar_folder_.c_str(), m_tszUserName);
+ tstring defFolder = std::tstring( _T("%miranda_avatarcache%\\")) + m_tszUserName;
+ hAvatarFolder_ = FoldersRegisterCustomPathT("Avatars", m_szModuleName, defFolder.c_str(), m_tszUserName);
// Initialize hotkeys
char text[512];
+ mir_snprintf(text,SIZEOF(text),"%s/Tweet",m_szModuleName);
+
HOTKEYDESC hkd = {sizeof(hkd)};
- hkd.cbSize = sizeof(hkd);
hkd.pszName = text;
hkd.pszService = text;
hkd.pszSection = m_szModuleName; // Section title; TODO: use username?
-
- mir_snprintf(text,SIZEOF(text),"%s/Tweet",m_szModuleName);
hkd.pszDescription = "Send Tweet";
Hotkey_Register(&hkd);
@@ -550,10 +549,9 @@ void TwitterProto::UpdateSettings() std::tstring TwitterProto::GetAvatarFolder()
{
TCHAR path[MAX_PATH];
- if(hAvatarFolder_ && FoldersGetCustomPathT(hAvatarFolder_,path,SIZEOF(path), _T("")) == 0)
- return path;
-
- return def_avatar_folder_;
+ if (!hAvatarFolder_ || FoldersGetCustomPathT(hAvatarFolder_, path, SIZEOF(path), _T("")))
+ mir_sntprintf(path, SIZEOF(path), _T("%s\\%s"), (TCHAR*)VARST( _T("%miranda_avatarcache%")), m_tszUserName);
+ return path;
}
int TwitterProto::GetAvatar(WPARAM,LPARAM)
diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h index 8a9525b91d..9287ff3636 100644 --- a/protocols/Twitter/src/proto.h +++ b/protocols/Twitter/src/proto.h @@ -161,7 +161,6 @@ private: twitter_id since_id_;
twitter_id dm_since_id_;
- std::tstring def_avatar_folder_;
HANDLE hAvatarFolder_;
bool in_chat_;
diff --git a/protocols/Twitter/src/version.h b/protocols/Twitter/src/version.h index 7e6d456d0b..a6e94b3381 100644 --- a/protocols/Twitter/src/version.h +++ b/protocols/Twitter/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 1
#define __MINOR_VERSION 1
#define __RELEASE_NUM 0
-#define __BUILD_NUM 0
+#define __BUILD_NUM 1
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|