summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/chat/options.cpp')
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp188
1 files changed, 94 insertions, 94 deletions
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index f419927345..b895e70991 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -181,8 +181,8 @@ void LoadMsgDlgFont(int section, int i, LOGFONT *lf, COLORREF* colour, char *szM
FontOptionsList *fol = fontOptionsList;
switch (section) {
- case FONTSECTION_IM: fol = IM_fontOptionsList; break;
- case FONTSECTION_IP: fol = IP_fontOptionsList; break;
+ case FONTSECTION_IM: fol = IM_fontOptionsList; break;
+ case FONTSECTION_IP: fol = IP_fontOptionsList; break;
}
if (colour) {
@@ -354,13 +354,13 @@ HICON LoadIconEx(char *pszIcoLibName)
static void InitSetting(TCHAR* &ppPointer, const char *pszSetting, const TCHAR *pszDefault)
{
- ptrT val( db_get_tsa(NULL, CHAT_MODULE, pszSetting));
+ ptrT val(db_get_tsa(NULL, CHAT_MODULE, pszSetting));
replaceStrT(ppPointer, (val != NULL) ? val : pszDefault);
}
#define OPT_FIXHEADINGS (WM_USER+1)
-static UINT _o1controls[] = {IDC_CHECKBOXES, IDC_GROUP, IDC_STATIC_ADD};
+static UINT _o1controls[] = { IDC_CHECKBOXES, IDC_GROUP, IDC_STATIC_ADD };
HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle)
{
@@ -400,7 +400,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
{
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHECKBOXES), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHECKBOXES), GWL_STYLE) | (TVS_NOHSCROLL));
/* Replace image list, destroy old. */
- ImageList_Destroy(TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_CHECKBOXES), CreateStateImageList(), TVSIL_NORMAL));
+ ImageList_Destroy(TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_CHECKBOXES), CreateStateImageList(), TVSIL_NORMAL));
hListHeading1 = InsertBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), TranslateT("Appearance and functionality of chat room windows"), TRUE);
hListHeading2 = InsertBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), TranslateT("Appearance of the message log"), TRUE);
@@ -486,8 +486,8 @@ static TCHAR* chatcolorsnames[] =
void RegisterFontServiceFonts() {
char szTemp[100];
LOGFONT lf;
- FontIDT fid = {0};
- ColourIDT cid = {0};
+ FontIDT fid = { 0 };
+ ColourIDT cid = { 0 };
fid.cbSize = sizeof(FontIDT);
cid.cbSize = sizeof(ColourIDT);
@@ -643,7 +643,7 @@ void RegisterFontServiceFonts() {
}
}
-int FontServiceFontsChanged(WPARAM,LPARAM)
+int FontServiceFontsChanged(WPARAM, LPARAM)
{
PluginConfig.reloadSettings();
CSkin::initAeroEffect();
@@ -663,7 +663,7 @@ static UINT _o2chatcontrols[] =
IDC_STATIC110, IDC_STATIC112, 0
};
-static UINT _o3chatcontrols[] = {0};
+static UINT _o3chatcontrols[] = { 0 };
INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
@@ -695,32 +695,32 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
_T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
_T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
// contact vars
- _T("%nick%"), TranslateT("nick of current contact (if defined)"),
- _T("%proto%"), TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiple accounts"),
- _T("%accountname%"), TranslateT("user-defined account name of current contact (if defined)."),
- _T("%userid%"), TranslateT("user ID of current contact (if defined). It is like UIN for ICQ, JID for Jabber, etc."),
+ _T("%nick%"), TranslateT("nick of current contact (if defined)"),
+ _T("%proto%"), TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiple accounts"),
+ _T("%accountname%"), TranslateT("user-defined account name of current contact (if defined)."),
+ _T("%userid%"), TranslateT("user ID of current contact (if defined). It is like UIN for ICQ, JID for Jabber, etc."),
// global vars
- _T("%miranda_path%"), TranslateT("path to Miranda root folder"),
- _T("%miranda_profilesdir%"), TranslateT("path to folder containing Miranda profiles"),
- _T("%miranda_profilename%"), TranslateT("name of current Miranda profile (filename, without extension)"),
- _T("%miranda_userdata%"), TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
- _T("%miranda_logpath%"), TranslateT("will return parsed string %miranda_userdata%\\Logs"),
- _T("%appdata%"), TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
- _T("%username%"), TranslateT("username for currently logged-on Windows user"),
- _T("%mydocuments%"), TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
- _T("%desktop%"), TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
- _T("%xxxxxxx%"), TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)"),
+ _T("%miranda_path%"), TranslateT("path to Miranda root folder"),
+ _T("%miranda_profilesdir%"), TranslateT("path to folder containing Miranda profiles"),
+ _T("%miranda_profilename%"), TranslateT("name of current Miranda profile (filename, without extension)"),
+ _T("%miranda_userdata%"), TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
+ _T("%miranda_logpath%"), TranslateT("will return parsed string %miranda_userdata%\\Logs"),
+ _T("%appdata%"), TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
+ _T("%username%"), TranslateT("username for currently logged-on Windows user"),
+ _T("%mydocuments%"), TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
+ _T("%desktop%"), TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
+ _T("%xxxxxxx%"), TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)"),
// date/time vars
- _T("%d%"), TranslateT("day of month, 1-31"),
- _T("%dd%"), TranslateT("day of month, 01-31"),
- _T("%m%"), TranslateT("month number, 1-12"),
- _T("%mm%"), TranslateT("month number, 01-12"),
- _T("%mon%"), TranslateT("abbreviated month name"),
- _T("%month%"), TranslateT("full month name"),
- _T("%yy%"), TranslateT("year without century, 01-99"),
- _T("%yyyy%"), TranslateT("year with century, 1901-9999"),
- _T("%wday%"), TranslateT("abbreviated weekday name"),
- _T("%weekday%"), TranslateT("full weekday name"));
+ _T("%d%"), TranslateT("day of month, 1-31"),
+ _T("%dd%"), TranslateT("day of month, 01-31"),
+ _T("%m%"), TranslateT("month number, 1-12"),
+ _T("%mm%"), TranslateT("month number, 01-12"),
+ _T("%mon%"), TranslateT("abbreviated month name"),
+ _T("%month%"), TranslateT("full month name"),
+ _T("%yy%"), TranslateT("year without century, 01-99"),
+ _T("%yyyy%"), TranslateT("year with century, 1901-9999"),
+ _T("%wday%"), TranslateT("abbreviated weekday name"),
+ _T("%weekday%"), TranslateT("full weekday name"));
hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY), tszTooltipText, TranslateT("Variables"));
}
}
@@ -729,7 +729,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
break;
case WM_COMMAND:
- if ((LOWORD(wParam) == IDC_INSTAMP
+ if ((LOWORD(wParam) == IDC_INSTAMP
|| LOWORD(wParam) == IDC_OUTSTAMP
|| LOWORD(wParam) == IDC_TIMESTAMP
|| LOWORD(wParam) == IDC_LOGLIMIT
@@ -744,68 +744,68 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
// and possibly delete archived logs.
switch (LOWORD(wParam)) {
case IDC_MUC_OPENLOGBASEDIR:
- {
- TCHAR tszTemp[MAX_PATH + 20];
- _tcsncpy_s(tszTemp, g_Settings.pszLogDir, _TRUNCATE);
-
- TCHAR *p = tszTemp;
- while(*p && (*p == '\\' || *p == '.'))
- p++;
-
- if (*p)
- if (TCHAR *p1 = _tcschr(p, '\\'))
- *p1 = 0;
-
- TCHAR tszInitialDir[_MAX_DRIVE + _MAX_PATH + 10];
- mir_sntprintf(tszInitialDir, SIZEOF(tszInitialDir), _T("%s%s"), M.getChatLogPath(), p);
- if (!PathFileExists(tszInitialDir))
- _tcsncpy_s(tszInitialDir, M.getChatLogPath(), _TRUNCATE);
-
- TCHAR tszReturnName[MAX_PATH]; tszReturnName[0] = 0;
- mir_sntprintf(tszTemp, SIZEOF(tszTemp), _T("%s%c*.*%c%c"), TranslateT("All files"), 0, 0, 0);
-
- OPENFILENAME ofn = { 0 };
- ofn.lpstrInitialDir = tszInitialDir;
- ofn.lpstrFilter = tszTemp;
- ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
- ofn.lpstrFile = tszReturnName;
- ofn.nMaxFile = MAX_PATH;
- ofn.nMaxFileTitle = MAX_PATH;
- ofn.Flags = OFN_HIDEREADONLY | OFN_DONTADDTORECENT;
- ofn.lpstrDefExt = _T("log");
- GetOpenFileName(&ofn);
- }
- break;
+ {
+ TCHAR tszTemp[MAX_PATH + 20];
+ _tcsncpy_s(tszTemp, g_Settings.pszLogDir, _TRUNCATE);
+
+ TCHAR *p = tszTemp;
+ while (*p && (*p == '\\' || *p == '.'))
+ p++;
+
+ if (*p)
+ if (TCHAR *p1 = _tcschr(p, '\\'))
+ *p1 = 0;
+
+ TCHAR tszInitialDir[_MAX_DRIVE + _MAX_PATH + 10];
+ mir_sntprintf(tszInitialDir, SIZEOF(tszInitialDir), _T("%s%s"), M.getChatLogPath(), p);
+ if (!PathFileExists(tszInitialDir))
+ _tcsncpy_s(tszInitialDir, M.getChatLogPath(), _TRUNCATE);
+
+ TCHAR tszReturnName[MAX_PATH]; tszReturnName[0] = 0;
+ mir_sntprintf(tszTemp, SIZEOF(tszTemp), _T("%s%c*.*%c%c"), TranslateT("All files"), 0, 0, 0);
+
+ OPENFILENAME ofn = { 0 };
+ ofn.lpstrInitialDir = tszInitialDir;
+ ofn.lpstrFilter = tszTemp;
+ ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+ ofn.lpstrFile = tszReturnName;
+ ofn.nMaxFile = MAX_PATH;
+ ofn.nMaxFileTitle = MAX_PATH;
+ ofn.Flags = OFN_HIDEREADONLY | OFN_DONTADDTORECENT;
+ ofn.lpstrDefExt = _T("log");
+ GetOpenFileName(&ofn);
+ }
+ break;
case IDC_FONTCHOOSE:
- {
- TCHAR tszDirectory[MAX_PATH];
- LPMALLOC psMalloc;
-
- if (SUCCEEDED(CoGetMalloc(1, &psMalloc))) {
- BROWSEINFO bi = { 0 };
- bi.hwndOwner = hwndDlg;
- bi.pszDisplayName = tszDirectory;
- bi.lpszTitle = TranslateT("Select folder");
- bi.ulFlags = BIF_NEWDIALOGSTYLE | BIF_EDITBOX | BIF_RETURNONLYFSDIRS;
- bi.lpfn = BrowseCallbackProc;
- bi.lParam = (LPARAM)tszDirectory;
-
- LPITEMIDLIST idList = SHBrowseForFolder(&bi);
- if (idList) {
- const TCHAR *szUserDir = M.getUserDir();
- SHGetPathFromIDList(idList, tszDirectory);
- mir_tstrcat(tszDirectory, _T("\\"));
-
- TCHAR tszTemp[MAX_PATH];
- PathToRelativeT(tszDirectory, tszTemp, szUserDir);
- SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, mir_tstrlen(tszTemp) > 1 ? tszTemp : DEFLOGFILENAME);
- }
- psMalloc->Free(idList);
- psMalloc->Release();
+ {
+ TCHAR tszDirectory[MAX_PATH];
+ LPMALLOC psMalloc;
+
+ if (SUCCEEDED(CoGetMalloc(1, &psMalloc))) {
+ BROWSEINFO bi = { 0 };
+ bi.hwndOwner = hwndDlg;
+ bi.pszDisplayName = tszDirectory;
+ bi.lpszTitle = TranslateT("Select folder");
+ bi.ulFlags = BIF_NEWDIALOGSTYLE | BIF_EDITBOX | BIF_RETURNONLYFSDIRS;
+ bi.lpfn = BrowseCallbackProc;
+ bi.lParam = (LPARAM)tszDirectory;
+
+ LPITEMIDLIST idList = SHBrowseForFolder(&bi);
+ if (idList) {
+ const TCHAR *szUserDir = M.getUserDir();
+ SHGetPathFromIDList(idList, tszDirectory);
+ mir_tstrcat(tszDirectory, _T("\\"));
+
+ TCHAR tszTemp[MAX_PATH];
+ PathToRelativeT(tszDirectory, tszTemp, szUserDir);
+ SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, mir_tstrlen(tszTemp) > 1 ? tszTemp : DEFLOGFILENAME);
}
+ psMalloc->Free(idList);
+ psMalloc->Release();
}
- break;
+ }
+ break;
case IDC_LOGGING:
Utils::enableDlgControl(hwndDlg, IDC_LOGDIRECTORY, IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE);
@@ -953,7 +953,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM, LPARAM lParam)
DWORD dwPopupFlags = M.GetDword(CHAT_MODULE, "PopupFlags", GC_EVENT_HIGHLIGHT);
DWORD dwLogFlags = M.GetDword(CHAT_MODULE, "DiskLogFlags", GC_EVENT_ALL);
- for (int i=0; i < SIZEOF(_eventorder); i++) {
+ for (int i = 0; i < SIZEOF(_eventorder); i++) {
if (_eventorder[i] != GC_EVENT_HIGHLIGHT) {
CheckDlgButton(hwndDlg, IDC_1 + i, dwFilterFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_L1 + i, dwLogFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED);
@@ -985,7 +985,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM, LPARAM lParam)
DWORD dwFilterFlags = 0, dwTrayFlags = 0,
dwPopupFlags = 0, dwLogFlags = 0;
- for (int i=0; i < SIZEOF(_eventorder); i++) {
+ for (int i = 0; i < SIZEOF(_eventorder); i++) {
if (_eventorder[i] != GC_EVENT_HIGHLIGHT) {
dwFilterFlags |= (IsDlgButtonChecked(hwndDlg, IDC_1 + i) ? _eventorder[i] : 0);
dwLogFlags |= (IsDlgButtonChecked(hwndDlg, IDC_L1 + i) ? _eventorder[i] : 0);