1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
// Copyright © 2017-18 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef UI_H
#define UI_H
class CDlgEncryptedFileMsgBox : public CDlgBase
{
public:
CDlgEncryptedFileMsgBox();
virtual void OnInitDialog() override;
virtual void OnDestroy() override;
void onClick_IGNORE(CCtrlButton*);
void onClick_DECRYPT(CCtrlButton*);
private:
CCtrlCheck chk_REMEMBER;
CCtrlButton btn_IGNORE, btn_DECRYPT;
};
class CDlgExportKeysMsgBox : public CDlgBase
{
public:
CDlgExportKeysMsgBox();
virtual void OnInitDialog() override;
virtual void OnDestroy() override;
void onClick_OK(CCtrlButton*);
void onClick_CANCEL(CCtrlButton*);
private:
CCtrlButton btn_OK, btn_CANCEL;
CCtrlCheck chk_PUBLIC, chk_PRIVATE, chk_ALL;
};
class CDlgChangePasswdMsgBox : public CDlgBase //always modal
{
public:
CDlgChangePasswdMsgBox();
virtual void OnDestroy() override;
void onClick_OK(CCtrlButton*);
private:
CCtrlButton btn_OK;
CCtrlEdit edit_NEW_PASSWD1, edit_NEW_PASSWD2, edit_OLD_PASSWD;
};
class CDlgFirstRun : public CDlgBase
{
public:
CDlgFirstRun();
virtual void OnInitDialog() override;
void onClick_COPY_PUBKEY(CCtrlButton*);
void onClick_EXPORT_PRIVATE(CCtrlButton*);
void onClick_CHANGE_PASSWD(CCtrlButton*);
void onClick_GENERATE_RANDOM(CCtrlButton*);
void onClick_GENERATE_KEY(CCtrlButton*);
void onClick_OTHER(CCtrlButton*);
void onClick_DELETE_KEY(CCtrlButton*);
void onClick_OK(CCtrlButton*);
void onChange_ACCOUNT(CCtrlCombo*);
void onChange_KEY_LIST(CCtrlListView::TEventInfo *ev);
virtual void OnDestroy() override;
private:
void refresh_key_list();
CCtrlListView list_KEY_LIST;
CCtrlButton btn_COPY_PUBKEY, btn_EXPORT_PRIVATE, btn_CHANGE_PASSWD, btn_GENERATE_RANDOM, btn_GENERATE_KEY, btn_OTHER, btn_DELETE_KEY, btn_OK;
CCtrlEdit edit_KEY_PASSWORD;
CCtrlCombo combo_ACCOUNT;
CCtrlData lbl_KEY_ID, lbl_GENERATING_KEY;
wchar_t fp[16];
};
class CDlgGpgBinOpts : public CDlgBase
{
public:
CDlgGpgBinOpts();
virtual void OnInitDialog() override;
void onClick_SET_BIN_PATH(CCtrlButton*);
void onClick_SET_HOME_DIR(CCtrlButton*);
void onClick_OK(CCtrlButton*);
void onClick_GENERATE_RANDOM(CCtrlButton*);
virtual void OnDestroy() override;
private:
CCtrlButton btn_SET_BIN_PATH, btn_SET_HOME_DIR, btn_OK, btn_GENERATE_RANDOM;
CCtrlEdit edit_BIN_PATH, edit_HOME_DIR;
CCtrlCheck chk_AUTO_EXCHANGE;
};
class CDlgNewKey : public CDlgBase
{
public:
CDlgNewKey(MCONTACT hContact, wstring new_key);
virtual void OnInitDialog() override;
virtual void OnDestroy() override;
void onClick_IMPORT(CCtrlButton*);
void onClick_IMPORT_AND_USE(CCtrlButton*);
void onClick_IGNORE_KEY(CCtrlButton*);
private:
wstring new_key;
MCONTACT hContact;
CCtrlData lbl_KEY_FROM, lbl_MESSAGE;
CCtrlButton btn_IMPORT, btn_IMPORT_AND_USE, btn_IGNORE_KEY;
};
class CDlgKeyGen : public CDlgBase //TODO: in modal mode window destroying on any button press even without direct "Close" call
{
public:
CDlgKeyGen();
virtual void OnInitDialog() override;
void onClick_OK(CCtrlButton*);
void onClick_CANCEL(CCtrlButton*);
virtual void OnDestroy() override;
private:
CCtrlCombo combo_KEY_TYPE;
CCtrlEdit edit_KEY_LENGTH, edit_KEY_PASSWD, edit_KEY_REAL_NAME, edit_KEY_EMAIL, edit_KEY_COMMENT, edit_KEY_EXPIRE_DATE;
CCtrlData lbl_GENERATING_TEXT;
CCtrlButton btn_OK, btn_CANCEL;
};
class CDlgLoadExistingKey : public CDlgBase
{
public:
CDlgLoadExistingKey();
virtual void OnInitDialog() override;
virtual void OnDestroy() override;
void onClick_OK(CCtrlButton*);
void onClick_CANCEL(CCtrlButton*);
void onChange_EXISTING_KEY_LIST(CCtrlListView::TEventInfo * /*ev*/);
private:
wchar_t id[16];
CCtrlButton btn_OK, btn_CANCEL;
CCtrlListView list_EXISTING_KEY_LIST;
};
class CDlgImportKey : public CDlgBase
{
public:
CDlgImportKey(MCONTACT hContact);
virtual void OnInitDialog() override;
virtual void OnDestroy() override;
void onClick_IMPORT(CCtrlButton*);
private:
MCONTACT hContact;
CCtrlCombo combo_KEYSERVER;
CCtrlButton btn_IMPORT;
};
class CDlgKeyPasswordMsgBox : public CDlgBase //always modal
{
public:
CDlgKeyPasswordMsgBox(MCONTACT _hContact);
virtual void OnInitDialog() override;
virtual void OnDestroy() override;
void onClick_OK(CCtrlButton*);
void onClick_CANCEL(CCtrlButton*);
private:
char *inkeyid = nullptr;
MCONTACT hContact;
CCtrlData lbl_KEYID;
CCtrlEdit edit_KEY_PASSWORD;
CCtrlCheck chk_DEFAULT_PASSWORD, chk_SAVE_PASSWORD;
CCtrlButton btn_OK, btn_CANCEL;
};
#endif // UI_H
|