From 6d10b27399e46e952ded3d5a8bc4645ccffb2c34 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 9 Jul 2012 09:02:16 +0000 Subject: - customizeable TopToolbar - restored Clist Modern toolbar painter git-svn-id: http://svn.miranda-ng.org/main/trunk@876 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TopToolBar/ttbopt.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/TopToolBar/ttbopt.cpp') diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp index e410f71dfa..2662a44eef 100644 --- a/plugins/TopToolBar/ttbopt.cpp +++ b/plugins/TopToolBar/ttbopt.cpp @@ -191,9 +191,9 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SetWindowLongPtr(hTree, GWL_STYLE, GetWindowLongPtr(hTree, GWL_STYLE)|TVS_NOHSCROLL); - SetDlgItemInt(hwndDlg, IDC_BUTTHEIGHT, BUTTHEIGHT, FALSE); - SetDlgItemInt(hwndDlg, IDC_BUTTWIDTH, BUTTWIDTH, FALSE); - SetDlgItemInt(hwndDlg, IDC_BUTTGAP, BUTTGAP, FALSE); + SetDlgItemInt(hwndDlg, IDC_BUTTHEIGHT, g_ctrl->nButtonHeight, FALSE); + SetDlgItemInt(hwndDlg, IDC_BUTTWIDTH, g_ctrl->nButtonWidth, FALSE); + SetDlgItemInt(hwndDlg, IDC_BUTTGAP, g_ctrl->nButtonSpace, FALSE); CheckDlgButton(hwndDlg, IDC_USEFLAT, DBGetContactSettingByte(0, TTB_OPTDIR, "UseFlatButton", 1)); BuildTree(hwndDlg); @@ -360,13 +360,13 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case 0: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - BUTTHEIGHT = GetDlgItemInt(hwndDlg, IDC_BUTTHEIGHT, NULL, FALSE); - BUTTWIDTH = GetDlgItemInt(hwndDlg, IDC_BUTTWIDTH, NULL, FALSE); - BUTTGAP = GetDlgItemInt(hwndDlg, IDC_BUTTGAP, NULL, FALSE); - DBWriteContactSettingByte(0, TTB_OPTDIR, "BUTTHEIGHT", BUTTHEIGHT); - DBWriteContactSettingByte(0, TTB_OPTDIR, "BUTTWIDTH", BUTTWIDTH); - DBWriteContactSettingByte(0, TTB_OPTDIR, "BUTTGAP", BUTTGAP); - DBWriteContactSettingByte(0, TTB_OPTDIR, "UseFlatButton", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USEFLAT)); + g_ctrl->nButtonHeight = GetDlgItemInt(hwndDlg, IDC_BUTTHEIGHT, NULL, FALSE); + g_ctrl->nButtonWidth = GetDlgItemInt(hwndDlg, IDC_BUTTWIDTH, NULL, FALSE); + g_ctrl->nButtonSpace = GetDlgItemInt(hwndDlg, IDC_BUTTGAP, NULL, FALSE); + db_set_b(0, TTB_OPTDIR, "BUTTHEIGHT", g_ctrl->nButtonHeight); + db_set_b(0, TTB_OPTDIR, "BUTTWIDTH", g_ctrl->nButtonWidth); + db_set_b(0, TTB_OPTDIR, "BUTTGAP", g_ctrl->nButtonSpace); + db_set_b(0, TTB_OPTDIR, "UseFlatButton", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USEFLAT)); SaveTree(hwndDlg); RecreateWindows(); -- cgit v1.2.3