summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-26 13:01:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-26 13:01:31 +0300
commitd3eb88ca1ac4fe854552bc13b3f4f2c9bdd67008 (patch)
tree925e87b29b158f3ab02ac2391ea924d8bcfe7889 /plugins/TabSRMM
parentd8f94f6bb945edbd5b2091e81545f0a5f2df527b (diff)
unused option removed
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/res/chat.rc2
-rw-r--r--plugins/TabSRMM/src/chat/chat_resource.h1
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp134
3 files changed, 66 insertions, 71 deletions
diff --git a/plugins/TabSRMM/res/chat.rc b/plugins/TabSRMM/res/chat.rc
index c4c459b3a8..83d84cb11e 100644
--- a/plugins/TabSRMM/res/chat.rc
+++ b/plugins/TabSRMM/res/chat.rc
@@ -192,8 +192,6 @@ BEGIN
CONTROL "",IDC_L11,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,263,128,21,10
CONTROL "Suppress tray notifications for focused channel windows",IDC_TRAYONLYFORINACTIVE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,164,279,10
- CONTROL "Do not show popups when the channel window is not open",IDC_NOPOPUPSFORCLOSEDWINDOWS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,176,282,10
LTEXT "Highlight event",IDC_STATIC,42,139,100,12
COMBOBOX IDC_LOGICONTYPE,12,204,171,38,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Line markers in the message log",IDC_STATIC,14,193,257,10
diff --git a/plugins/TabSRMM/src/chat/chat_resource.h b/plugins/TabSRMM/src/chat/chat_resource.h
index 1674adf3e5..07916d6f51 100644
--- a/plugins/TabSRMM/src/chat/chat_resource.h
+++ b/plugins/TabSRMM/src/chat/chat_resource.h
@@ -57,7 +57,6 @@
#define IDC_STATIC110 1082
#define IDC_STATIC112 1085
#define IDC_TRAYONLYFORINACTIVE 1086
-#define IDC_NOPOPUPSFORCLOSEDWINDOWS 1087
#define IDC_LOGICONTYPE 1088
#define IDC_HIGHLIGHTNICKENABLE 1089
#define IDC_HIGHLIGHTNICKUID 1090
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index 4c919e984f..ebbed21280 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -33,24 +33,24 @@
struct FontOptionsList
{
- wchar_t* szDescr;
+ wchar_t *szDescr;
COLORREF defColour;
- wchar_t* szDefFace;
+ wchar_t *szDefFace;
BYTE defCharset, defStyle;
char defSize;
COLORREF colour;
- wchar_t szFace[LF_FACESIZE];
+ wchar_t szFace[LF_FACESIZE];
BYTE charset, style;
char size;
};
struct ColorOptionsList
{
- int order;
- wchar_t* tszGroup;
- wchar_t* tszName;
- char* szSetting;
- COLORREF def;
+ int order;
+ wchar_t *tszGroup;
+ wchar_t *tszName;
+ char *szSetting;
+ COLORREF def;
};
/*
@@ -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:
- {
- wchar_t tszTemp[MAX_PATH + 20];
- wcsncpy_s(tszTemp, g_Settings.pszLogDir, _TRUNCATE);
-
- wchar_t *p = tszTemp;
- while (*p && (*p == '\\' || *p == '.'))
- p++;
-
- if (*p)
- if (wchar_t *p1 = wcschr(p, '\\'))
- *p1 = 0;
-
- wchar_t tszInitialDir[_MAX_DRIVE + _MAX_PATH + 10];
- mir_snwprintf(tszInitialDir, L"%s%s", M.getChatLogPath(), p);
- if (!PathFileExists(tszInitialDir))
- wcsncpy_s(tszInitialDir, M.getChatLogPath(), _TRUNCATE);
-
- wchar_t tszReturnName[MAX_PATH]; tszReturnName[0] = 0;
- mir_snwprintf(tszTemp, L"%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 = L"log";
- GetOpenFileName(&ofn);
- }
- break;
+ {
+ wchar_t tszTemp[MAX_PATH + 20];
+ wcsncpy_s(tszTemp, g_Settings.pszLogDir, _TRUNCATE);
+
+ wchar_t *p = tszTemp;
+ while (*p && (*p == '\\' || *p == '.'))
+ p++;
+
+ if (*p)
+ if (wchar_t *p1 = wcschr(p, '\\'))
+ *p1 = 0;
+
+ wchar_t tszInitialDir[_MAX_DRIVE + _MAX_PATH + 10];
+ mir_snwprintf(tszInitialDir, L"%s%s", M.getChatLogPath(), p);
+ if (!PathFileExists(tszInitialDir))
+ wcsncpy_s(tszInitialDir, M.getChatLogPath(), _TRUNCATE);
+
+ wchar_t tszReturnName[MAX_PATH]; tszReturnName[0] = 0;
+ mir_snwprintf(tszTemp, L"%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 = L"log";
+ GetOpenFileName(&ofn);
+ }
+ break;
case IDC_FONTCHOOSE:
- {
- wchar_t 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 wchar_t *szUserDir = M.getUserDir();
- SHGetPathFromIDList(idList, tszDirectory);
- mir_wstrcat(tszDirectory, L"\\");
-
- wchar_t tszTemp[MAX_PATH];
- PathToRelativeW(tszDirectory, tszTemp, szUserDir);
- SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, mir_wstrlen(tszTemp) > 1 ? tszTemp : DEFLOGFILENAME);
+ {
+ wchar_t 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 wchar_t *szUserDir = M.getUserDir();
+ SHGetPathFromIDList(idList, tszDirectory);
+ mir_wstrcat(tszDirectory, L"\\");
+
+ wchar_t tszTemp[MAX_PATH];
+ PathToRelativeW(tszDirectory, tszTemp, szUserDir);
+ SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, mir_wstrlen(tszTemp) > 1 ? tszTemp : DEFLOGFILENAME);
+ }
+ psMalloc->Free(idList);
+ psMalloc->Release();
}
- psMalloc->Free(idList);
- psMalloc->Release();
}
- }
- break;
+ break;
case IDC_LOGGING:
Utils::enableDlgControl(hwndDlg, IDC_LOGDIRECTORY, IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE);
@@ -963,7 +963,6 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM, LPARAM lParam)
SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_SETCURSEL, (g_Settings.bLogSymbols ? 2 : (g_Settings.dwIconFlags ? 1 : 0)), 0);
- CheckDlgButton(hwndDlg, IDC_NOPOPUPSFORCLOSEDWINDOWS, M.GetByte(CHAT_MODULE, "SkipWhenNoWindow", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_TRAYONLYFORINACTIVE, M.GetByte(CHAT_MODULE, "TrayIconInactiveOnly", 0) ? BST_CHECKED : BST_UNCHECKED);
break;
@@ -998,7 +997,6 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM, LPARAM lParam)
db_set_dw(0, CHAT_MODULE, "IconFlags", lr == 1 ? 1 : 0);
db_set_b(0, CHAT_MODULE, "LogSymbols", lr == 2 ? 1 : 0);
- db_set_b(0, CHAT_MODULE, "SkipWhenNoWindow", IsDlgButtonChecked(hwndDlg, IDC_NOPOPUPSFORCLOSEDWINDOWS) ? 1 : 0);
db_set_b(0, CHAT_MODULE, "TrayIconInactiveOnly", IsDlgButtonChecked(hwndDlg, IDC_TRAYONLYFORINACTIVE) ? 1 : 0);
pci->ReloadSettings();