summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-13 20:38:46 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-13 20:38:46 +0000
commita58d37d39c039e755e5b902d5556fe34338130bc (patch)
tree28fb91d7be99221ff8f5b4b704788258b773154d /plugins
parentcfba0c6c4d9a42a5384b61f109836783c0adc8a7 (diff)
unused parameter removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@12796 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp11
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp11
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.h2
3 files changed, 8 insertions, 16 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 46b54a9efc..a635cbed20 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -2770,13 +2770,12 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case IDC_QUOTE:
{
- int iCharsPerLine = M.GetDword("quoteLineLength", 64);
CHARRANGE sel;
SETTEXTEX stx = { ST_SELECTION, 1200 };
MEVENT hDBEvent = 0;
if (dat->hwndIEView || dat->hwndHPP) { // IEView quoting support..
- TCHAR *selected = 0, *szQuoted = 0;
+ TCHAR *selected = 0;
IEVIEWEVENT event = { sizeof(event) };
event.hContact = dat->hContact;
@@ -2793,10 +2792,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
if (selected != NULL) {
- szQuoted = QuoteText(selected, iCharsPerLine, 0);
+ ptrT szQuoted(QuoteText(selected));
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)szQuoted);
- if (szQuoted)
- mir_free(szQuoted);
break;
}
else {
@@ -2844,7 +2841,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
MultiByteToWideChar(CP_ACP, 0, (char *)szText, -1, szConverted, 1 + (int)mir_strlen((char *)szText));
iAlloced = true;
}
- ptrT szQuoted(QuoteText(szConverted, iCharsPerLine, 0));
+ ptrT szQuoted(QuoteText(szConverted));
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)szQuoted);
mir_free(szText);
if (iAlloced)
@@ -2854,7 +2851,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
ptrA szFromStream(Message_GetFromStream(GetDlgItem(hwndDlg, IDC_LOG), SF_TEXT | SFF_SELECTION));
ptrW converted(mir_utf8decodeW(szFromStream));
Utils::FilterEventMarkers(converted);
- ptrT szQuoted(QuoteText(converted, iCharsPerLine, 0));
+ ptrT szQuoted(QuoteText(converted));
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)szQuoted);
}
SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 60723882b5..52e1eef1ad 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -644,9 +644,10 @@ int TSAPI CheckValidSmileyPack(const char *szProto, MCONTACT hContact)
/////////////////////////////////////////////////////////////////////////////////////////
// return value MUST be mir_free()'d by caller.
-TCHAR* TSAPI QuoteText(const TCHAR *text, int charsPerLine, int removeExistingQuotes)
+TCHAR* TSAPI QuoteText(const TCHAR *text)
{
int outChar, lineChar;
+ int iCharsPerLine = M.GetDword("quoteLineLength", 64);
size_t bufSize = mir_wstrlen(text) + 23;
TCHAR *strout = (TCHAR*)mir_alloc(bufSize * sizeof(TCHAR));
@@ -658,17 +659,11 @@ TCHAR* TSAPI QuoteText(const TCHAR *text, int charsPerLine, int removeExistingQu
strout = (TCHAR*)mir_realloc(strout, bufSize * sizeof(TCHAR));
}
if (justDoneLineBreak && text[inChar] != '\r' && text[inChar] != '\n') {
- if (removeExistingQuotes)
- if (text[inChar] == '>') {
- while (text[++inChar] != '\n');
- inChar++;
- continue;
- }
strout[outChar++] = '>';
strout[outChar++] = ' ';
lineChar = 2;
}
- if (lineChar == charsPerLine && text[inChar] != '\r' && text[inChar] != '\n') {
+ if (lineChar == iCharsPerLine && text[inChar] != '\r' && text[inChar] != '\n') {
int decreasedBy;
for (decreasedBy = 0; lineChar > 10; lineChar--, inChar--, outChar--, decreasedBy++)
if (strout[outChar] == ' ' || strout[outChar] == '\t' || strout[outChar] == '-') break;
diff --git a/plugins/TabSRMM/src/msgdlgutils.h b/plugins/TabSRMM/src/msgdlgutils.h
index 5ea784bd6b..35ca213d64 100644
--- a/plugins/TabSRMM/src/msgdlgutils.h
+++ b/plugins/TabSRMM/src/msgdlgutils.h
@@ -38,7 +38,7 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat);
void TSAPI ProcessAvatarChange(HWND hwnd, LPARAM lParam);
void TSAPI UpdateStatusBar(const TWindowData *dat);
int TSAPI CheckValidSmileyPack(const char *szProto, MCONTACT hContact);
-TCHAR* TSAPI QuoteText(const TCHAR *text, int charsPerLine, int removeExistingQuotes);
+TCHAR* TSAPI QuoteText(const TCHAR *text);
void TSAPI UpdateReadChars(const TWindowData *dat);
void TSAPI ShowPicture(TWindowData *dat, BOOL showNewPic);
void TSAPI AdjustBottomAvatarDisplay(TWindowData *dat);