diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-18 14:17:28 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-18 14:17:28 +0300 |
commit | 81c8606dd9aa39067353354aa4523be84ef51fd1 (patch) | |
tree | 3f157c302093074552d0f792c481c741277cd531 | |
parent | 73d12d0f6eb5c673a951eec94ddf5cdeeacde369 (diff) |
CDlgBase::CDlgBase now receives a reference to CMPlugin instead of HINSTANCE
38 files changed, 97 insertions, 98 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index af4f137e07..5369ceebfd 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -403,7 +403,7 @@ class MIR_APP_EXPORT CSrmmBaseDialog : public CDlgBase CSrmmBaseDialog& operator=(const CSrmmBaseDialog&) = delete;
protected:
- CSrmmBaseDialog(HINSTANCE hInst, int idDialog, SESSION_INFO *si = nullptr);
+ CSrmmBaseDialog(CMPluginBase&, int idDialog, SESSION_INFO *si = nullptr);
virtual void OnInitDialog() override;
virtual void OnDestroy() override;
diff --git a/include/m_gui.h b/include/m_gui.h index e7679a56b3..e29ffe7b63 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -395,7 +395,7 @@ class MIR_CORE_EXPORT CDlgBase friend class CCtrlData;
public:
- CDlgBase(HINSTANCE hInst, int idDialog);
+ CDlgBase(class CMPluginBase &pPlug, int idDialog);
virtual ~CDlgBase();
// general utilities
@@ -413,7 +413,7 @@ public: void NotifyChange(void); // sends a notification to a parent window
__forceinline void Fail() { m_lresult = false; }
- __forceinline HINSTANCE GetInst() const { return m_hInst; }
+ __forceinline HINSTANCE GetInst() const { return m_pPlugin.getInst(); }
__forceinline HWND GetHwnd() const { return m_hwnd; }
__forceinline void Hide() { Show(SW_HIDE); }
__forceinline bool IsInitialized() const { return m_initialized; }
@@ -424,15 +424,16 @@ public: static CDlgBase* Find(HWND hwnd);
protected:
- HWND m_hwnd; // must be the first data item
- HINSTANCE m_hInst;
- HWND m_hwndParent;
- int m_idDialog;
- bool m_isModal;
- bool m_initialized;
- bool m_forceResizable;
- bool m_bExiting; // window received WM_CLOSE and gonna die soon
- LRESULT m_lresult;
+ HWND m_hwnd; // must be the first data item
+ HWND m_hwndParent;
+ int m_idDialog;
+ bool m_isModal;
+ bool m_initialized;
+ bool m_forceResizable;
+ bool m_bExiting; // window received WM_CLOSE and gonna die soon
+ LRESULT m_lresult;
+
+ CMPluginBase &m_pPlugin;
enum { CLOSE_ON_OK = 0x1, CLOSE_ON_CANCEL = 0x2 };
BYTE m_autoClose; // automatically close dialog on IDOK/CANCEL commands. default: CLOSE_ON_OK|CLOSE_ON_CANCEL
@@ -1494,7 +1495,9 @@ class CPluginDlgBase : public CDlgBase {
const char *m_szModule;
public:
- CPluginDlgBase(HINSTANCE hInst, int idDialog, const char *module) : CDlgBase(hInst, idDialog), m_szModule(module) {};
+ CPluginDlgBase(CMPluginBase &pPlug, int idDialog, const char *module) :
+ CDlgBase(pPlug, idDialog), m_szModule(module)
+ {};
void CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE type, DWORD iValue)
{
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex 9c120b48eb..68d9595d63 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex 896c9f7235..8399490398 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/plugins/AuthState/src/options.h b/plugins/AuthState/src/options.h index 707eb7b2b5..dafebd8f17 100644 --- a/plugins/AuthState/src/options.h +++ b/plugins/AuthState/src/options.h @@ -26,7 +26,7 @@ class COptionsDialog : public CPluginDlgBase CCtrlCheck m_chkOnlyForRecent;
public:
COptionsDialog() :
- CPluginDlgBase(g_plugin.getInst(), IDD_AUTHSTATE_OPT, MODULENAME),
+ CPluginDlgBase(g_plugin, IDD_AUTHSTATE_OPT, MODULENAME),
m_chkAuthIcon(this, IDC_AUTHICON),
m_chkGrantIcon(this, IDC_GRANTICON),
m_chkMenuItem(this, IDC_ENABLEMENUITEM),
diff --git a/plugins/CloudFile/src/oauth.cpp b/plugins/CloudFile/src/oauth.cpp index 9516ef4139..abda807772 100644 --- a/plugins/CloudFile/src/oauth.cpp +++ b/plugins/CloudFile/src/oauth.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" COAuthDlg::COAuthDlg(CCloudService *service, const char *authUrl, CCloudService::MyThreadFunc requestAccessTokenThread) - : CDlgBase(g_plugin.getInst(), IDD_OAUTH), m_service(service), + : CDlgBase(g_plugin, IDD_OAUTH), m_service(service), m_requestAccessTokenThread(requestAccessTokenThread), m_authorize(this, IDC_OAUTH_AUTHORIZE, authUrl), m_code(this, IDC_OAUTH_CODE), m_ok(this, IDOK) diff --git a/plugins/CloudFile/src/options.cpp b/plugins/CloudFile/src/options.cpp index 88f411646a..ef643b0e50 100644 --- a/plugins/CloudFile/src/options.cpp +++ b/plugins/CloudFile/src/options.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" COptionsMainDlg::COptionsMainDlg() - : CPluginDlgBase(g_plugin.getInst(), IDD_OPTIONS_MAIN, MODULE), + : CPluginDlgBase(g_plugin, IDD_OPTIONS_MAIN, MODULE), m_defaultService(this, IDC_DEFAULTSERVICE), m_doNothingOnConflict(this, IDC_DONOTHINGONCONFLICT), m_renameOnConflict(this, IDC_RENAMEONCONFLICT), diff --git a/plugins/Db3x_mmap/src/ui.h b/plugins/Db3x_mmap/src/ui.h index ae438fcab7..36bec825e9 100644 --- a/plugins/Db3x_mmap/src/ui.h +++ b/plugins/Db3x_mmap/src/ui.h @@ -9,7 +9,7 @@ class CSelectCryptoDialog : public CDlgBase CRYPTO_PROVIDER *m_selected;
public:
CSelectCryptoDialog(CRYPTO_PROVIDER **provs, size_t count) :
- CDlgBase(g_plugin.getInst(), IDD_SELECT_CRYPTOPROVIDER),
+ CDlgBase(g_plugin, IDD_SELECT_CRYPTOPROVIDER),
m_combo(this, IDC_SELECTCRYPT_COMBO),
m_descr(this, IDC_CRYPTOPROVIDER_DESCR),
m_provs(provs),
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp index 1ef4066053..23974a9d85 100644 --- a/plugins/Db_autobackups/src/options.cpp +++ b/plugins/Db_autobackups/src/options.cpp @@ -17,7 +17,7 @@ Options::Options() : Options options;
COptionsDlg::COptionsDlg()
- : CPluginDlgBase(g_plugin.getInst(), IDD_OPTIONS, MODULE),
+ : CPluginDlgBase(g_plugin, IDD_OPTIONS, MODULE),
m_disable(this, IDC_RAD_DISABLED), m_backupOnStart(this, IDC_RAD_START),
m_backupOnExit(this, IDC_RAD_EXIT), m_backupPeriodic(this, IDC_RAD_PERIODIC),
m_backup(this, IDC_BUT_NOW), m_backupProfile(this, IDC_BACKUPPROFILE),
diff --git a/plugins/Dbx_mdbx/src/ui.h b/plugins/Dbx_mdbx/src/ui.h index a76cedf625..c510cc89da 100644 --- a/plugins/Dbx_mdbx/src/ui.h +++ b/plugins/Dbx_mdbx/src/ui.h @@ -40,7 +40,7 @@ class COptionsDialog : public CDlgBase public:
COptionsDialog(CDbxMDBX *db) :
- CDlgBase(g_plugin.getInst(), IDD_OPTIONS),
+ CDlgBase(g_plugin, IDD_OPTIONS),
m_chkStandart(this, IDC_STANDARD),
m_chkTotal(this, IDC_TOTAL),
m_btnChangePass(this, IDC_USERPASS),
@@ -84,7 +84,7 @@ class CSelectCryptoDialog : public CDlgBase public:
CSelectCryptoDialog(CRYPTO_PROVIDER **provs, size_t count) :
- CDlgBase(g_plugin.getInst(), IDD_SELECT_CRYPTOPROVIDER),
+ CDlgBase(g_plugin, IDD_SELECT_CRYPTOPROVIDER),
m_combo(this, IDC_SELECTCRYPT_COMBO),
m_descr(this, IDC_CRYPTOPROVIDER_DESCR),
m_chkTotalCrypt(this, IDC_CHECK_TOTALCRYPT),
@@ -180,7 +180,7 @@ class CEnterPasswordDialog : public CDlgBase public:
CEnterPasswordDialog(DlgChangePassParam *param) :
- CDlgBase(g_plugin.getInst(), IDD_LOGIN),
+ CDlgBase(g_plugin, IDD_LOGIN),
m_header(this, IDC_HEADERBAR),
m_language(this, IDC_LANG),
m_passwordEdit(this, IDC_USERPASS),
diff --git a/plugins/MirLua/src/m_options.cpp b/plugins/MirLua/src/m_options.cpp index 56a41f4f98..593348cb4d 100644 --- a/plugins/MirLua/src/m_options.cpp +++ b/plugins/MirLua/src/m_options.cpp @@ -9,7 +9,7 @@ private: public:
CMLuaScriptOptionPage(lua_State *_L, int onInitDialogRef, int onApplyRef)
- : CDlgBase(g_plugin.getInst(), IDD_SCRIPTOPTIONSPAGE), L(_L),
+ : CDlgBase(g_plugin, IDD_SCRIPTOPTIONSPAGE), L(_L),
m_onInitDialogRef(onInitDialogRef), m_onApplyRef(onApplyRef)
{
}
diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp index 43451746d4..d518cae533 100644 --- a/plugins/MirLua/src/mlua_options.cpp +++ b/plugins/MirLua/src/mlua_options.cpp @@ -1,7 +1,7 @@ #include "stdafx.h"
CMLuaOptions::CMLuaOptions(CMLua *mLua)
- : CPluginDlgBase(g_plugin.getInst(), IDD_OPTIONS, MODULE),
+ : CPluginDlgBase(g_plugin, IDD_OPTIONS, MODULE),
m_mLua(mLua), isScriptListInit(false),
m_popupOnError(this, IDC_POPUPONERROR),
m_popupOnObsolete(this, IDC_POPUPONOBSOLETE),
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp index 2875bf795d..798b3a660c 100755 --- a/plugins/New_GPG/src/options.cpp +++ b/plugins/New_GPG/src/options.cpp @@ -36,7 +36,7 @@ class COptGpgMainDlg : public CDlgBase CCtrlButton btn_DELETE_KEY_BUTTON, btn_SELECT_KEY, btn_SAVE_KEY_BUTTON, btn_COPY_KEY, btn_LOG_FILE_SET; public: - COptGpgMainDlg() : CDlgBase(g_plugin.getInst(), IDD_OPT_GPG), + COptGpgMainDlg() : CDlgBase(g_plugin, IDD_OPT_GPG), list_USERLIST(this, IDC_USERLIST), lbl_CURRENT_KEY(this, IDC_CURRENT_KEY), edit_LOG_FILE_EDIT(this, IDC_LOG_FILE_EDIT), check_DEBUG_LOG(this, IDC_DEBUG_LOG), check_JABBER_API(this, IDC_JABBER_API), check_AUTO_EXCHANGE(this, IDC_AUTO_EXCHANGE), check_FILE_TRANSFERS(this, IDC_FILE_TRANSFERS), btn_DELETE_KEY_BUTTON(this, IDC_DELETE_KEY_BUTTON), btn_SELECT_KEY(this, IDC_SELECT_KEY), btn_SAVE_KEY_BUTTON(this, IDC_SAVE_KEY_BUTTON), btn_COPY_KEY(this, IDC_COPY_KEY), btn_LOG_FILE_SET(this, IDC_LOG_FILE_SET) @@ -373,7 +373,7 @@ class COptGpgBinDlg : public CDlgBase CCtrlButton btn_SET_BIN_PATH, btn_SET_HOME_DIR; public: - COptGpgBinDlg() : CDlgBase(g_plugin.getInst(), IDD_OPT_GPG_BIN), + COptGpgBinDlg() : CDlgBase(g_plugin, IDD_OPT_GPG_BIN), edit_BIN_PATH(this, IDC_BIN_PATH), edit_HOME_DIR(this, IDC_HOME_DIR), btn_SET_BIN_PATH(this, IDC_SET_BIN_PATH), btn_SET_HOME_DIR(this, IDC_SET_HOME_DIR) { @@ -468,7 +468,7 @@ class COptGpgMsgDlg : public CDlgBase CCtrlEdit edit_IN_OPEN_TAG, edit_IN_CLOSE_TAG, edit_OUT_OPEN_TAG, edit_OUT_CLOSE_TAG; public: - COptGpgMsgDlg() : CDlgBase(g_plugin.getInst(), IDD_OPT_GPG_MESSAGES), + COptGpgMsgDlg() : CDlgBase(g_plugin, IDD_OPT_GPG_MESSAGES), check_APPEND_TAGS(this, IDC_APPEND_TAGS), check_STRIP_TAGS(this, IDC_STRIP_TAGS), edit_IN_OPEN_TAG(this, IDC_IN_OPEN_TAG), edit_IN_CLOSE_TAG(this, IDC_IN_CLOSE_TAG), edit_OUT_OPEN_TAG(this, IDC_OUT_OPEN_TAG), edit_OUT_CLOSE_TAG(this, IDC_OUT_CLOSE_TAG) {} @@ -514,7 +514,7 @@ class COptGpgAdvDlg : public CDlgBase CCtrlCheck check_PRESCENSE_SUBSCRIPTION; public: - COptGpgAdvDlg() : CDlgBase(g_plugin.getInst(), IDD_OPT_GPG_ADVANCED), + COptGpgAdvDlg() : CDlgBase(g_plugin, IDD_OPT_GPG_ADVANCED), btn_EXPORT(this, IDC_EXPORT), btn_IMPORT(this, IDC_IMPORT), check_PRESCENSE_SUBSCRIPTION(this, IDC_PRESCENSE_SUBSCRIPTION) { @@ -570,7 +570,7 @@ class CDlgLoadPubKeyDlg : public CDlgBase CCtrlEdit edit_PUBLIC_KEY_EDIT; public: - CDlgLoadPubKeyDlg() : CDlgBase(g_plugin.getInst(), IDD_LOAD_PUBLIC_KEY), + CDlgLoadPubKeyDlg() : CDlgBase(g_plugin, IDD_LOAD_PUBLIC_KEY), chk_ENABLE_ENCRYPTION(this, IDC_ENABLE_ENCRYPTION), btn_SELECT_EXISTING(this, IDC_SELECT_EXISTING), btn_OK(this, ID_OK), btn_LOAD_FROM_FILE(this, ID_LOAD_FROM_FILE), btn_IMPORT(this, IDC_IMPORT), edit_PUBLIC_KEY_EDIT(this, IDC_PUBLIC_KEY_EDIT) diff --git a/plugins/New_GPG/src/ui.cpp b/plugins/New_GPG/src/ui.cpp index 29526406e8..17699e40e6 100755 --- a/plugins/New_GPG/src/ui.cpp +++ b/plugins/New_GPG/src/ui.cpp @@ -27,7 +27,7 @@ void CDlgEncryptedFileMsgBox::OnInitDialog() globals.bDecryptFiles = false; } -CDlgEncryptedFileMsgBox::CDlgEncryptedFileMsgBox() : CDlgBase(g_plugin.getInst(), IDD_ENCRYPTED_FILE_MSG_BOX), +CDlgEncryptedFileMsgBox::CDlgEncryptedFileMsgBox() : CDlgBase(g_plugin, IDD_ENCRYPTED_FILE_MSG_BOX), chk_REMEMBER(this, IDC_REMEMBER), btn_IGNORE(this, IDC_IGNORE), btn_DECRYPT(this, IDC_DECRYPT) { @@ -61,7 +61,7 @@ void CDlgEncryptedFileMsgBox::onClick_DECRYPT(CCtrlButton*) -CDlgExportKeysMsgBox::CDlgExportKeysMsgBox() : CDlgBase(g_plugin.getInst(), IDD_EXPORT_TYPE), +CDlgExportKeysMsgBox::CDlgExportKeysMsgBox() : CDlgBase(g_plugin, IDD_EXPORT_TYPE), btn_OK(this, IDC_OK), btn_CANCEL(this, IDC_CANCEL), chk_PUBLIC(this, IDC_PUBLIC), chk_PRIVATE(this, IDC_PRIVATE), chk_ALL(this, IDC_ALL) { @@ -89,7 +89,7 @@ void CDlgExportKeysMsgBox::onClick_CANCEL(CCtrlButton*) -CDlgChangePasswdMsgBox::CDlgChangePasswdMsgBox() : CDlgBase(g_plugin.getInst(), IDD_CHANGE_PASSWD), +CDlgChangePasswdMsgBox::CDlgChangePasswdMsgBox() : CDlgBase(g_plugin, IDD_CHANGE_PASSWD), btn_OK(this, ID_OK), edit_NEW_PASSWD1(this, IDC_NEW_PASSWD1), edit_NEW_PASSWD2(this, IDC_NEW_PASSWD2), edit_OLD_PASSWD(this, IDC_OLD_PASSWD) { @@ -160,7 +160,7 @@ void CDlgChangePasswdMsgBox::onClick_OK(CCtrlButton*) -CDlgFirstRun::CDlgFirstRun() : CDlgBase(g_plugin.getInst(), IDD_FIRST_RUN), +CDlgFirstRun::CDlgFirstRun() : CDlgBase(g_plugin, IDD_FIRST_RUN), list_KEY_LIST(this, IDC_KEY_LIST), btn_COPY_PUBKEY(this, IDC_COPY_PUBKEY), btn_EXPORT_PRIVATE(this, IDC_EXPORT_PRIVATE), btn_CHANGE_PASSWD(this, IDC_CHANGE_PASSWD), btn_GENERATE_RANDOM(this, IDC_GENERATE_RANDOM), btn_GENERATE_KEY(this, IDC_GENERATE_KEY), btn_OTHER(this, IDC_OTHER), btn_DELETE_KEY(this, IDC_DELETE_KEY), btn_OK(this, ID_OK), @@ -734,7 +734,7 @@ void CDlgFirstRun::refresh_key_list() -CDlgGpgBinOpts::CDlgGpgBinOpts() : CDlgBase(g_plugin.getInst(), IDD_BIN_PATH), +CDlgGpgBinOpts::CDlgGpgBinOpts() : CDlgBase(g_plugin, IDD_BIN_PATH), btn_SET_BIN_PATH(this, IDC_SET_BIN_PATH), btn_SET_HOME_DIR(this, IDC_SET_HOME_DIR), btn_OK(this, ID_OK), btn_GENERATE_RANDOM(this, IDC_GENERATE_RANDOM), edit_BIN_PATH(this, IDC_BIN_PATH), edit_HOME_DIR(this, IDC_HOME_DIR), chk_AUTO_EXCHANGE(this, IDC_AUTO_EXCHANGE) @@ -895,7 +895,7 @@ void CDlgGpgBinOpts::OnDestroy() InitCheck(); } -CDlgNewKey::CDlgNewKey(MCONTACT _hContact, wstring _new_key) : CDlgBase(g_plugin.getInst(), IDD_NEW_KEY), +CDlgNewKey::CDlgNewKey(MCONTACT _hContact, wstring _new_key) : CDlgBase(g_plugin, IDD_NEW_KEY), lbl_KEY_FROM(this, IDC_KEY_FROM), lbl_MESSAGE(this, IDC_MESSAGE), btn_IMPORT(this, ID_IMPORT), btn_IMPORT_AND_USE(this, IDC_IMPORT_AND_USE), btn_IGNORE_KEY(this, IDC_IGNORE_KEY) { @@ -946,7 +946,7 @@ void CDlgNewKey::onClick_IGNORE_KEY(CCtrlButton*) this->Close(); } -CDlgKeyGen::CDlgKeyGen() : CDlgBase(g_plugin.getInst(), IDD_KEY_GEN), +CDlgKeyGen::CDlgKeyGen() : CDlgBase(g_plugin, IDD_KEY_GEN), combo_KEY_TYPE(this, IDC_KEY_TYPE), edit_KEY_LENGTH(this, IDC_KEY_LENGTH), edit_KEY_PASSWD(this, IDC_KEY_PASSWD), edit_KEY_REAL_NAME(this, IDC_KEY_REAL_NAME), edit_KEY_EMAIL(this, IDC_KEY_EMAIL), edit_KEY_COMMENT(this, IDC_KEY_COMMENT), edit_KEY_EXPIRE_DATE(this, IDC_KEY_EXPIRE_DATE), @@ -1140,7 +1140,7 @@ void CDlgKeyGen::OnDestroy() db_set_dw(NULL, szGPGModuleName, "KeyGenWindowY", globals.key_gen_rect.top); } -CDlgLoadExistingKey::CDlgLoadExistingKey() : CDlgBase(g_plugin.getInst(), IDD_LOAD_EXISTING_KEY), +CDlgLoadExistingKey::CDlgLoadExistingKey() : CDlgBase(g_plugin, IDD_LOAD_EXISTING_KEY), btn_OK(this, IDOK), btn_CANCEL(this, IDCANCEL), list_EXISTING_KEY_LIST(this, IDC_EXISTING_KEY_LIST) { @@ -1323,7 +1323,7 @@ void CDlgLoadExistingKey::onChange_EXISTING_KEY_LIST(CCtrlListView::TEventInfo * btn_OK.Enable(); } -CDlgImportKey::CDlgImportKey(MCONTACT _hContact) : CDlgBase(g_plugin.getInst(), IDD_IMPORT_KEY), +CDlgImportKey::CDlgImportKey(MCONTACT _hContact) : CDlgBase(g_plugin, IDD_IMPORT_KEY), combo_KEYSERVER(this, IDC_KEYSERVER), btn_IMPORT(this, IDC_IMPORT) { @@ -1362,7 +1362,7 @@ void CDlgImportKey::onClick_IMPORT(CCtrlButton*) -CDlgKeyPasswordMsgBox::CDlgKeyPasswordMsgBox(MCONTACT _hContact) : CDlgBase(g_plugin.getInst(), IDD_KEY_PASSWD), +CDlgKeyPasswordMsgBox::CDlgKeyPasswordMsgBox(MCONTACT _hContact) : CDlgBase(g_plugin, IDD_KEY_PASSWD), lbl_KEYID(this, IDC_KEYID), edit_KEY_PASSWORD(this, IDC_KEY_PASSWORD), chk_DEFAULT_PASSWORD(this, IDC_DEFAULT_PASSWORD), chk_SAVE_PASSWORD(this, IDC_SAVE_PASSWORD), diff --git a/plugins/NewsAggregator/Src/Authentication.cpp b/plugins/NewsAggregator/Src/Authentication.cpp index c2dc409947..318f8ea0a3 100644 --- a/plugins/NewsAggregator/Src/Authentication.cpp +++ b/plugins/NewsAggregator/Src/Authentication.cpp @@ -43,7 +43,7 @@ void CreateAuthString(char *auth, MCONTACT hContact, CFeedEditor *pDlg) }
CAuthRequest::CAuthRequest(CFeedEditor *pDlg, MCONTACT hContact)
- : CSuper(g_plugin.getInst(), IDD_AUTHENTICATION),
+ : CSuper(g_plugin, IDD_AUTHENTICATION),
m_feedname(this, IDC_FEEDNAME), m_username(this, IDC_FEEDUSERNAME),
m_password(this, IDC_FEEDPASSWORD), m_ok(this, IDOK)
{
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index ca050741fa..b51360f21e 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. #include "stdafx.h"
CExportFeed::CExportFeed()
- : CSuper(g_plugin.getInst(), IDD_FEEDEXPORT),
+ : CSuper(g_plugin, IDD_FEEDEXPORT),
m_feedslist(this, IDC_FEEDSLIST), m_feedsexportlist(this, IDC_FEEDSEXPORTLIST),
m_addfeed(this, IDC_ADDFEED), m_removefeed(this, IDC_REMOVEFEED),
m_addallfeeds(this, IDC_ADDALLFEEDS), m_removeallfeeds(this, IDC_REMOVEALLFEEDS),
@@ -251,7 +251,7 @@ void CExportFeed::OnClose() }
CImportFeed::CImportFeed(CCtrlListView *m_feeds)
- : CSuper(g_plugin.getInst(), IDD_FEEDIMPORT),
+ : CSuper(g_plugin, IDD_FEEDIMPORT),
m_importfile(this, IDC_IMPORTFILEPATH), m_browsefile(this, IDC_BROWSEIMPORTFILE),
m_feedslist(this, IDC_FEEDSLIST), m_feedsimportlist(this, IDC_FEEDSIMPORTLIST),
m_addfeed(this, IDC_ADDFEED), m_removefeed(this, IDC_REMOVEFEED),
@@ -661,7 +661,7 @@ void CImportFeed::OnClose() }
CFeedEditor::CFeedEditor(int iItem, CCtrlListView *m_feeds, MCONTACT Contact)
- : CSuper(g_plugin.getInst(), IDD_ADDFEED),
+ : CSuper(g_plugin, IDD_ADDFEED),
m_feedtitle(this, IDC_FEEDTITLE), m_feedurl(this, IDC_FEEDURL),
m_checktime(this, IDC_CHECKTIME), m_checktimespin(this, IDC_TIMEOUT_VALUE_SPIN),
m_checkfeed(this, IDC_DISCOVERY), m_useauth(this, IDC_USEAUTH),
@@ -893,7 +893,7 @@ void COptionsMain::UpdateList() }
COptionsMain::COptionsMain()
- : CPluginDlgBase(g_plugin.getInst(), IDD_OPTIONS, MODULE),
+ : CPluginDlgBase(g_plugin, IDD_OPTIONS, MODULE),
m_feeds(this, IDC_FEEDLIST),
m_add(this, IDC_ADD),
m_change(this, IDC_CHANGE),
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index d2e4f6806a..30d35d39cf 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -622,7 +622,7 @@ class CLogOptionsDlg : public CDlgBase public:
CLogOptionsDlg() :
- CDlgBase(g_plugin.getInst(), IDD_OPT_MSGLOG),
+ CDlgBase(g_plugin, IDD_OPT_MSGLOG),
m_log(this, IDC_SRMM_LOG)
{}
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index a1f94fc2a6..cb41109d0e 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -326,7 +326,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) // CScriverWindow
CScriverWindow::CScriverWindow(int iDialog, SESSION_INFO *si)
- : CSrmmBaseDialog(g_plugin.getInst(), iDialog, si)
+ : CSrmmBaseDialog(g_plugin, iDialog, si)
{
m_autoClose = CLOSE_ON_CANCEL;
}
diff --git a/plugins/Scriver/src/msgtimedout.cpp b/plugins/Scriver/src/msgtimedout.cpp index 1c2a5663db..672b5ea81d 100644 --- a/plugins/Scriver/src/msgtimedout.cpp +++ b/plugins/Scriver/src/msgtimedout.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
CErrorDlg::CErrorDlg(const wchar_t *pwszDescr, HWND hWnd, MessageSendQueueItem *pItem)
- : CDlgBase(g_plugin.getInst(), IDD_MSGSENDERROR),
+ : CDlgBase(g_plugin, IDD_MSGSENDERROR),
m_wszText(mir_utf8decodeW(pItem->sendBuffer)),
m_wszDescr(pwszDescr != nullptr ? pwszDescr : TranslateT("An unknown error has occurred.")),
m_hwndParent(hWnd),
diff --git a/plugins/StartPosition/src/options.cpp b/plugins/StartPosition/src/options.cpp index 9ba3fe4262..32eb9f3c78 100644 --- a/plugins/StartPosition/src/options.cpp +++ b/plugins/StartPosition/src/options.cpp @@ -16,7 +16,7 @@ StartPositionOptions::StartPositionOptions() : } COptionsDlg::COptionsDlg() : - CPluginDlgBase(g_plugin.getInst(), IDD_OPTIONS, MODULE_NAME), + CPluginDlgBase(g_plugin, IDD_OPTIONS, MODULE_NAME), chkPositionTop(this, IDC_CLTOPENABLE), edtPositionTop(this, IDC_CLTOP), chkPositionBottom(this, IDC_CLBOTTOMENABLE), diff --git a/plugins/StatusManager/src/StartupStatus/ss_options.cpp b/plugins/StatusManager/src/StartupStatus/ss_options.cpp index 1f56ccb687..dd6e877083 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_options.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_options.cpp @@ -140,7 +140,7 @@ class CCmdlDlg : public CDlgBase public: CCmdlDlg(int iProfileNo) - : CDlgBase(g_plugin.getInst(), IDD_CMDLOPTIONS), + : CDlgBase(g_plugin, IDD_CMDLOPTIONS), btnCopy(this, IDC_COPY), btnLink(this, IDC_SHORTCUT), ps(protoList) @@ -453,7 +453,7 @@ class CAddProfileDlg : public CDlgBase public: CAddProfileDlg() - : CDlgBase(g_plugin.getInst(), IDD_ADDPROFILE), + : CDlgBase(g_plugin, IDD_ADDPROFILE), btnOk(this, IDOK), edtProfile(this, IDC_PROFILENAME) { @@ -588,7 +588,7 @@ class CSSAdvancedOptDlg : public CDlgBase public: CSSAdvancedOptDlg() : - CDlgBase(g_plugin.getInst(), IDD_OPT_STATUSPROFILES), + CDlgBase(g_plugin, IDD_OPT_STATUSPROFILES), cmbProfile(this, IDC_PROFILE), btnAdd(this, IDC_ADDPROFILE), btnHelp(this, IDC_VARIABLESHELP), diff --git a/plugins/StatusManager/src/options.cpp b/plugins/StatusManager/src/options.cpp index 5f5d73aec3..db81aca285 100644 --- a/plugins/StatusManager/src/options.cpp +++ b/plugins/StatusManager/src/options.cpp @@ -14,7 +14,7 @@ class CSubPluginsOptionsDlg : public CPluginDlgBase public: CSubPluginsOptionsDlg() - : CPluginDlgBase(g_plugin.getInst(), IDD_OPT_SUBPLUGINS, MODULENAME), + : CPluginDlgBase(g_plugin, IDD_OPT_SUBPLUGINS, MODULENAME), m_enableKeepStatus(this, IDC_ENABLE_KEEPSTATUS), m_enableStartupStatus(this, IDC_ENABLE_STARTUPSTATUS), m_enableAdvancedAutoAway(this, IDC_ENABLE_ADVANCEDAUTOAWAY) diff --git a/plugins/StopSpamMod/src/options.cpp b/plugins/StopSpamMod/src/options.cpp index be0a7421e6..1ed210bdc3 100755 --- a/plugins/StopSpamMod/src/options.cpp +++ b/plugins/StopSpamMod/src/options.cpp @@ -26,7 +26,7 @@ const wchar_t *defAuthReply = LPGENW("StopSpam: send a message and reply to an a class COptMainDlg : public CDlgBase
{
public:
- COptMainDlg() : CDlgBase(g_plugin.getInst(), IDD_MAIN),
+ COptMainDlg() : CDlgBase(g_plugin, IDD_MAIN),
chk_INFTALKPROT(this, ID_INFTALKPROT), chk_ADDPERMANENT(this, ID_ADDPERMANENT), chk_HANDLEAUTHREQ(this, ID_HANDLEAUTHREQ),
chk_HIDECONTACTS(this, ID_HIDECONTACTS), chk_IGNORESPAMMERS(this, ID_IGNORESPAMMERS), chk_LOGSPAMTOFILE(this, ID_LOGSPAMTOFILE),
ctrl_DESCRIPTION(this, ID_DESCRIPTION), edit_MAXQUESTCOUNT(this, ID_MAXQUESTCOUNT)
@@ -64,7 +64,7 @@ private: class COptMessagesDlg : public CDlgBase
{
public:
- COptMessagesDlg() : CDlgBase(g_plugin.getInst(), IDD_MESSAGES),
+ COptMessagesDlg() : CDlgBase(g_plugin, IDD_MESSAGES),
edit_QUESTION(this, ID_QUESTION), edit_ANSWER(this, ID_ANSWER), edit_CONGRATULATION(this, ID_CONGRATULATION), edit_AUTHREPL(this, ID_AUTHREPL),
btn_RESTOREDEFAULTS(this, ID_RESTOREDEFAULTS), btn_VARS(this, IDC_VARS)
{
@@ -114,7 +114,7 @@ private: class COptProtoDlg : public CDlgBase
{
public:
- COptProtoDlg() : CDlgBase(g_plugin.getInst(), IDD_PROTO),
+ COptProtoDlg() : CDlgBase(g_plugin, IDD_PROTO),
list_USEDPROTO(this, ID_USEDPROTO), list_ALLPROTO(this, ID_ALLPROTO),
btn_ADD(this, ID_ADD), btn_REMOVE(this, ID_REMOVE), btn_ADDALL(this, ID_ADDALL), btn_REMOVEALL(this, ID_REMOVEALL)
{
@@ -184,7 +184,7 @@ private: class COptAdvancedDlg : public CDlgBase
{
public:
- COptAdvancedDlg() : CDlgBase(g_plugin.getInst(), IDD_ADVANCED),
+ COptAdvancedDlg() : CDlgBase(g_plugin, IDD_ADVANCED),
chk_INVIS_DISABLE(this, IDC_INVIS_DISABLE), chk_CASE_INSENSITIVE(this, IDC_CASE_INSENSITIVE), chk_SPECIALGROUP(this, ID_SPECIALGROUP), chk_EXCLUDE(this, ID_EXCLUDE),
chk_REMOVE_TMP(this, ID_REMOVE_TMP), chk_REMOVE_TMP_ALL(this, ID_REMOVE_TMP_ALL), chk_IGNOREURL(this, ID_IGNOREURL), chk_AUTOAUTH(this, IDC_AUTOAUTH), chk_ADDTOSRVLST(this, IDC_ADDTOSRVLST),
chk_REQAUTH(this, IDC_REQAUTH), chk_REGEX(this, IDC_REGEX), chk_HISTORY_LOG(this, IDC_HISTORY_LOG), chk_MATH_QUESTION(this, IDC_MATH_QUESTION),
diff --git a/plugins/StopSpamPlus/src/options.cpp b/plugins/StopSpamPlus/src/options.cpp index 9ecf9d5cae..d540a290d5 100644 --- a/plugins/StopSpamPlus/src/options.cpp +++ b/plugins/StopSpamPlus/src/options.cpp @@ -9,7 +9,7 @@ class COptMainDlg : public CPluginDlgBase public:
COptMainDlg() :
- CPluginDlgBase(g_plugin.getInst(), IDD_MAIN, pluginName),
+ CPluginDlgBase(g_plugin, IDD_MAIN, pluginName),
edtCount(this, ID_MAXQUESTCOUNT),
edtDescr(this, ID_DESCRIPTION),
chk1(this, ID_INFTALKPROT),
@@ -44,7 +44,7 @@ class COptMessageDlg : public CPluginDlgBase public:
COptMessageDlg() :
- CPluginDlgBase(g_plugin.getInst(), IDD_MESSAGES, pluginName),
+ CPluginDlgBase(g_plugin, IDD_MESSAGES, pluginName),
btnHelp(this, IDC_VARS),
btnRestore(this, ID_RESTOREDEFAULTS),
edtQuestion(this, ID_QUESTION),
@@ -94,7 +94,7 @@ class COptAccountDlg : public CPluginDlgBase public:
COptAccountDlg() :
- CPluginDlgBase(g_plugin.getInst(), IDD_PROTO, pluginName),
+ CPluginDlgBase(g_plugin, IDD_PROTO, pluginName),
m_accounts(this, IDC_PROTO)
{
m_accounts.OnItemChanged = Callback(this, &COptAccountDlg::list_OnItemChanged);
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 8a78e85925..1c155e1c2e 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -576,7 +576,7 @@ class COptMainDlg : public CDlgBase public:
COptMainDlg() :
- CDlgBase(g_plugin.getInst(), IDD_OPT_MSGDLG),
+ CDlgBase(g_plugin, IDD_OPT_MSGDLG),
urlHelp(this, IDC_HELP_GENERAL, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/General_settings"),
btnReset(this, IDC_RESETWARNINGS),
spnAvaSize(this, IDC_AVATARSPIN),
@@ -656,7 +656,7 @@ class COptLogDlg : public CDlgBase public:
COptLogDlg()
- : CDlgBase(g_plugin.getInst(), IDD_OPT_MSGLOG),
+ : CDlgBase(g_plugin, IDD_OPT_MSGLOG),
btnModify(this, IDC_MODIFY),
btnRtlModify(this, IDC_RTLMODIFY),
spnTrim(this, IDC_TRIMSPIN),
@@ -895,7 +895,7 @@ class COptTypingDlg : public CDlgBase public:
COptTypingDlg()
- : CDlgBase(g_plugin.getInst(), IDD_OPT_MSGTYPE),
+ : CDlgBase(g_plugin, IDD_OPT_MSGTYPE),
urlHelp(this, IDC_MTN_HELP, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Advanced_tweaks"),
chkWin(this, IDC_TYPEWIN),
chkNoWin(this, IDC_TYPENOWIN),
@@ -1023,7 +1023,7 @@ class COptTabbedDlg : public CDlgBase public:
COptTabbedDlg() :
- CDlgBase(g_plugin.getInst(), IDD_OPT_TABBEDMSG),
+ CDlgBase(g_plugin, IDD_OPT_TABBEDMSG),
chkLimit(this, IDC_CUT_TABTITLE),
edtLimit(this, IDC_CUT_TITLEMAX),
spnLimit(this, IDC_CUT_TITLEMAXSPIN),
@@ -1114,7 +1114,7 @@ class COptContainersDlg : public CDlgBase public:
COptContainersDlg()
- : CDlgBase(g_plugin.getInst(), IDD_OPT_CONTAINERS),
+ : CDlgBase(g_plugin, IDD_OPT_CONTAINERS),
urlHelp(this, IDC_HELP_CONTAINERS, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Containers"),
spnNumFlash(this, IDC_NRFLASHSPIN),
spnTabLimit(this, IDC_TABLIMITSPIN),
@@ -1196,7 +1196,7 @@ class COptAdvancedDlg : public CDlgBase public:
COptAdvancedDlg() :
- CDlgBase(g_plugin.getInst(), IDD_OPTIONS_PLUS),
+ CDlgBase(g_plugin, IDD_OPTIONS_PLUS),
urlHelp(this, IDC_PLUS_HELP, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Typing_notifications"),
btnRevert(this, IDC_PLUS_REVERT),
spnTimeout(this, IDC_TIMEOUTSPIN),
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 6ceaa99cf9..270e04113a 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -62,7 +62,7 @@ int SmileyAddOptionsChanged(WPARAM, LPARAM) // basic window class
CTabBaseDlg::CTabBaseDlg(int iResource, SESSION_INFO *si)
- : CSrmmBaseDialog(g_plugin.getInst(), iResource, si),
+ : CSrmmBaseDialog(g_plugin, iResource, si),
m_pPanel(this),
m_dwFlags(MWF_INITMODE),
m_iInputAreaHeight(-1)
diff --git a/plugins/Toaster/src/options.cpp b/plugins/Toaster/src/options.cpp index 7b0f3b5995..5475b67e54 100644 --- a/plugins/Toaster/src/options.cpp +++ b/plugins/Toaster/src/options.cpp @@ -1,7 +1,7 @@ #include "stdafx.h"
COptions::COptions()
- : CDlgBase(g_plugin.getInst(), IDD_OPTIONS_MAIN),
+ : CDlgBase(g_plugin, IDD_OPTIONS_MAIN),
m_shortcut(this, IDC_SHORTCUT),
m_preview(this, IDC_PREVIEW),
m_enabled(this, IDC_CHECK_ENABLED)
diff --git a/plugins/Watrack_MPD/src/options.cpp b/plugins/Watrack_MPD/src/options.cpp index 8d7c28bc6f..1a65da6ba9 100755 --- a/plugins/Watrack_MPD/src/options.cpp +++ b/plugins/Watrack_MPD/src/options.cpp @@ -19,7 +19,7 @@ class COptWaMpdDlg : public CDlgBase { public: - COptWaMpdDlg() : CDlgBase(g_plugin.getInst(), IDD_OPT_WA_MPD), + COptWaMpdDlg() : CDlgBase(g_plugin, IDD_OPT_WA_MPD), edit_PORT(this, IDC_PORT), edit_SERVER(this, IDC_SERVER), edit_PASSWORD(this, IDC_PASSWORD) {} virtual void OnInitDialog() override diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 952bf194f9..c31c76412c 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -247,7 +247,7 @@ void CToxOptionsMain::OnApply() /////////////////////////////////////////////////////////////////////////////////
CToxNodeEditor::CToxNodeEditor(int iItem, CCtrlListView *m_nodes)
- : CSuper(g_plugin.getInst(), IDD_NODE_EDITOR),
+ : CSuper(g_plugin, IDD_NODE_EDITOR),
m_ipv4(this, IDC_IPV4), m_ipv6(this, IDC_IPV6),
m_port(this, IDC_PORT), m_pkey(this, IDC_PKEY),
m_ok(this, IDOK), m_iItem(iItem)
diff --git a/src/core/stdidle/src/options.cpp b/src/core/stdidle/src/options.cpp index 6f8732223b..5da1144b09 100644 --- a/src/core/stdidle/src/options.cpp +++ b/src/core/stdidle/src/options.cpp @@ -57,7 +57,7 @@ class COptionsDlg : public CPluginDlgBase public: COptionsDlg() : - CPluginDlgBase(g_plugin.getInst(), IDD_OPT_IDLE, IDLEMOD), + CPluginDlgBase(g_plugin, IDD_OPT_IDLE, IDLEMOD), edt1sttime(this, IDC_IDLE1STTIME), spinIdle(this, IDC_IDLESPIN), cmbAAStatus(this, IDC_AASTATUS), diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index 6f9dcc88db..778d8f1af8 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -332,7 +332,7 @@ class COptMainDlg : public CDlgBase public: COptMainDlg() - : CDlgBase(g_plugin.getInst(), IDD_OPTIONS1), + : CDlgBase(g_plugin, IDD_OPTIONS1), checkBoxes(this, IDC_CHECKBOXES) { checkBoxes.OnItemChanged = Callback(this, &COptMainDlg::onChange_Tree); @@ -433,7 +433,7 @@ class COptLogDlg : public CDlgBase public: COptLogDlg() : - CDlgBase(g_plugin.getInst(), IDD_OPTIONS2), + CDlgBase(g_plugin, IDD_OPTIONS2), spin2(this, IDC_SPIN2), spin3(this, IDC_SPIN3), spin4(this, IDC_SPIN4), @@ -596,7 +596,7 @@ class COptPopupDlg : public CDlgBase public: COptPopupDlg() - : CDlgBase(g_plugin.getInst(), IDD_OPTIONSPOPUP), + : CDlgBase(g_plugin, IDD_OPTIONSPOPUP), chkRadio1(this, IDC_RADIO1), chkRadio2(this, IDC_RADIO2), chkRadio3(this, IDC_RADIO3) diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 101c07cf46..204f34eaff 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -193,7 +193,7 @@ class COptionMainDlg : public CPluginDlgBase public:
COptionMainDlg() :
- CPluginDlgBase(g_plugin.getInst(), IDD_OPT_MSGDLG, SRMMMOD),
+ CPluginDlgBase(g_plugin, IDD_OPT_MSGDLG, SRMMMOD),
tree(this, IDC_POPLIST),
edtSecs(this, IDC_SECONDS),
edtNFlash(this, IDC_NFLASHES),
@@ -315,7 +315,7 @@ class COptionLogDlg : public CPluginDlgBase public:
COptionLogDlg() :
- CPluginDlgBase(g_plugin.getInst(), IDD_OPT_MSGLOG, SRMMMOD),
+ CPluginDlgBase(g_plugin, IDD_OPT_MSGLOG, SRMMMOD),
chkSecs(this, IDC_SHOWSECS),
chkDate(this, IDC_SHOWDATES),
chkTime(this, IDC_SHOWTIMES),
@@ -418,7 +418,7 @@ class COptionTypingDlg : public CPluginDlgBase public:
COptionTypingDlg() :
- CPluginDlgBase(g_plugin.getInst(), IDD_OPT_MSGTYPE, SRMMMOD),
+ CPluginDlgBase(g_plugin, IDD_OPT_MSGTYPE, SRMMMOD),
clist(this, IDC_CLIST),
chkType(this, IDC_SHOWNOTIFY),
chkTypeWin(this, IDC_TYPEWIN),
@@ -529,7 +529,7 @@ class COptionsTabDlg : public CDlgBase public:
COptionsTabDlg() :
- CDlgBase(g_plugin.getInst(), IDD_OPT_TABS),
+ CDlgBase(g_plugin, IDD_OPT_TABS),
m_chkTabs(this, IDC_USETABS),
m_chkTabsBottom(this, IDC_TABSBOTTOM),
m_chkTabsClose(this, IDC_CLOSETABS),
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 9b9ad4fe75..0b982e5892 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////////////////
CMsgDialog::CMsgDialog(int iDialogId, SESSION_INFO *si)
- : CSuper(g_plugin.getInst(), iDialogId, si),
+ : CSuper(g_plugin, iDialogId, si),
m_btnOk(this, IDOK)
{
m_autoClose = 0;
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index 234ff9a657..a1d28f215a 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -163,7 +163,7 @@ static LRESULT CALLBACK TabSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR ///////////////////////////////////////////////////////////////////////////////////////// CTabbedWindow::CTabbedWindow() : - CDlgBase(g_plugin.getInst(), IDD_CONTAINER), + CDlgBase(g_plugin, IDD_CONTAINER), m_tab(this, IDC_TAB) { } diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 6fa1d98644..e6e2e8f009 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -27,7 +27,6 @@ Skin_GetIconName @24 ??0CProtoIntDlgBase@@QAE@PAUPROTO_INTERFACE@@H@Z @26 NONAME
??0PROTO_INTERFACE@@QAE@ABU0@@Z @27 NONAME
??1CProtoIntDlgBase@@UAE@XZ @29 NONAME
-??4CProtoIntDlgBase@@QAEAAV0@ABV0@@Z @30 NONAME
??4PROTO_INTERFACE@@QAEAAU0@ABU0@@Z @31 NONAME
??_7CProtoIntDlgBase@@6B@ @32 NONAME
??_7PROTO_INTERFACE@@6B@ @33 NONAME
@@ -384,7 +383,7 @@ Chat_UnescapeTags @399 NONAME ProtoGetAvatarFormatByMimeType @400
ProtoGetAvatarMimeType @401
?set_uin@DB_AUTH_BLOB@@QAEXK@Z @402 NONAME
-??0CSrmmBaseDialog@@IAE@PAUHINSTANCE__@@HPAUSESSION_INFO@@@Z @403 NONAME
+??0CSrmmBaseDialog@@IAE@AAVCMPluginBase@@HPAUSESSION_INFO@@@Z @403 NONAME
??1CSrmmBaseDialog@@UAE@XZ @405 NONAME
??_7CSrmmBaseDialog@@6B@ @407 NONAME
?DlgProc@CSrmmBaseDialog@@MAEHIIJ@Z @408 NONAME
@@ -449,7 +448,6 @@ Clist_SetStatusMode @464 ??0MIDatabase@@QAE@ABU0@@Z @470 NONAME
??0MIDatabase@@QAE@XZ @471 NONAME
??1MDatabaseCommon@@UAE@XZ @472 NONAME
-??4CProtoIntDlgBase@@QAEAAV0@$$QAV0@@Z @474 NONAME
??4MDatabaseCommon@@QAEAAV0@ABV0@@Z @476 NONAME
??4MIDatabase@@QAEAAU0@$$QAU0@@Z @477 NONAME
??4MIDatabase@@QAEAAU0@ABU0@@Z @478 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 109b032808..dc486e6845 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -27,7 +27,6 @@ Skin_GetIconName @24 ??0CProtoIntDlgBase@@QEAA@PEAUPROTO_INTERFACE@@H@Z @26 NONAME
??0PROTO_INTERFACE@@QEAA@AEBU0@@Z @27 NONAME
??1CProtoIntDlgBase@@UEAA@XZ @29 NONAME
-??4CProtoIntDlgBase@@QEAAAEAV0@AEBV0@@Z @30 NONAME
??4PROTO_INTERFACE@@QEAAAEAU0@AEBU0@@Z @31 NONAME
??_7CProtoIntDlgBase@@6B@ @32 NONAME
??_7PROTO_INTERFACE@@6B@ @33 NONAME
@@ -384,7 +383,7 @@ Chat_UnescapeTags @399 NONAME ProtoGetAvatarFormatByMimeType @400
ProtoGetAvatarMimeType @401
?set_uin@DB_AUTH_BLOB@@QEAAXK@Z @402 NONAME
-??0CSrmmBaseDialog@@IEAA@PEAUHINSTANCE__@@HPEAUSESSION_INFO@@@Z @403 NONAME
+??0CSrmmBaseDialog@@IEAA@AEAVCMPluginBase@@HPEAUSESSION_INFO@@@Z @403 NONAME
??1CSrmmBaseDialog@@UEAA@XZ @405 NONAME
??_7CSrmmBaseDialog@@6B@ @407 NONAME
?DlgProc@CSrmmBaseDialog@@MEAA_JI_K_J@Z @408 NONAME
@@ -449,7 +448,6 @@ Clist_SetStatusMode @464 ??0MIDatabase@@QEAA@AEBU0@@Z @470 NONAME
??0MIDatabase@@QEAA@XZ @471 NONAME
??1MDatabaseCommon@@UEAA@XZ @472 NONAME
-??4CProtoIntDlgBase@@QEAAAEAV0@$$QEAV0@@Z @474 NONAME
??4MDatabaseCommon@@QEAAAEAV0@AEBV0@@Z @476 NONAME
??4MIDatabase@@QEAAAEAU0@$$QEAU0@@Z @477 NONAME
??4MIDatabase@@QEAAAEAU0@AEBU0@@Z @478 NONAME
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index 0cc0f87a49..92002dca6e 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -172,8 +172,8 @@ class COptionPageDialog : public CDlgBase LPARAM m_lParam;
public:
- COptionPageDialog(HINSTANCE hInst, int idDialog, DLGPROC pProc, LPARAM lParam) :
- CDlgBase(hInst, idDialog),
+ COptionPageDialog(CMPluginBase &pPlug, int idDialog, DLGPROC pProc, LPARAM lParam) :
+ CDlgBase(pPlug, idDialog),
m_wndProc(pProc),
m_lParam(lParam)
{
@@ -200,7 +200,7 @@ struct OptionsPageData : public MZeroedObject OptionsPageData(const OPTIONSDIALOGPAGE &src)
{
if (src.hInstance != nullptr && src.pszTemplate != nullptr)
- pDialog = new COptionPageDialog(src.hInstance, (INT_PTR)src.pszTemplate, src.pfnDlgProc, src.dwInitParam);
+ pDialog = new COptionPageDialog(::GetPluginByInstance(src.hInstance), (INT_PTR)src.pszTemplate, src.pfnDlgProc, src.dwInitParam);
else
pDialog = src.pDialog;
assert(pDialog != nullptr);
@@ -438,13 +438,13 @@ class COptionsDlg : public CDlgBase int countKnownInst = 0;
m_keywordFilter.ResetContent();
m_keywordFilter.AddString(ALL_MODULES_FILTER, 0);
- m_keywordFilter.AddString(CORE_MODULES_FILTER, (LPARAM)g_hInst);
+ m_keywordFilter.AddString(CORE_MODULES_FILTER, (LPARAM)g_plugin.getInst());
for (auto &opd : m_arOpd) {
opd->FindFilterStrings(false, 0, m_hwnd); // only modules name (fast enougth)
HINSTANCE inst = opd->getInst();
- if (inst == g_hInst)
+ if (inst == g_plugin.getInst())
continue;
int j;
@@ -512,7 +512,7 @@ class COptionsDlg : public CDlgBase else if (mir_wstrcmp(m_szFilterString, CORE_MODULES_FILTER) == 0) {
// replace string with process name - that will show core settings
wchar_t szFileName[300];
- GetModuleFileName(g_hInst, szFileName, _countof(szFileName));
+ GetModuleFileName(g_plugin.getInst(), szFileName, _countof(szFileName));
wchar_t *pos = wcsrchr(szFileName, '\\');
if (pos)
pos++;
@@ -685,7 +685,7 @@ class COptionsDlg : public CDlgBase public:
COptionsDlg(const wchar_t *pszCaption, const wchar_t *pszGroup, const wchar_t *pszPage, const wchar_t *pszTab, bool bSinglePage, const OptionsPageList &arPages) :
- CDlgBase(g_hInst, bSinglePage ? IDD_OPTIONSPAGE : IDD_OPTIONS),
+ CDlgBase(g_plugin, bSinglePage ? IDD_OPTIONSPAGE : IDD_OPTIONS),
m_btnApply(this, IDC_APPLY),
m_btnCancel(this, IDCANCEL),
m_pageTree(this, IDC_PAGETREE),
diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp index ed3de8d553..ab21be6a15 100644 --- a/src/mir_core/src/CDlgBase.cpp +++ b/src/mir_core/src/CDlgBase.cpp @@ -45,11 +45,11 @@ static int CompareTimerId(const CTimer *t1, const CTimer *t2) return t1->GetEventId() - t2->GetEventId(); } -CDlgBase::CDlgBase(HINSTANCE hInst, int idDialog) +CDlgBase::CDlgBase(CMPluginBase &pPlug, int idDialog) : m_controls(1, CompareControlId), - m_timers(1, CompareTimerId) + m_timers(1, CompareTimerId), + m_pPlugin(pPlug) { - m_hInst = hInst; m_idDialog = idDialog; m_hwnd = m_hwndParent = nullptr; m_isModal = m_initialized = m_bExiting = false; @@ -74,13 +74,13 @@ void CDlgBase::Close() void CDlgBase::Create() { - CreateDialogParam(m_hInst, MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this); + CreateDialogParam(GetInst(), MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this); } int CDlgBase::DoModal() { m_isModal = true; - return DialogBoxParam(m_hInst, MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this); + return DialogBoxParam(GetInst(), MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this); } void CDlgBase::EndModal(INT_PTR nResult) @@ -159,7 +159,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) switch (msg) { case WM_INITDIALOG: m_initialized = false; - TranslateDialog_LP(m_hwnd, GetPluginLangByInstance(m_hInst)); + TranslateDialog_LP(m_hwnd, GetPluginLangByInstance(m_pPlugin.getInst())); ::EnumChildWindows(m_hwnd, &GlobalFieldEnum, LPARAM(this)); @@ -286,7 +286,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) case WM_SIZE: if (m_forceResizable || (GetWindowLongPtr(m_hwnd, GWL_STYLE) & WS_THICKFRAME)) - Utils_ResizeDialog(m_hwnd, m_hInst, MAKEINTRESOURCEA(m_idDialog), GlobalDlgResizer); + Utils_ResizeDialog(m_hwnd, m_pPlugin.getInst(), MAKEINTRESOURCEA(m_idDialog), GlobalDlgResizer); return TRUE; case WM_TIMER: |