diff options
Diffstat (limited to 'plugins/Scriver/src/chat')
-rw-r--r-- | plugins/Scriver/src/chat/main.cpp | 34 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/message.cpp | 10 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/options.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/window.cpp | 15 |
4 files changed, 10 insertions, 51 deletions
diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index c164c00b48..0efe6a8526 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -101,7 +101,7 @@ static void OnNewUser(SESSION_INFO *si, USERINFO*) SendMessage(si->hWnd, GC_UPDATENICKLIST, 0, 0);
}
-static void OnSetStatus(SESSION_INFO *si, int wStatus)
+static void OnSetStatus(SESSION_INFO *si, int)
{
PostMessage(si->hWnd, GC_FIXTABICONS, 0, 0);
}
@@ -157,34 +157,6 @@ static void OnLoadSettings() g_Settings.MessageBoxFont = CreateFontIndirect(&lf);
}
-static void RegisterFonts()
-{
- ColourIDT colourid = { sizeof(colourid) };
- strncpy(colourid.dbSettingsGroup, CHAT_MODULE, sizeof(colourid.dbSettingsGroup));
- _tcsncpy(colourid.group, LPGENT("Messaging")_T("/")LPGENT("Group chats"), SIZEOF(colourid.group));
-
- strncpy(colourid.setting, "ColorLogBG", SIZEOF(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Group chat log background"), SIZEOF(colourid.name));
- mir_sntprintf(colourid.group, SIZEOF(colourid.group), _T("%s/%s"), LPGENT("Messaging"), LPGENT("Group chats"));
- colourid.defcolour = GetSysColor(COLOR_WINDOW);
- ColourRegisterT(&colourid);
-
- strncpy(colourid.setting, "ColorNicklistBG", SIZEOF(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Nick list background"), SIZEOF(colourid.name));
- colourid.defcolour = GetSysColor(COLOR_WINDOW);
- ColourRegisterT(&colourid);
-
- strncpy(colourid.setting, "ColorNicklistLines", SIZEOF(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Nick list lines"), SIZEOF(colourid.name));
- colourid.defcolour = GetSysColor(COLOR_INACTIVEBORDER);
- ColourRegisterT(&colourid);
-
- strncpy(colourid.setting, "ColorNicklistSelectedBG", SIZEOF(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Nick list background (selected)"), SIZEOF(colourid.name));
- colourid.defcolour = GetSysColor(COLOR_HIGHLIGHT);
- ColourRegisterT(&colourid);
-}
-
int Chat_Load()
{
CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Messaging")_T("/")LPGENT("Group chats"), FONTMODE_SKIP };
@@ -228,8 +200,8 @@ int Chat_Unload(void) return 0;
}
-int Chat_ModulesLoaded(WPARAM wParam,LPARAM lParam)
+int Chat_ModulesLoaded(WPARAM, LPARAM)
{
OptionsInit();
- return 0;
+ return 0;
}
diff --git a/plugins/Scriver/src/chat/message.cpp b/plugins/Scriver/src/chat/message.cpp index a417f3a51f..fe57ca5b57 100644 --- a/plugins/Scriver/src/chat/message.cpp +++ b/plugins/Scriver/src/chat/message.cpp @@ -21,16 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../commonheaders.h"
-static int RTFColorToIndex(int *pIndex, int iCol, SESSION_INFO *si)
-{
- MODULEINFO *pMod = pci->MM_FindModule(si->pszModule);
- for (int i = 0; i < pMod->nColorCount; i++)
- if (pIndex[i] == iCol)
- return i;
-
- return -1;
-}
-
static void CreateColorMap(char* Text, int *pIndex, SESSION_INFO *si)
{
static const char* lpszFmt = "\\red%[^ \x5b\\]\\green%[^ \x5b\\]\\blue%[^ \x5b;];";
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index 09b24b9483..51e9fd2d51 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -728,7 +728,7 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg,UINT uMsg,WPARAM wParam return FALSE;
}
-static int OptionsInitialize(WPARAM wParam, LPARAM lParam)
+static int OptionsInitialize(WPARAM wParam, LPARAM)
{
if (g_dat.popupInstalled) {
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 9b1d60e7d5..baa47093a2 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -54,9 +54,8 @@ static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, RECT rc;
GetClientRect(hwnd, &rc);
SetCursor(rc.right > rc.bottom ? hCurSplitNS : hCurSplitWE);
- return TRUE;
}
- return 0;
+ return TRUE;
case WM_LBUTTONDOWN:
SetCapture(hwnd);
@@ -758,7 +757,7 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR return mir_callNextSubclass(hwnd, LogSubclassProc, msg, wParam, lParam);
}
-static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESSION_INFO * parentdat)
+static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO * parentdat)
{
static int currentHovered = -1;
static HWND hwndToolTip = NULL;
@@ -1024,9 +1023,9 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, else
nItemUnderMouse &= 0xFFFF;
- ProcessNickListHovering(hwnd, (int)nItemUnderMouse, &pt, si);
+ ProcessNickListHovering(hwnd, (int)nItemUnderMouse, si);
}
- else ProcessNickListHovering(hwnd, -1, &pt, NULL);
+ else ProcessNickListHovering(hwnd, -1, NULL);
}
return mir_callNextSubclass(hwnd, NicklistSubclassProc, msg, wParam, lParam);
@@ -1041,7 +1040,7 @@ int GetTextPixelSize(TCHAR* pszText, HFONT hFont, BOOL bWidth) HFONT hOldFont = (HFONT)SelectObject(hdc, hFont);
RECT rc = { 0 };
- int i = DrawText(hdc, pszText, -1, &rc, DT_CALCRECT);
+ DrawText(hdc, pszText, -1, &rc, DT_CALCRECT);
SelectObject(hdc, hOldFont);
ReleaseDC(NULL, hdc);
return bWidth ? rc.right - rc.left : rc.bottom - rc.top;
@@ -1530,7 +1529,6 @@ LABEL_SHOWWINDOW: pt.x = wParam; pt.y = 0;
ScreenToClient(hwndDlg, &pt);
- int oldSplitterX = si->iSplitterX;
si->iSplitterX = rc.right - pt.x + 1;
if (si->iSplitterX < 35)
si->iSplitterX = 35;
@@ -1543,7 +1541,6 @@ LABEL_SHOWWINDOW: GetClientRect(hwndDlg, &rc);
pt.x = 0; pt.y = wParam;
ScreenToClient(hwndDlg, &pt);
- int oldSplitterY = si->iSplitterY;
si->iSplitterY = rc.bottom - pt.y;
g_Settings.iSplitterY = si->iSplitterY;
}
@@ -2012,7 +2009,7 @@ LABEL_SHOWWINDOW: return FALSE;
}
-void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground)
+void ShowRoom(SESSION_INFO *si, WPARAM, BOOL)
{
if (si == NULL)
return;
|