summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/ui.h
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-08 07:42:32 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-08 07:42:32 +0300
commitcaff89011ee731657192dc076b6a1ea54fcee520 (patch)
tree2390a84cb56fbd7a472533efda7b24ea409f389e /plugins/New_GPG/src/ui.h
parentb3d3b95a16be5b1785681f0f6fdc3bcdb967a42e (diff)
new_gpg: a bit of refactoring
- eliminated few confusing globals (including unnecessary mutex) - implemeted proper way to avoid collisions in some places
Diffstat (limited to 'plugins/New_GPG/src/ui.h')
-rwxr-xr-xplugins/New_GPG/src/ui.h120
1 files changed, 120 insertions, 0 deletions
diff --git a/plugins/New_GPG/src/ui.h b/plugins/New_GPG/src/ui.h
index 5c017b7e1f..1825175bd7 100755
--- a/plugins/New_GPG/src/ui.h
+++ b/plugins/New_GPG/src/ui.h
@@ -57,7 +57,127 @@ private:
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 \ No newline at end of file