From 159f7b45c0b0aee7124ab59995da2bc26aa23277 Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Thu, 22 Aug 2013 22:22:18 +0800 Subject: [PATCH] Fixed issue #1790: "Clean up" window position is not preserved on multi-monitor setup Signed-off-by: Sup Yut Sum --- src/Changelog.txt | 1 + src/TortoiseProc/CleanTypeDlg.cpp | 12 +++++++----- src/TortoiseProc/CleanTypeDlg.h | 6 +++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index ce523f41b..146b488e1 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -8,6 +8,7 @@ Released: Unreleased * Fixed issue #1859: Log too long when using Switch to New Branch option in Create Branch dialog * Fixed issue #1864: Commit button did not work after revert * Fixed issue #1862: Some labels not wide enough for translations to fit in + * Fixed issue #1790: "Clean up" window position is not preserved on multi-monitor setup = Release 1.8.5.0 = Released: 2013-08-18 diff --git a/src/TortoiseProc/CleanTypeDlg.cpp b/src/TortoiseProc/CleanTypeDlg.cpp index 8d596be6c..44b65a1a0 100644 --- a/src/TortoiseProc/CleanTypeDlg.cpp +++ b/src/TortoiseProc/CleanTypeDlg.cpp @@ -27,10 +27,10 @@ // CCleanTypeDlg dialog -IMPLEMENT_DYNAMIC(CCleanTypeDlg, CStandAloneDialog) +IMPLEMENT_DYNAMIC(CCleanTypeDlg, CHorizontalResizableStandAloneDialog) CCleanTypeDlg::CCleanTypeDlg(CWnd* pParent /*=NULL*/) - : CStandAloneDialog(CCleanTypeDlg::IDD, pParent) + : CHorizontalResizableStandAloneDialog(CCleanTypeDlg::IDD, pParent) { CString WorkingDir=g_Git.m_CurrentDir; @@ -58,7 +58,7 @@ void CCleanTypeDlg::DoDataExchange(CDataExchange* pDX) } -BEGIN_MESSAGE_MAP(CCleanTypeDlg, CStandAloneDialog) +BEGIN_MESSAGE_MAP(CCleanTypeDlg, CHorizontalResizableStandAloneDialog) ON_BN_CLICKED(IDHELP, &CCleanTypeDlg::OnBnClickedHelp) END_MESSAGE_MAP() @@ -67,7 +67,7 @@ END_MESSAGE_MAP() BOOL CCleanTypeDlg::OnInitDialog() { - CStandAloneDialog::OnInitDialog(); + CHorizontalResizableStandAloneDialog::OnInitDialog(); CAppUtils::MarkWindowAsUnpinnable(m_hWnd); AdjustControlSize(IDC_RADIO_CLEAN_ALL); @@ -77,6 +77,8 @@ BOOL CCleanTypeDlg::OnInitDialog() AdjustControlSize(IDC_CHECK_NORECYCLEBIN); AdjustControlSize(IDC_CHECK_DRYRUN); + EnableSaveRestore(_T("CleanTypeDlg")); + CString sWindowTitle; GetWindowText(sWindowTitle); CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle); @@ -92,7 +94,7 @@ void CCleanTypeDlg::OnOK() this->m_regDir = this->m_bDir; this->m_regType = this->m_CleanType ; - CStandAloneDialog::OnOK(); + CHorizontalResizableStandAloneDialog::OnOK(); } void CCleanTypeDlg::OnBnClickedHelp() diff --git a/src/TortoiseProc/CleanTypeDlg.h b/src/TortoiseProc/CleanTypeDlg.h index f5bd1179a..bbb8c5fd6 100644 --- a/src/TortoiseProc/CleanTypeDlg.h +++ b/src/TortoiseProc/CleanTypeDlg.h @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2008-2011 - TortoiseGit +// Copyright (C) 2008-2013 - TortoiseGit // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -19,12 +19,12 @@ #pragma once -#include "StandAloneDlg.h" +#include "HorizontalResizableStandAloneDialog.h" #include "registry.h" // CCleanTypeDlg dialog -class CCleanTypeDlg : public CStandAloneDialog +class CCleanTypeDlg : public CHorizontalResizableStandAloneDialog { DECLARE_DYNAMIC(CCleanTypeDlg) -- 2.11.4.GIT