summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/utilities.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-02 07:33:38 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-02 07:33:38 +0300
commit2d1690dabbd3a11d41374a5a3450a316a08c3f10 (patch)
tree92a5acf5cc3cd85932f9900c513fd8768bac1d40 /plugins/New_GPG/src/utilities.cpp
parentac4d58da972257390b99e5f1293278d2ea2ed750 (diff)
new_gpg: porting ui to new api
Diffstat (limited to 'plugins/New_GPG/src/utilities.cpp')
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp30
1 files changed, 7 insertions, 23 deletions
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 291ba4ec3c..3dd0fca129 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -1810,10 +1810,6 @@ public:
{
file_msg_state = -1;
}
- virtual void OnClose() override
- {
- DestroyWindow(m_hwnd);
- }
virtual void OnDestroy() override
{
delete this;
@@ -1825,7 +1821,7 @@ public:
db_set_b(NULL, szGPGModuleName, "bSameAction", 1);
bSameAction = true;
}
- DestroyWindow(m_hwnd);
+ this->Close();
}
void onClick_DECRYPT(CCtrlButton*)
{
@@ -1837,7 +1833,7 @@ public:
db_set_b(NULL, szGPGModuleName, "bSameAction", 0);
bSameAction = false;
}
- DestroyWindow(m_hwnd);
+ this->Close();
}
private:
CCtrlCheck chk_REMEMBER;
@@ -1848,9 +1844,7 @@ private:
void ShowEncryptedFileMsgBox()
{
CDlgEncryptedFileMsgBox *d = new CDlgEncryptedFileMsgBox;
- d->DoModal(); //TODO: check this
- d->Show();
-
+ d->DoModal();
}
class CDlgExportKeysMsgBox : public CDlgBase
@@ -1867,10 +1861,6 @@ public:
{
chk_PUBLIC.SetState(1);
}
- virtual void OnClose() override
- {
- DestroyWindow(m_hwnd);
- }
virtual void OnDestroy() override
{
delete this;
@@ -1883,11 +1873,11 @@ public:
ExportGpGKeysFunc(1);
else if (chk_ALL.GetState())
ExportGpGKeysFunc(2);
- DestroyWindow(m_hwnd);
+ this->Close();
}
void onClick_CANCEL(CCtrlButton*)
{
- DestroyWindow(m_hwnd);
+ this->Close();
}
private:
@@ -1911,10 +1901,6 @@ public:
{
btn_OK.OnClick = Callback(this, &CDlgChangePasswdMsgBox::onClick_OK);
}
- virtual void OnClose() override
- {
- DestroyWindow(m_hwnd);
- }
virtual void OnDestroy() override
{
delete this;
@@ -1973,13 +1959,13 @@ public:
boost::process::terminate(*(params.child));
if (bDebugLog)
debuglog << std::string(time_str() + ": GPG execution timed out, aborted");
- DestroyWindow(m_hwnd);
+ this->Close();
return;
}
if (result == pxNotFound)
return;
}
- DestroyWindow(m_hwnd);
+ this->Close();
}
private:
CCtrlButton btn_OK;
@@ -1992,8 +1978,6 @@ void ShowChangePasswdDlg()
{
CDlgChangePasswdMsgBox *d = new CDlgChangePasswdMsgBox;
d->DoModal();
- d->Show();
- SetForegroundWindow(d->GetHwnd()); //?
}
void clean_temp_dir()