summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-04-21 19:31:50 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-04-21 19:31:50 +0000
commite9a58c60e74de8195312ce6ecb48c170d76276d2 (patch)
tree2f2813846ad370aa431ff0492a12319922c13fa6
parent2617eeedce96b0d31abaf5547810bfd407d9feac (diff)
Dropbox: cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@16739 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Dropbox/src/dropbox_dialogs.cpp16
-rw-r--r--plugins/Dropbox/src/dropbox_dialogs.h24
-rw-r--r--plugins/Dropbox/src/dropbox_options.cpp9
-rw-r--r--plugins/Dropbox/src/dropbox_options.h7
-rw-r--r--plugins/Dropbox/src/stdafx.h1
5 files changed, 10 insertions, 47 deletions
diff --git a/plugins/Dropbox/src/dropbox_dialogs.cpp b/plugins/Dropbox/src/dropbox_dialogs.cpp
deleted file mode 100644
index a83b5e9f4c..0000000000
--- a/plugins/Dropbox/src/dropbox_dialogs.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "stdafx.h"
-
-CDropboxDlgBase::CDropboxDlgBase(CDropbox *instance, int idDialog)
- : CDlgBase(g_hInstance, idDialog), m_instance(instance)
-{
-}
-
-void CDropboxDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE type, DWORD iValue)
-{
- ctrl.CreateDbLink(MODULE, szSetting, type, iValue);
-}
-
-void CDropboxDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, TCHAR *szValue)
-{
- ctrl.CreateDbLink(MODULE, szSetting, szValue);
-} \ No newline at end of file
diff --git a/plugins/Dropbox/src/dropbox_dialogs.h b/plugins/Dropbox/src/dropbox_dialogs.h
deleted file mode 100644
index c39e3e342a..0000000000
--- a/plugins/Dropbox/src/dropbox_dialogs.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _DROPBOX_DIALOGS_H_
-#define _DROPBOX_DIALOGS_H_
-
-class CDropboxDlgBase : public CDlgBase
-{
-protected:
- CDropbox *m_instance;
-
-public:
- CDropboxDlgBase(CDropbox *instance, int idDialog);
-
- void CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE type, DWORD iValue);
- void CreateLink(CCtrlData& ctrl, const char *szSetting, TCHAR *szValue);
-
- template<class T>
- __inline void CreateLink(CCtrlData& ctrl, CMOption<T> &option)
- {
- ctrl.CreateDbLink(new CMOptionLink<T>(option));
- }
-
- __inline CDropbox *GetInstance() { return m_instance; }
-};
-
-#endif //_DROPBOX_DIALOGS_H_ \ No newline at end of file
diff --git a/plugins/Dropbox/src/dropbox_options.cpp b/plugins/Dropbox/src/dropbox_options.cpp
index 32b4daf949..5c091c6d59 100644
--- a/plugins/Dropbox/src/dropbox_options.cpp
+++ b/plugins/Dropbox/src/dropbox_options.cpp
@@ -1,7 +1,8 @@
#include "stdafx.h"
CDropboxOptionsMain::CDropboxOptionsMain(CDropbox *instance)
- : CDropboxDlgBase(instance, IDD_OPTIONS_MAIN),
+ : CPluginDlgBase(g_hInstance, IDD_OPTIONS_MAIN, MODULE),
+ m_instance(instance),
m_auth(this, IDC_GETAUTH, DROPBOX_WWW_URL "/oauth2/authorize?response_type=code&client_id=" DROPBOX_APP_KEY),
m_requestCode(this, IDC_REQUEST_CODE), m_authorize(this, IDC_AUTHORIZE), m_authStatus(this, IDC_AUTH_STATUS),
m_useShortUrl(this, IDC_USE_SHORT_LINKS), m_urlAutoSend(this, IDC_URL_AUTOSEND),
@@ -19,7 +20,7 @@ CDropboxOptionsMain::CDropboxOptionsMain(CDropbox *instance)
void CDropboxOptionsMain::OnInitDialog()
{
- CDropboxDlgBase::OnInitDialog();
+ CDlgBase::OnInitDialog();
LOGFONT lf;
HFONT hFont = (HFONT)m_authStatus.SendMsg(WM_GETFONT, 0, 0);
@@ -52,14 +53,14 @@ void CDropboxOptionsMain::Authorize_OnClick(CCtrlBase*)
/////////////////////////////////////////////////////////////////////////////////
CDropboxOptionsInterception::CDropboxOptionsInterception(CDropbox *instance)
- : CDropboxDlgBase(instance, IDD_OPTIONS_INTERCEPTION),
+ : CPluginDlgBase(g_hInstance, IDD_OPTIONS_INTERCEPTION, MODULE),
m_accounts(this, IDC_ACCOUNTS), isAccountListInit(false)
{
}
void CDropboxOptionsInterception::OnInitDialog()
{
- CDropboxDlgBase::OnInitDialog();
+ CDlgBase::OnInitDialog();
m_accounts.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES | LVS_EX_INFOTIP);
diff --git a/plugins/Dropbox/src/dropbox_options.h b/plugins/Dropbox/src/dropbox_options.h
index 7c68ece9d5..643bcd5c42 100644
--- a/plugins/Dropbox/src/dropbox_options.h
+++ b/plugins/Dropbox/src/dropbox_options.h
@@ -1,9 +1,12 @@
#ifndef _DROPBOX_OPTIONS_H_
#define _DROPBOX_OPTIONS_H_
-class CDropboxOptionsMain : public CDropboxDlgBase
+class CDropboxOptionsMain : public CPluginDlgBase
{
private:
+ CDropbox *m_instance;
+
+
CCtrlHyperlink m_auth;
CCtrlEdit m_requestCode;
CCtrlButton m_authorize;
@@ -27,7 +30,7 @@ public:
static CDlgBase *CreateOptionsPage(void *param) { return new CDropboxOptionsMain((CDropbox*)param); }
};
-class CDropboxOptionsInterception : public CDropboxDlgBase
+class CDropboxOptionsInterception : public CPluginDlgBase
{
private:
bool isAccountListInit;
diff --git a/plugins/Dropbox/src/stdafx.h b/plugins/Dropbox/src/stdafx.h
index 22489fabd8..ca6ad13383 100644
--- a/plugins/Dropbox/src/stdafx.h
+++ b/plugins/Dropbox/src/stdafx.h
@@ -65,7 +65,6 @@ public:
#define MODULE "Dropbox"
-#include "dropbox_dialogs.h"
#include "dropbox_options.h"
#include "http_request.h"
#include "api\account.h"