3 /// The configuration dialog used to configure Evolution sources
7 Copyright (C) 2011-2013, Net Direct Inc. (http://www.netdirect.ca/)
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU General Public License in the COPYING file at the
19 root directory of this project for more details.
22 #ifndef __BARRYDESKTOP_EVOCFGDLG_H__
23 #define __BARRYDESKTOP_EVOCFGDLG_H__
26 #include "EvoSources.h"
29 // forward declarations
36 class EvoCfgDlg
: public wxDialog
38 // configuration settings
39 std::string m_address_path
;
40 std::string m_calendar_path
;
41 std::string m_tasks_path
;
42 std::string m_memos_path
;
43 bool m_empty_config
; // true if all paths are empty, and
44 // therefore the first time this
45 // is running, and defaults my be
49 const EvoSources
&m_sources
;
53 wxComboBox
*m_address_combo
;
54 wxComboBox
*m_calendar_combo
;
55 wxComboBox
*m_tasks_combo
;
56 wxComboBox
*m_memos_combo
;
60 void AddCombo(wxComboBox
**combo
, int id
,
61 const std::string
¤t_path
,
62 const EvoSources::List
&list
);
63 wxString
CheckPath(const wxString
&name
, const std::string
&path
) const;
64 /// returns error message string on error, otherwise empty string
65 wxString
ValidatePaths() const;
68 EvoCfgDlg(wxWindow
*parent
, const OpenSync::Config::Evolution
&ec
,
69 const EvoSources
&es
);
72 void SetPaths(OpenSync::Config::Evolution
&ec
) const;
77 virtual bool TransferDataFromWindow();