summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/chat/main.cpp24
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp4
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp2
-rw-r--r--plugins/TabSRMM/src/version.h2
5 files changed, 23 insertions, 11 deletions
diff --git a/plugins/TabSRMM/src/chat/main.cpp b/plugins/TabSRMM/src/chat/main.cpp
index e13811a375..5374f54858 100644
--- a/plugins/TabSRMM/src/chat/main.cpp
+++ b/plugins/TabSRMM/src/chat/main.cpp
@@ -193,7 +193,7 @@ static void OnLoadSettings()
int ih2 = GetTextPixelSize(_T("AQGglo"), g_Settings.UserListFonts[CHAT_STATUS_AWAY], false);
g_Settings.iNickListFontHeight = max(M.GetByte(CHAT_MODULE, "NicklistRowDist", 12), (ih > ih2 ? ih : ih2));
- for (int i = 0; i < 7; i++) {
+ for (int i = 0; i < 5; i++) {
char szBuf[40];
mir_snprintf(szBuf, 20, "NickColor%d", i);
g_Settings.nickColors[i] = M.GetDword(CHAT_MODULE, szBuf, g_Settings.UserListColors[0]);
@@ -229,7 +229,7 @@ static void CheckUpdate()
{
// already converted?
int compat = db_get_b(NULL, "Compatibility", "TabChatFonts", 0);
- if (compat >= 2)
+ if (compat >= 3)
return;
if (compat == 0) {
@@ -251,13 +251,25 @@ static void CheckUpdate()
}
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)CHAT_OLDFONTMODULE);
+ compat++;
}
- DWORD oldBackColor = db_get_dw(0, FONTMODULE, "BkgColourMUC", SRMSGDEFSET_BKGCOLOUR);
- db_set_dw(NULL, CHAT_MODULE, "ColorLogBG", oldBackColor);
- db_unset(0, FONTMODULE, "BkgColourMUC");
+ if (compat == 1) {
+ DWORD oldBackColor = db_get_dw(0, FONTMODULE, "BkgColourMUC", SRMSGDEFSET_BKGCOLOUR);
+ db_set_dw(NULL, CHAT_MODULE, "ColorLogBG", oldBackColor);
+ db_unset(0, FONTMODULE, "BkgColourMUC");
+ compat++;
+ }
+
+ if (compat == 2) {
+ COLORREF color0 = M.GetDword(CHAT_MODULE, "NickColor2", 0);
+ COLORREF color2 = M.GetDword(CHAT_MODULE, "NickColor0", 0);
+ db_set_dw(NULL, CHAT_MODULE, "NickColor0", color0);
+ db_set_dw(NULL, CHAT_MODULE, "NickColor2", color2);
+ compat++;
+ }
- db_set_b(NULL, "Compatibility", "TabChatFonts", 2);
+ db_set_b(NULL, "Compatibility", "TabChatFonts", 3);
}
int Chat_Load()
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index 42b2baf55c..c946b3ab70 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -563,9 +563,9 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
static TCHAR* chatcolorsnames[] =
{
- LPGENT("Channel operators"),
- LPGENT("Half operators"),
LPGENT("Voiced"),
+ LPGENT("Half operators"),
+ LPGENT("Channel operators"),
LPGENT("Extended mode 1"),
LPGENT("Extended mode 2"),
LPGENT("Selection background"),
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index f57a8b9f8c..dc22d4b655 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -672,7 +672,7 @@ char GetIndicator(SESSION_INFO *si, LPCTSTR ptszNick, int *iNickIndex)
STATUSINFO *ti = pci->TM_FindStatus(si->pStatuses, pci->TM_WordToString(si->pStatuses, ui->Status));
if (ti && (int)ti->hIcon < si->iStatusCount) {
if (iNickIndex)
- *iNickIndex = si->iStatusCount - (int)ti->hIcon; // color table's index is not zero-based
+ *iNickIndex = (int)ti->hIcon; // color table's index is not zero-based
return szIndicators[(int)ti->hIcon];
}
break;
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 2661131037..92dc53fd9b 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -2284,7 +2284,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
else {
FillRect(dis->hDC, &dis->rcItem, pci->hListBkgBrush);
if (g_Settings.bColorizeNicks && nickIndex != 0)
- SetTextColor(dis->hDC, g_Settings.nickColors[si->iStatusCount - nickIndex - 1]);
+ SetTextColor(dis->hDC, g_Settings.nickColors[nickIndex-1]);
else
SetTextColor(dis->hDC, g_Settings.UserListColors[ui->iStatusEx]);
}
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h
index 7c30d58b31..2f210242c8 100644
--- a/plugins/TabSRMM/src/version.h
+++ b/plugins/TabSRMM/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 3
#define __MINOR_VERSION 3
#define __RELEASE_NUM 0
-#define __BUILD_NUM 0
+#define __BUILD_NUM 1
#include <stdver.h>