1
// TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2020 - TortoiseGit
4 // Copyright (C) 2003-2006 - Stefan Kueng
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include "TortoiseProc.h"
22 #include "PromptDlg.h"
25 IMPLEMENT_DYNAMIC(CPromptDlg
, CStandAloneDialog
)
26 CPromptDlg::CPromptDlg(CWnd
* pParent
/*=nullptr*/)
27 : CStandAloneDialog(CPromptDlg::IDD
, pParent
)
30 , m_hParentWnd(nullptr)
34 CPromptDlg::~CPromptDlg()
38 void CPromptDlg::DoDataExchange(CDataExchange
* pDX
)
40 CStandAloneDialog::DoDataExchange(pDX
);
41 DDX_Text(pDX
, IDC_INFOTEXT
, m_info
);
42 DDX_Text(pDX
, IDC_PASSEDIT
, m_sPass
);
43 DDX_Control(pDX
, IDC_PASSEDIT
, m_pass
);
44 DDX_Check(pDX
, IDC_SAVECHECK
, m_saveCheck
);
47 void CPromptDlg::SetHide(BOOL hide
)
52 BEGIN_MESSAGE_MAP(CPromptDlg
, CStandAloneDialog
)
56 BOOL
CPromptDlg::OnInitDialog()
58 CStandAloneDialog::OnInitDialog();
62 m_pass
.SetPasswordChar('*');
63 GetDlgItem(IDC_SAVECHECK
)->ShowWindow(SW_SHOW
);
67 m_pass
.SetPasswordChar('\0');
68 GetDlgItem(IDC_SAVECHECK
)->ShowWindow(SW_HIDE
);
69 DialogEnableWindow(IDC_SAVECHECK
, FALSE
);
73 if (!m_hParentWnd
&& hWndExplorer
)
74 CenterWindow(CWnd::FromHandle(m_hParentWnd
));