diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-21 15:13:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-21 15:13:56 +0000 |
commit | 34c11f2b4c3511476b2f09f3a438ce1f39d63bfd (patch) | |
tree | 88dbad1e6ca7dc7012bd4950fd9621fa0da29deb /src | |
parent | 646d3950702c34475e9bcb05ebe380f6874a73d2 (diff) |
patch for eliminating expert mode in options (to replace the simple mode with ModernOpts)
git-svn-id: http://svn.miranda-ng.org/main/trunk@2025 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdclist/src/clcopts.cpp | 2 | ||||
-rw-r--r-- | src/core/stdclist/src/clistopts.cpp | 5 | ||||
-rw-r--r-- | src/core/stdclist/src/cluiopts.cpp | 14 | ||||
-rw-r--r-- | src/core/stdfile/fileopts.cpp | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgoptions.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/genmenuopt.cpp | 2 | ||||
-rw-r--r-- | src/modules/icolib/skin2opts.cpp | 4 | ||||
-rw-r--r-- | src/modules/ignore/ignore.cpp | 19 | ||||
-rw-r--r-- | src/modules/netlib/netlibopts.cpp | 3 | ||||
-rw-r--r-- | src/modules/options/options.cpp | 183 | ||||
-rw-r--r-- | src/modules/skin/sounds.cpp | 2 | ||||
-rw-r--r-- | src/resource.h | 2 | ||||
-rw-r--r-- | src/resource.rc | 4 |
13 files changed, 22 insertions, 221 deletions
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp index 51f9c8a08b..4cbd20a0b7 100644 --- a/src/core/stdclist/src/clcopts.cpp +++ b/src/core/stdclist/src/clcopts.cpp @@ -440,7 +440,7 @@ int ClcOptInit(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLC);
odp.pszTitle = LPGEN("List");
odp.pfnDlgProc = DlgProcClcMainOpts;
- odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLCBKG);
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp index 83079d6d75..aced950d8e 100644 --- a/src/core/stdclist/src/clistopts.cpp +++ b/src/core/stdclist/src/clistopts.cpp @@ -232,8 +232,6 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP /****************************************************************************************/
-static UINT expertOnlyControls[] = { IDC_ALWAYSSTATUS };
-
int CListOptInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
@@ -244,9 +242,6 @@ int CListOptInit(WPARAM wParam, LPARAM lParam) odp.pszTitle = LPGEN("Contact List");
odp.pfnDlgProc = DlgProcGenOpts;
odp.flags = ODPF_BOLDGROUPS;
- odp.nIDBottomSimpleControl = IDC_STCLISTGROUP;
- odp.expertOnlyControls = expertOnlyControls;
- odp.nExpertOnlyControls = SIZEOF(expertOnlyControls);
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/src/core/stdclist/src/cluiopts.cpp b/src/core/stdclist/src/cluiopts.cpp index e0b7bdbdee..539ed0e937 100644 --- a/src/core/stdclist/src/cluiopts.cpp +++ b/src/core/stdclist/src/cluiopts.cpp @@ -329,12 +329,6 @@ static INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L /****************************************************************************************/
-static UINT expertOnlyControls[] =
-{
- IDC_BRINGTOFRONT, IDC_AUTOSIZE, IDC_STATIC21, IDC_MAXSIZEHEIGHT, IDC_MAXSIZESPIN,
- IDC_STATIC22, IDC_AUTOSIZEUPWARD, IDC_SHOWMAINMENU, IDC_SHOWCAPTION, IDC_CLIENTDRAG
-};
-
int CluiOptInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
@@ -346,18 +340,12 @@ int CluiOptInit(WPARAM wParam, LPARAM lParam) odp.pszGroup = LPGEN("Contact List");
odp.pfnDlgProc = DlgProcCluiOpts;
odp.flags = ODPF_BOLDGROUPS;
- odp.nIDBottomSimpleControl = IDC_STWINDOWGROUP;
- odp.expertOnlyControls = expertOnlyControls;
- odp.nExpertOnlyControls = SIZEOF(expertOnlyControls);
Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SBAR);
odp.pszTitle = LPGEN("Status Bar");
odp.pfnDlgProc = DlgProcSBarOpts;
- odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
- odp.nIDBottomSimpleControl = 0;
- odp.nExpertOnlyControls = 0;
- odp.expertOnlyControls = NULL;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/src/core/stdfile/fileopts.cpp b/src/core/stdfile/fileopts.cpp index f24ce4af12..827257215e 100644 --- a/src/core/stdfile/fileopts.cpp +++ b/src/core/stdfile/fileopts.cpp @@ -240,7 +240,6 @@ int FileOptInitialise(WPARAM wParam, LPARAM) odp.pszGroup = LPGEN("Events");
odp.pfnDlgProc = DlgProcFileOpts;
odp.flags = ODPF_BOLDGROUPS;
- odp.nIDBottomSimpleControl = IDC_VIRUSSCANNERGROUP;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 028e7983a2..a0bcb29172 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -595,13 +595,11 @@ static int OptInitialise(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGLOG);
odp.pszTab = LPGEN("Messaging Log");
odp.pfnDlgProc = DlgProcLogOptions;
- odp.nIDBottomSimpleControl = IDC_STMSGLOGGROUP;
Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGTYPE);
odp.pszTab = LPGEN("Typing Notify");
odp.pfnDlgProc = DlgProcTypeOptions;
- odp.nIDBottomSimpleControl = 0;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index 004939591c..40dc80a597 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -864,7 +864,7 @@ int GenMenuOptInit(WPARAM wParam, LPARAM) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_PROTOCOLORDER);
odp.pszTitle = LPGEN("Accounts");
odp.pfnDlgProc = ProtocolOrderOpts;
- odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp index 7075cd439d..f5bb3ffa06 100644 --- a/src/modules/icolib/skin2opts.cpp +++ b/src/modules/icolib/skin2opts.cpp @@ -1019,8 +1019,6 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM return FALSE;
}
-static UINT iconsExpertOnlyControls[] = {IDC_IMPORT};
-
int SkinOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = {0};
@@ -1032,8 +1030,6 @@ int SkinOptionsInit(WPARAM wParam, LPARAM) odp.pszTitle = LPGEN("Icons");
odp.pszGroup = LPGEN("Customize");
odp.pfnDlgProc = DlgProcIcoLibOpts;
- odp.expertOnlyControls = iconsExpertOnlyControls;
- odp.nExpertOnlyControls = SIZEOF(iconsExpertOnlyControls);
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/src/modules/ignore/ignore.cpp b/src/modules/ignore/ignore.cpp index 715c7897da..2907833af5 100644 --- a/src/modules/ignore/ignore.cpp +++ b/src/modules/ignore/ignore.cpp @@ -221,11 +221,6 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM SendDlgItemMessage(hwndDlg, IDC_ADDED, STM_SETICON, (WPARAM)hIcons[7], 0);
SendDlgItemMessage(hwndDlg, IDC_TYPINGICON, STM_SETICON, (WPARAM)hIcons[8], 0);
- if ( !SendMessage(GetParent(hwndDlg), PSM_ISEXPERT, 0, 0)) {
- SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE, GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE)&~(CLS_CHECKBOXES|CLS_GROUPCHECKBOXES|CLS_SHOWHIDDEN));
- SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_AUTOREBUILD, 0, 0);
- }
-
ResetListOptions( GetDlgItem(hwndDlg, IDC_LIST));
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRACOLUMNS, IGNOREEVENT_MAX+2, 0);
{
@@ -317,17 +312,6 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM }
return TRUE;
- case PSN_EXPERTCHANGED:
- {
- INT_PTR dwStyle = GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE);
- if (((PSHNOTIFY*)lParam)->lParam)
- dwStyle |= CLS_CHECKBOXES | CLS_GROUPCHECKBOXES | CLS_SHOWHIDDEN;
- else
- dwStyle &= ~(CLS_CHECKBOXES|CLS_GROUPCHECKBOXES|CLS_SHOWHIDDEN);
- SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE, dwStyle);
- SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_AUTOREBUILD, 0, 0);
- }
- break;
}
break;
}
@@ -345,7 +329,6 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM return FALSE;
}
-static UINT expertOnlyControls[] = {IDC_STCHECKMARKS};
static int IgnoreOptInitialise(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
@@ -357,8 +340,6 @@ static int IgnoreOptInitialise(WPARAM wParam, LPARAM) odp.pszGroup = LPGEN("Events");
odp.pfnDlgProc = DlgProcIgnoreOpts;
odp.flags = ODPF_BOLDGROUPS;
- odp.expertOnlyControls = expertOnlyControls;
- odp.nExpertOnlyControls = SIZEOF(expertOnlyControls);
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/src/modules/netlib/netlibopts.cpp b/src/modules/netlib/netlibopts.cpp index 582669eb0d..386de096f2 100644 --- a/src/modules/netlib/netlibopts.cpp +++ b/src/modules/netlib/netlibopts.cpp @@ -498,7 +498,6 @@ static INT_PTR CALLBACK DlgProcNetlibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, return FALSE;
}
-static UINT expertOnlyControls[] = {IDC_LOGOPTIONS};
int NetlibOptInitialise(WPARAM wParam, LPARAM)
{
int optionsCount = 0;
@@ -521,8 +520,6 @@ int NetlibOptInitialise(WPARAM wParam, LPARAM) odp.pszTitle = LPGEN("Network");
odp.pfnDlgProc = DlgProcNetlibOpts;
odp.flags = ODPF_BOLDGROUPS;
- odp.expertOnlyControls = expertOnlyControls;
- odp.nExpertOnlyControls = SIZEOF(expertOnlyControls);
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index 8b4ee93f09..031691e5c2 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -68,11 +68,8 @@ struct OptionsPageData HTREEITEM hTreeItem;
HWND hwnd;
int changed;
- int simpleHeight, expertHeight;
- int simpleWidth, expertWidth;
- int simpleBottomControlId, simpleRightControlId;
- int nExpertOnlyControls;
- UINT *expertOnlyControls;
+ int height;
+ int width;
DWORD flags;
TCHAR *ptszTitle, *ptszGroup, *ptszTab;
int hLangpack;
@@ -359,8 +356,6 @@ static BOOL CheckPageShow(HWND hdlg, OptionsDlgData* dat, int i) OptionsPageData* opd = dat->arOpd[i];
if (dat->szFilterString && dat->szFilterString[0] && !MatchesFilter(opd, dat->szFilterString)) return FALSE;
- if ((opd->flags & ODPF_SIMPLEONLY) && IsDlgButtonChecked(hdlg, IDC_EXPERT)) return FALSE;
- if ((opd->flags & ODPF_EXPERTONLY) && !IsDlgButtonChecked(hdlg, IDC_EXPERT)) return FALSE;
return TRUE;
}
@@ -586,12 +581,8 @@ static bool LoadOptionsPage(OPTIONSDIALOGPAGE *src, OptionsPageData *dst) dst->hInst = src->hInstance;
dst->hwnd = NULL;
dst->changed = 0;
- dst->simpleHeight = dst->expertHeight = 0;
- dst->simpleBottomControlId = src->nIDBottomSimpleControl;
- dst->simpleWidth = dst->expertWidth = 0;
- dst->simpleRightControlId = src->nIDRightSimpleControl;
- dst->nExpertOnlyControls = src->nExpertOnlyControls;
- dst->expertOnlyControls = src->expertOnlyControls;
+ dst->height = 0;
+ dst->width = 0;
dst->flags = src->flags;
dst->hLangpack = src->hLangpack;
dst->dwInitParam = src->dwInitParam;
@@ -700,14 +691,13 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L Utils_RestoreWindowPositionNoSize(hdlg, NULL, "Options", "");
Window_SetIcon_IcoLib(hdlg, SKINICON_OTHER_OPTIONS);
- CheckDlgButton(hdlg, IDC_EXPERT, db_get_b(NULL, "Options", "Expert", SETTING_SHOWEXPERT_DEFAULT)?BST_CHECKED:BST_UNCHECKED);
EnableWindow( GetDlgItem(hdlg, IDC_APPLY), FALSE);
dat = new OptionsDlgData;
SetWindowLongPtr(hdlg, GWLP_USERDATA, (LONG_PTR)dat);
SetWindowText(hdlg, psh->pszCaption);
LOGFONT lf;
- dat->hBoldFont = (HFONT)SendDlgItemMessage(hdlg, IDC_EXPERT, WM_GETFONT, 0, 0);
+ dat->hBoldFont = (HFONT)SendDlgItemMessage(hdlg, IDC_APPLY, WM_GETFONT, 0, 0);
GetObject(dat->hBoldFont, sizeof(lf), &lf);
lf.lfWeight = FW_BOLD;
dat->hBoldFont = CreateFontIndirect(&lf);
@@ -974,10 +964,6 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L return TRUE;
- case PSM_ISEXPERT:
- SetWindowLongPtr(hdlg, DWLP_MSGRESULT, IsDlgButtonChecked(hdlg, IDC_EXPERT));
- return TRUE;
-
case PSM_GETBOLDFONT:
SetWindowLongPtr(hdlg, DWLP_MSGRESULT, (LONG_PTR)dat->hBoldFont);
return TRUE;
@@ -1052,32 +1038,15 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L if (p->flags & ODPF_BOLDGROUPS)
EnumChildWindows(p->hwnd, BoldGroupTitlesEnumChildren, (LPARAM)dat->hBoldFont);
GetClientRect(p->hwnd, &rcPage);
- p->expertWidth = rcPage.right;
- p->expertHeight = rcPage.bottom;
+ p->width = rcPage.right;
+ p->height = rcPage.bottom;
GetWindowRect(p->hwnd, &rc);
- if (p->simpleBottomControlId) {
- GetWindowRect( GetDlgItem(p->hwnd, p->simpleBottomControlId), &rcControl);
- p->simpleHeight = rcControl.bottom-rc.top;
- }
- else p->simpleHeight = p->expertHeight;
+ p->height = p->height;
+ p->width = p->width;
- if (p->simpleRightControlId) {
- GetWindowRect( GetDlgItem(p->hwnd, p->simpleRightControlId), &rcControl);
- p->simpleWidth = rcControl.right-rc.left;
- }
- else p->simpleWidth = p->expertWidth;
-
- if (IsDlgButtonChecked(hdlg, IDC_EXPERT)) {
- w = p->expertWidth;
- h = p->expertHeight;
- }
- else {
- for (int i=0; i < p->nExpertOnlyControls; i++)
- ShowWindow( GetDlgItem(p->hwnd, p->expertOnlyControls[i]), SW_HIDE);
- w = p->simpleWidth;
- h = p->simpleHeight;
- }
+ w = p->width;
+ h = p->height;
p->offsetX = 0;
p->offsetY = 0;
@@ -1128,47 +1097,6 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L ThemeDialogBackground(p->hwnd, FALSE);
}
- // Resizing
- if ( !p->simpleBottomControlId) {
- int pageWidth, pageHeight;
-
- if (IsDlgButtonChecked(hdlg, IDC_EXPERT)) {
- pageWidth = p->expertWidth;
- pageHeight = p->expertHeight;
- }
- else {
- pageWidth = p->simpleWidth;
- pageHeight = p->simpleHeight;
- }
-
- RECT* parentPageRect = &dat->rcDisplay;
- if (p->insideTab)
- parentPageRect = &dat->rcTab;
-
- pageHeight = min(pageHeight, parentPageRect->bottom - parentPageRect->top);
- pageWidth = min(pageWidth, parentPageRect->right - parentPageRect->left);
-
- int newOffsetX = (parentPageRect->right - parentPageRect->left - pageWidth) >> 1;
- int newOffsetY = p->insideTab ? 0 : (parentPageRect->bottom - parentPageRect->top - pageHeight) >> 1;
-
- struct MoveChildParam mcp;
- mcp.hDlg = p->hwnd;
- mcp.offset.x = newOffsetX - p->offsetX;
- mcp.offset.y = newOffsetY - p->offsetY;
-
- if (mcp.offset.x || mcp.offset.y) {
- EnumChildWindows(p->hwnd, MoveEnumChildren, (LPARAM)(&mcp));
-
- SetWindowPos(p->hwnd, NULL,
- parentPageRect->left, parentPageRect->top,
- parentPageRect->right - parentPageRect->left,
- parentPageRect->bottom - parentPageRect->top,
- SWP_NOZORDER | SWP_NOACTIVATE);
- p->offsetX = newOffsetX;
- p->offsetY = newOffsetY;
- }
- }
-
ShowWindow(p->hwnd, SW_SHOW);
if (((LPNMTREEVIEW)lParam)->action == TVC_BYMOUSE) PostMessage(hdlg, DM_FOCUSPAGE, 0, 0);
else SetFocus(hwndTree);
@@ -1201,91 +1129,12 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L break;
- case IDC_EXPERT:
+ case IDC_MODERN:
{
- int expert = IsDlgButtonChecked(hdlg, IDC_EXPERT);
- RECT rcPage;
- int neww, newh;
-
- DBWriteContactSettingByte(NULL, "Options", "Expert", (BYTE)expert);
-
- PSHNOTIFY pshn;
- pshn.hdr.idFrom = 0;
- pshn.lParam = expert;
- pshn.hdr.code = PSN_EXPERTCHANGED;
-
- for (int i=0; i <dat->arOpd.getCount(); i++) {
- opd = dat->arOpd[i];
- if (opd->hwnd == NULL)
- continue;
- if ( !CheckPageShow(hdlg, dat, i))
- continue;
-
- pshn.hdr.hwndFrom = opd->hwnd;
- SendMessage(opd->hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
-
- for (int j = 0; j < opd->nExpertOnlyControls; j++)
- ShowWindow( GetDlgItem(opd->hwnd, opd->expertOnlyControls[j]), expert ? SW_SHOW : SW_HIDE);
-
- opd->insideTab = IsInsideTab(hdlg, dat, i);
-
- GetWindowRect(opd->hwnd, &rcPage);
- if (opd->simpleBottomControlId)
- newh = expert ? opd->expertHeight : opd->simpleHeight;
- else
- newh = rcPage.bottom - rcPage.top;
- if (opd->simpleRightControlId)
- neww = expert ? opd->expertWidth : opd->simpleWidth;
- else
- neww = rcPage.right - rcPage.left;
-
- if (i == dat->currentPage) {
- POINT ptStart, ptEnd, ptNow;
- DWORD thisTick, startTick;
- RECT rc;
-
- ptNow.x = ptNow.y = 0;
- ClientToScreen(hdlg, &ptNow);
- GetWindowRect(opd->hwnd, &rc);
- ptStart.x = rc.left-ptNow.x;
- ptStart.y = rc.top-ptNow.y;
- if (opd->insideTab) {
- ptEnd.x = (dat->rcTab.left+dat->rcTab.right-neww)>>1;
- ptEnd.y = dat->rcTab.top;
- }
- else {
- ptEnd.x = (dat->rcDisplay.left+dat->rcDisplay.right-neww)>>1;
- ptEnd.y = (dat->rcDisplay.top+dat->rcDisplay.bottom-newh)>>1;
- }
- if (abs(ptEnd.x-ptStart.x)>5 || abs(ptEnd.y-ptStart.y)>5) {
- startTick = GetTickCount();
- SetWindowPos(opd->hwnd, HWND_TOP, 0, 0, min(neww, rcPage.right), min(newh, rcPage.bottom), SWP_NOMOVE);
- UpdateWindow(opd->hwnd);
- for (;;) {
- thisTick = GetTickCount();
- if (thisTick>startTick+100) break;
- ptNow.x = ptStart.x+(ptEnd.x-ptStart.x)*(int)(thisTick-startTick)/100;
- ptNow.y = ptStart.y+(ptEnd.y-ptStart.y)*(int)(thisTick-startTick)/100;
- SetWindowPos(opd->hwnd, 0, ptNow.x, ptNow.y, 0, 0, SWP_NOZORDER|SWP_NOSIZE);
- }
- }
- if (opd->insideTab)
- ShowWindow( GetDlgItem(hdlg, IDC_TAB), SW_SHOW);
- else
- ShowWindow( GetDlgItem(hdlg, IDC_TAB), SW_HIDE);
- }
-
- if (opd->insideTab) {
- SetWindowPos(opd->hwnd, HWND_TOP, (dat->rcTab.left+dat->rcTab.right-neww)>>1, dat->rcTab.top, neww, newh, 0);
- ThemeDialogBackground(opd->hwnd, TRUE);
- }
- else {
- SetWindowPos(opd->hwnd, HWND_TOP, (dat->rcDisplay.left+dat->rcDisplay.right-neww)>>1, (dat->rcDisplay.top+dat->rcDisplay.bottom-newh)>>1, neww, newh, 0);
- ThemeDialogBackground(opd->hwnd, FALSE);
- }
- }
+ DBWriteContactSettingByte(NULL, "Options", "Expert", 0);
SaveOptionsTreeState(hdlg);
- SendMessage(hdlg, DM_REBUILDPAGETREE, 0, 0);
+ PostMessage(hdlg, WM_CLOSE, 0, 0);
+ CallService(MS_MODERNOPT_SHOW, 0, 0);
break;
}
case IDCANCEL:
@@ -1388,7 +1237,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L delete dat;
hwndOptions = NULL;
- CallService(MS_MODERNOPT_RESTORE, 0, 0);
+ CallService(MS_MODERNOPT_RESTORE, 0, 0);
break;
}
return FALSE;
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp index c79db357f1..104229ab7d 100644 --- a/src/modules/skin/sounds.cpp +++ b/src/modules/skin/sounds.cpp @@ -419,8 +419,6 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM return FALSE;
}
-static UINT iconsExpertOnlyControls[] = {IDC_IMPORT};
-
static int SkinOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
diff --git a/src/resource.h b/src/resource.h index 791f7570b6..87005ba04e 100644 --- a/src/resource.h +++ b/src/resource.h @@ -308,7 +308,7 @@ #define IDC_NEWNAME 1341
#define IDC_MOVE 1342
#define IDC_LEAVE 1343
-#define IDC_EXPERT 1346
+#define IDC_MODERN 1346
#define IDC_CATEGORYLIST 1366
#define IDC_LOADICONS 1369
#define IDC_STICONSGROUP 1371
diff --git a/src/resource.rc b/src/resource.rc index cef16ba39d..162d1f7454 100644 --- a/src/resource.rc +++ b/src/resource.rc @@ -147,7 +147,7 @@ BEGIN PUSHBUTTON "Apply",IDC_APPLY,374,283,50,14
CONTROL "Tree1",IDC_PAGETREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_TRACKSELECT | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,4,30,102,249
CONTROL "",IDC_TAB,"SysTabControl32",NOT WS_VISIBLE | WS_TABSTOP,111,30,313,249
- CONTROL "Show expert options",IDC_EXPERT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,284,102,10
+ CONTROL "Switch to simple options",IDC_MODERN,"Hyperlink",WS_TABSTOP,5,284,102,10
CTEXT "Please select a subentry from the list",IDC_STNOPAGE,111,30,313,251,SS_CENTERIMAGE
END
@@ -164,7 +164,7 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,212,283,50,14
PUSHBUTTON "Apply",IDC_APPLY,267,283,50,14
CONTROL "",IDC_TAB,"SysTabControl32",NOT WS_VISIBLE | WS_TABSTOP,4,32,313,249
- CONTROL "Show expert options",IDC_EXPERT,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,347,254,62,10
+ CONTROL "Switch to simple options",IDC_MODERN,"Hyperlink",WS_TABSTOP,347,254,62,10
CTEXT "Please select a subentry from the list",IDC_STNOPAGE,4,30,313,251,SS_CENTERIMAGE
CONTROL "",IDC_PAGETREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_TRACKSELECT | TVS_NOHSCROLL | NOT WS_VISIBLE | WS_BORDER | WS_TABSTOP,347,86,52,137
END
|