diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-19 15:49:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-19 15:49:47 +0000 |
commit | 03faabc4ee5eb6a9bfa5882f155cf3225128ca42 (patch) | |
tree | ab6394e2f01545fa72e54fc23ada6bc1d68884d2 /plugins/TabSRMM/src | |
parent | c1a20ab8fa9fd5a3d841965c7afd3ee13167f35b (diff) |
chat log icons are back
git-svn-id: http://svn.miranda-ng.org/main/trunk@7761 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/chat/log.cpp | 21 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/muchighlight.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/options.cpp | 16 | ||||
-rw-r--r-- | plugins/TabSRMM/src/themes.cpp | 2 |
4 files changed, 21 insertions, 24 deletions
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp index 8c32c07e32..45dd01be43 100644 --- a/plugins/TabSRMM/src/chat/log.cpp +++ b/plugins/TabSRMM/src/chat/log.cpp @@ -42,14 +42,11 @@ * the srmm module and then modified to fit the chat module.
*/
-static PBYTE pLogIconBmpBits[14];
-static int logIconBmpSize[ SIZEOF(pLogIconBmpBits)];
-
-static int logPixelSY = 0;
-static int logPixelSX = 0;
-static char *szDivider = "\\strike----------------------------------------------------------------------------\\strike0";
-static char CHAT_rtfFontsGlobal[OPTIONS_FONTCOUNT + 2][RTFCACHELINESIZE];
-static char *CHAT_rtffonts = 0;
+static int logPixelSY = 0;
+static int logPixelSX = 0;
+static char *szDivider = "\\strike----------------------------------------------------------------------------\\strike0";
+static char CHAT_rtfFontsGlobal[OPTIONS_FONTCOUNT + 2][RTFCACHELINESIZE];
+static char *CHAT_rtffonts = 0;
/*
* ieview MUC support - mostly from scriver
@@ -864,11 +861,11 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) else if (g_Settings.dwIconFlags) {
int iIndex = lin->bIsHighlighted ? ICON_HIGHLIGHT : EventToIcon(lin);
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\f0\\fs14");
- while (bufferAlloced - bufferEnd < (logIconBmpSize[0] + 20))
+ while (bufferAlloced - bufferEnd < (pci->logIconBmpSize[0] + 20))
bufferAlloced += 4096;
buffer = (char *) mir_realloc(buffer, bufferAlloced);
- CopyMemory(buffer + bufferEnd, pLogIconBmpBits[iIndex], logIconBmpSize[iIndex]);
- bufferEnd += logIconBmpSize[iIndex];
+ CopyMemory(buffer + bufferEnd, pci->pLogIconBmpBits[iIndex], pci->logIconBmpSize[iIndex]);
+ bufferEnd += pci->logIconBmpSize[iIndex];
}
if (g_Settings.bTimeStampEventColour) {
@@ -917,7 +914,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) while (ui) {
if (!lstrcmp(ui->pszNick, lin->ptszNick)) {
STATUSINFO *ti = pci->TM_FindStatus(streamData->si->pStatuses, pci->TM_WordToString(streamData->si->pStatuses, ui->Status));
- if (ti && (UINT_PTR)ti->hIcon < streamData->si->iStatusCount) {
+ if (ti && (int)ti->hIcon < streamData->si->iStatusCount) {
pszIndicator[0] = szIndicators[(int)ti->hIcon];
crNickIndex = streamData->si->iStatusCount - (int)ti->hIcon; // color table's index is not zero-based
}
diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp index f4690a4645..f2161f769d 100644 --- a/plugins/TabSRMM/src/chat/muchighlight.cpp +++ b/plugins/TabSRMM/src/chat/muchighlight.cpp @@ -62,7 +62,7 @@ void CMUCHighlight::init() if (0 == db_get_ts(0, "Chat", "HighlightNames", &dbv))
m_NickPatternString = dbv.ptszVal;
- m_dwFlags = M.GetByte("Chat", "bHighlightEnabled", MATCH_TEXT);
+ m_dwFlags = M.GetByte("Chat", "HighlightEnabled", MATCH_TEXT);
m_fHighlightMe = (M.GetByte("Chat", "HighlightMe", 1) ? true : false);
__try {
@@ -270,7 +270,7 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L ::db_free(&dbv);
}
- DWORD dwFlags = M.GetByte("Chat", "bHighlightEnabled", MATCH_TEXT);
+ DWORD dwFlags = M.GetByte("Chat", "HighlightEnabled", MATCH_TEXT);
::CheckDlgButton(hwndDlg, IDC_HIGHLIGHTNICKENABLE, dwFlags & MATCH_NICKNAME ? BST_CHECKED : BST_UNCHECKED);
::CheckDlgButton(hwndDlg, IDC_HIGHLIGHTNICKUID, dwFlags & MATCH_UIN ? BST_CHECKED : BST_UNCHECKED);
@@ -335,7 +335,7 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if (dwFlags & MATCH_NICKNAME)
dwFlags |= (::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTNICKUID) ? MATCH_UIN : 0);
- db_set_b(0, "Chat", "bHighlightEnabled", dwFlags);
+ db_set_b(0, "Chat", "HighlightEnabled", dwFlags);
db_set_b(0, "Chat", "HighlightMe", ::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTME) ? 1 : 0);
g_Settings.Highlight->init();
}
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index 87d2f24f73..3527fd69ef 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -143,7 +143,7 @@ struct branch_t { static branch_t branch1[] = {
{ LPGENT("Open new chat rooms in the default container"), "DefaultContainer", 0, 1, NULL },
{ LPGENT("Flash window when someone speaks"), "FlashWindow", 0, 0, NULL },
- { LPGENT("Flash window when a word is highlighted"), "bFlashWindowHighlight", 0, 1, NULL },
+ { LPGENT("Flash window when a word is highlighted"), "FlashWindowHighlight", 0, 1, NULL },
{ LPGENT("Create tabs or windows for highlight events"), "CreateWindowOnHighlight", 0, 0, NULL },
{ LPGENT("Activate chat window on highlight"), "AnnoyingHighlight", 0, 0, NULL },
{ LPGENT("Show list of users in the chat room"), "ShowNicklist", 0, 1, NULL },
@@ -162,9 +162,9 @@ static branch_t branch1[] = { static branch_t branch2[] = {
{ LPGENT("Prefix all events with a timestamp"), "ShowTimeStamp", 0, 1, NULL },
{ LPGENT("Timestamp only when event time differs"), "ShowTimeStampIfChanged", 0, 0, NULL },
- { LPGENT("Timestamp has same color as the event"), "bTimeStampEventColour", 0, 0, NULL },
- { LPGENT("Indent the second line of a message"), "bLogIndentEnabled", 0, 1, NULL },
- { LPGENT("Limit user names in the message log to 20 characters"), "bLogLimitNames", 0, 1, NULL },
+ { LPGENT("Timestamp has same color as the event"), "TimeStampEventColour", 0, 0, NULL },
+ { LPGENT("Indent the second line of a message"), "LogIndentEnabled", 0, 1, NULL },
+ { LPGENT("Limit user names in the message log to 20 characters"), "LogLimitNames", 0, 1, NULL },
{ LPGENT("Add a colon (:) to auto-completed user names"), "AddColonToAutoComplete", 0, 1, NULL },
{ LPGENT("Start private conversation on doubleclick in nick list (insert nick if unchecked)"), "DoubleClick4Privat", 0, 0, NULL },
{ LPGENT("Strip colors from messages in the log"), "StripFormatting", 0, 0, NULL },
@@ -926,11 +926,11 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM db_set_ts(NULL, "Chat", "LogDirectory", pszText1);
mir_free(pszText1);
g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED;
- db_set_b(0, "Chat", "bLoggingEnabled", g_Settings.bLoggingEnabled);
+ db_set_b(0, "Chat", "LoggingEnabled", g_Settings.bLoggingEnabled);
}
else {
db_unset(NULL, "Chat", "LogDirectory");
- db_set_b(0, "Chat", "bLoggingEnabled", 0);
+ db_set_b(0, "Chat", "LoggingEnabled", 0);
}
pci->SM_InvalidateLogDirectories();
@@ -1063,7 +1063,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_SETCURSEL, (g_Settings.bLogSymbols ? 2 : (g_Settings.dwIconFlags ? 1 : 0)), 0);
CheckDlgButton(hwndDlg, IDC_NOPOPUPSFORCLOSEDWINDOWS, M.GetByte("Chat", "SkipWhenNoWindow", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TRAYONLYFORINACTIVE, M.GetByte("Chat", "bTrayIconInactiveOnly", 0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRAYONLYFORINACTIVE, M.GetByte("Chat", "TrayIconInactiveOnly", 0) ? BST_CHECKED : BST_UNCHECKED);
break;
case WM_COMMAND:
@@ -1098,7 +1098,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM db_set_b(0, "Chat", "LogSymbols", lr == 2 ? 1 : 0);
db_set_b(0, "Chat", "SkipWhenNoWindow", IsDlgButtonChecked(hwndDlg, IDC_NOPOPUPSFORCLOSEDWINDOWS) ? 1 : 0);
- db_set_b(0, "Chat", "bTrayIconInactiveOnly", IsDlgButtonChecked(hwndDlg, IDC_TRAYONLYFORINACTIVE) ? 1 : 0);
+ db_set_b(0, "Chat", "TrayIconInactiveOnly", IsDlgButtonChecked(hwndDlg, IDC_TRAYONLYFORINACTIVE) ? 1 : 0);
pci->ReloadSettings();
pci->MM_FontsChanged();
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index 04fda1e79e..bcda08d422 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -1950,7 +1950,7 @@ void CSkin::SkinDrawBGFromDC(HWND hwndClient, HWND hwnd, RECT *rcClient, HDC hdc }
/**
- * draw an icon "bDimmed" (small amount of transparency applied)
+ * draw an icon "Dimmed" (small amount of transparency applied)
*/
void CSkin::DrawDimmedIcon(HDC hdc, LONG left, LONG top, LONG dx, LONG dy, HICON hIcon, BYTE alpha)
|