1 // TortoiseSVN - a Windows shell extension for easy version control
\r
3 // Copyright (C) 2003-2008 - TortoiseSVN
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
20 #include "StandAloneDlg.h"
\r
22 #include "ProjectProperties.h"
\r
23 #include "Tooltip.h"
\r
26 * \ingroup TortoiseProc
\r
27 * dialog showing a list of properties of the files/folders specified with SetPathList().
\r
29 class CEditPropertiesDlg : public CResizableStandAloneDialog
\r
31 DECLARE_DYNAMIC(CEditPropertiesDlg)
\r
34 CEditPropertiesDlg(CWnd* pParent = NULL); // standard constructor
\r
35 virtual ~CEditPropertiesDlg();
\r
37 void SetPathList(const CTSVNPathList& pathlist) {m_pathlist = pathlist;}
\r
38 void SetRevision(const SVNRev& rev) {m_revision = rev;}
\r
40 bool HasChanged() {return m_bChanged;}
\r
42 void SetProjectProperties(ProjectProperties * pProps) {m_pProjectProperties = pProps;}
\r
43 void SetUUID(const CString& sUUID) {m_sUUID = sUUID;}
\r
44 void RevProps(bool bRevProps = false) {m_bRevProps = bRevProps;}
\r
47 enum { IDD = IDD_EDITPROPERTIES };
\r
50 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
\r
51 virtual BOOL OnInitDialog();
\r
52 virtual void OnOK();
\r
53 virtual void OnCancel();
\r
54 virtual BOOL PreTranslateMessage(MSG* pMsg);
\r
55 afx_msg void OnBnClickedHelp();
\r
56 afx_msg void OnNMCustomdrawEditproplist(NMHDR *pNMHDR, LRESULT *pResult);
\r
57 afx_msg void OnBnClickedRemoveProps();
\r
58 afx_msg void OnBnClickedEditprops();
\r
59 afx_msg void OnLvnItemchangedEditproplist(NMHDR *pNMHDR, LRESULT *pResult);
\r
60 afx_msg void OnNMDblclkEditproplist(NMHDR *pNMHDR, LRESULT *pResult);
\r
61 afx_msg void OnBnClickedSaveprop();
\r
62 afx_msg void OnBnClickedAddprops();
\r
63 afx_msg void OnBnClickedExport();
\r
64 afx_msg void OnBnClickedImport();
\r
66 DECLARE_MESSAGE_MAP()
\r
68 static UINT PropsThreadEntry(LPVOID pVoid);
\r
70 void EditProps(bool bAdd = false);
\r
76 PropValue(void) : count(0), allthesamevalue(true), isbinary(false) {};
\r
79 stdstring value_without_newlines;
\r
81 bool allthesamevalue;
\r
84 CTSVNPathList m_pathlist;
\r
85 CListCtrl m_propList;
\r
89 volatile LONG m_bThreadRunning;
\r
90 std::map<stdstring, PropValue> m_properties;
\r
92 CToolTips m_tooltips;
\r
95 ProjectProperties * m_pProjectProperties;
\r