1 // TortoiseSVN - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2008 - TortoiseSVN
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.
20 #include "StandAloneDlg.h"
22 #include "ProjectProperties.h"
26 * \ingroup TortoiseProc
27 * dialog showing a list of properties of the files/folders specified with SetPathList().
29 class CEditPropertiesDlg
: public CResizableStandAloneDialog
31 DECLARE_DYNAMIC(CEditPropertiesDlg
)
34 CEditPropertiesDlg(CWnd
* pParent
= NULL
); // standard constructor
35 virtual ~CEditPropertiesDlg();
37 void SetPathList(const CTSVNPathList
& pathlist
) {m_pathlist
= pathlist
;}
38 void SetRevision(const SVNRev
& rev
) {m_revision
= rev
;}
40 bool HasChanged() {return m_bChanged
;}
42 void SetProjectProperties(ProjectProperties
* pProps
) {m_pProjectProperties
= pProps
;}
43 void SetUUID(const CString
& sUUID
) {m_sUUID
= sUUID
;}
44 void RevProps(bool bRevProps
= false) {m_bRevProps
= bRevProps
;}
47 enum { IDD
= IDD_EDITPROPERTIES
};
50 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
51 virtual BOOL
OnInitDialog();
53 virtual void OnCancel();
54 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);
55 afx_msg
void OnBnClickedHelp();
56 afx_msg
void OnNMCustomdrawEditproplist(NMHDR
*pNMHDR
, LRESULT
*pResult
);
57 afx_msg
void OnBnClickedRemoveProps();
58 afx_msg
void OnBnClickedEditprops();
59 afx_msg
void OnLvnItemchangedEditproplist(NMHDR
*pNMHDR
, LRESULT
*pResult
);
60 afx_msg
void OnNMDblclkEditproplist(NMHDR
*pNMHDR
, LRESULT
*pResult
);
61 afx_msg
void OnBnClickedSaveprop();
62 afx_msg
void OnBnClickedAddprops();
63 afx_msg
void OnBnClickedExport();
64 afx_msg
void OnBnClickedImport();
68 static UINT
PropsThreadEntry(LPVOID pVoid
);
70 void EditProps(bool bAdd
= false);
76 PropValue(void) : count(0), allthesamevalue(true), isbinary(false) {};
79 stdstring value_without_newlines
;
84 CTSVNPathList m_pathlist
;
89 volatile LONG m_bThreadRunning
;
90 std::map
<stdstring
, PropValue
> m_properties
;
95 ProjectProperties
* m_pProjectProperties
;