Includes cleanup
[TortoiseGit.git] / src / TortoiseProc / Settings / SettingGitCredential.h
blob0e453781d46409db9962efba6d56dd227470a5f8
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2013-2015 - TortoiseGit
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #pragma once
20 #include "SettingsPropPage.h"
21 #include "Tooltip.h"
22 #include "registry.h"
24 // CSettingGitCredential dialog
25 class CSettingGitCredential : public ISettingsPropPage
27 DECLARE_DYNAMIC(CSettingGitCredential)
29 public:
30 enum
32 CREDENTIAL_URL = 0x1,
33 CREDENTIAL_HELPER = 0x2,
34 CREDENTIAL_USERNAME = 0x4,
35 CREDENTIAL_USEHTTPPATH = 0x8,
37 CSettingGitCredential();
38 virtual ~CSettingGitCredential();
39 UINT GetIconID() { return IDI_GITCREDENTIAL; }
40 // Dialog Data
41 enum { IDD = IDD_SETTINGSCREDENTIAL };
43 protected:
44 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
46 DECLARE_MESSAGE_MAP()
48 afx_msg void OnCbnSelchangeComboSimplecredential();
49 afx_msg void OnBnClickedButtonAdd();
50 afx_msg void OnLbnSelchangeListUrl();
51 afx_msg void OnCbnSelchangeComboConfigType();
52 afx_msg void OnEnChangeEditUrl();
53 afx_msg void OnEnChangeEditHelper();
54 afx_msg void OnEnChangeEditUsername();
55 afx_msg void OnBnClickedCheckUsehttppath();
56 afx_msg void OnBnClickedButtonRemove();
58 BOOL OnInitDialog();
59 BOOL OnApply();
61 void EnableAdvancedOptions();
62 BOOL IsUrlExist(CString &text);
64 void AddConfigType(int &index, CString text, bool add = true);
65 void AddSimpleCredential(int &index, CString text, bool add = true);
66 void LoadList();
67 CString Load(CString key);
68 void Save(CString key, CString value);
70 int m_ChangedMask;
72 CComboBox m_ctrlSimpleCredential;
73 CListBox m_ctrlUrlList;
74 CComboBox m_ctrlConfigType;
75 CString m_strUrl;
76 CString m_strHelper;
77 CString m_strUsername;
78 BOOL m_bUseHttpPath;