diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-05-13 19:44:59 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-05-13 19:44:59 +0000 |
commit | e53728a54ff21d6a47d30bc304c125b3cb9b87a9 (patch) | |
tree | 309bad6ef5bbe8fb330cfabd46ac34144abe9a80 | |
parent | db24d01ebf2928ec1c4009f886832fdaf8760f81 (diff) |
added copy Title in action Copy to Clipboard
version bump
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@79 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
-rw-r--r-- | popup/src/popup_wnd2.cpp | 11 | ||||
-rw-r--r-- | popup/version.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/popup/src/popup_wnd2.cpp b/popup/src/popup_wnd2.cpp index 8dab680..93e13ba 100644 --- a/popup/src/popup_wnd2.cpp +++ b/popup/src/popup_wnd2.cpp @@ -1388,12 +1388,13 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara #define CF_TCHAR CF_TEXT
#endif
HGLOBAL clipbuffer;
- static TCHAR * buffer, *text;
- char* sztext = NULL;
- text = this->m_lpwzText;
- if (!text)
+ static TCHAR * buffer, *text = (TCHAR*)mir_alloc((_tcslen(this->m_lpwzText) + _tcslen(this->m_lpwzTitle)+2)*sizeof(TCHAR));
+ char* sztext = (char*)mir_alloc((lstrlenA(this->m_lpzText) + lstrlenA(this->m_lpzTitle)+2)*sizeof(char));
+ if ((this->m_lpwzText) || (this->m_lpwzTitle))
+ mir_sntprintf(text, _tcslen(this->m_lpwzText) + _tcslen(this->m_lpwzTitle)+1, _T("%s\n%s"), this->m_lpwzTitle, this->m_lpwzText);
+ else if ((this->m_lpzText) || (this->m_lpzTitle))
{
- sztext = this->m_lpzText;
+ mir_snprintf(sztext, lstrlenA(this->m_lpzText) + lstrlenA(this->m_lpzTitle)+1, "%s\n%s", this->m_lpzTitle, this->m_lpzText);
text = mir_a2t(sztext);
}
OpenClipboard(m_hwnd);
diff --git a/popup/version.h b/popup/version.h index cd2cac8..7b49620 100644 --- a/popup/version.h +++ b/popup/version.h @@ -65,7 +65,7 @@ Last change by : $Author: Merlin_de $ #define __MAJOR_VERSION 2
#define __MINOR_VERSION 1
#define __RELEASE_NUM 1
- #define __BUILD_NUM 5
+ #define __BUILD_NUM 6
#define __STRINGIFY(x) #x
#define __STRINGIFY2(x) __STRINGIFY(x)
|