summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-20 16:19:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-20 16:19:56 +0300
commite2530b85347a8e0a3344174c3575284a76f512aa (patch)
treeaf7282360d4c57aa26c1d9de260505583076c933
parent495c51c74e7d1595c882ae31becb7ab5b4093a08 (diff)
UserInfo_AddPage() helper replaced with CMPLugin::addUserInfo()
-rw-r--r--include/m_userinfo.h5
-rw-r--r--include/newpluginapi.h1
-rw-r--r--libs/win32/mir_app.libbin162514 -> 162920 bytes
-rw-r--r--libs/win64/mir_app.libbin157570 -> 157990 bytes
-rw-r--r--plugins/AVS/src/options.cpp4
-rw-r--r--plugins/BuddyExpectator/src/options.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/indsnd.cpp2
-rw-r--r--plugins/Quotes/src/QuoteInfoDlg.cpp2
-rw-r--r--plugins/SeenPlugin/src/userinfo.cpp2
-rw-r--r--plugins/UserInfoEx/src/classPsTree.cpp2
-rw-r--r--plugins/Weather/src/weather_userinfo.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/dialogs.cpp2
-rw-r--r--protocols/ICQCorp/src/user.cpp2
-rw-r--r--protocols/IRCG/src/userinfo.cpp2
-rw-r--r--protocols/IcqOscarJ/src/userinfotab.cpp4
-rwxr-xr-xprotocols/JabberG/src/jabber_userinfo.cpp4
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp12
-rw-r--r--protocols/Tox/src/tox_contacts.cpp2
-rw-r--r--src/core/stduserinfo/src/stdinfo.cpp12
-rw-r--r--src/mir_app/src/CMPluginBase.cpp8
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
22 files changed, 40 insertions, 34 deletions
diff --git a/include/m_userinfo.h b/include/m_userinfo.h
index 8f4ff6ec67..ffa4861869 100644
--- a/include/m_userinfo.h
+++ b/include/m_userinfo.h
@@ -76,9 +76,4 @@ All PSN_ WM_NOTIFY messages have PSHNOTIFY.lParam = (LPARAM)hContact
#define PSN_PARAMCHANGED 2
#define PSM_FORCECHANGED (WM_USER+100) //force-send a PSN_INFOCHANGED to all pages
-__forceinline INT_PTR UserInfo_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp)
-{ odp->langId = hLangpack;
- return CallService("UserInfo/AddPage", wParam, (LPARAM)odp);
-}
-
#endif // M_USERINFO_H__
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index e8bc7b4435..ed6d733bcb 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -194,6 +194,7 @@ public:
}
int addSound(const char *name, const wchar_t *section, const wchar_t *description, const wchar_t *defaultFile = nullptr);
+ int addUserInfo(WPARAM wParam, struct OPTIONSDIALOGPAGE *odp);
////////////////////////////////////////////////////////////////////////////////////////
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 72e70063ee..68726b54f8 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index 50930361fc..fbb7380679 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 925fa52ee5..aed11c808d 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -1107,7 +1107,7 @@ int OnDetailsInit(WPARAM wParam, LPARAM lParam)
// User dialog
odp.pfnDlgProc = DlgProcAvatarProtoInfo;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PROTO_AVATARS);
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
}
else {
char *szProto = GetContactProto(hContact);
@@ -1116,7 +1116,7 @@ int OnDetailsInit(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = DlgProcAvatarUserInfo;
odp.position = -2000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USER_AVATAR);
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
}
}
return 0;
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp
index 34f4b98bf9..03dbb7eb43 100644
--- a/plugins/BuddyExpectator/src/options.cpp
+++ b/plugins/BuddyExpectator/src/options.cpp
@@ -533,7 +533,7 @@ int UserinfoInit(WPARAM wparam, LPARAM lparam)
uip.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
uip.szTitle.a = LPGEN("Buddy Expectator");
uip.pfnDlgProc = UserinfoDlgProc;
- UserInfo_AddPage(wparam, &uip);
+ g_plugin.addUserInfo(wparam, &uip);
}
return 0;
}
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp
index 98bf7c9d6a..dcd7f8abdd 100644
--- a/plugins/NewXstatusNotify/src/indsnd.cpp
+++ b/plugins/NewXstatusNotify/src/indsnd.cpp
@@ -601,7 +601,7 @@ int UserInfoInitialise(WPARAM wParam, LPARAM lParam)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SOUNDS);
odp.szTitle.a = LPGEN("Status Notify");
odp.pfnDlgProc = DlgProcSoundUIPage;
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
}
return 0;
}
diff --git a/plugins/Quotes/src/QuoteInfoDlg.cpp b/plugins/Quotes/src/QuoteInfoDlg.cpp
index 482597d12a..c95504e08d 100644
--- a/plugins/Quotes/src/QuoteInfoDlg.cpp
+++ b/plugins/Quotes/src/QuoteInfoDlg.cpp
@@ -113,7 +113,7 @@ int QuotesEventFunc_OnUserInfoInit(WPARAM wp, LPARAM lp)
odp.position = -2000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG_QUOTE_INFO);
odp.szTitle.a = LPGEN("Quote");
- UserInfo_AddPage(wp, &odp);
+ g_plugin.addUserInfo(wp, &odp);
return 0;
}
diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp
index dbfa5232fb..6be9c40bba 100644
--- a/plugins/SeenPlugin/src/userinfo.cpp
+++ b/plugins/SeenPlugin/src/userinfo.cpp
@@ -74,7 +74,7 @@ int UserinfoInit(WPARAM wparam, LPARAM lparam)
uip.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
uip.szTitle.a = LPGEN("Last seen");
uip.pfnDlgProc = UserinfoDlgProc;
- UserInfo_AddPage(wparam, &uip);
+ g_plugin.addUserInfo(wparam, &uip);
}
return 0;
}
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp
index e40b6f6bff..d1567bba69 100644
--- a/plugins/UserInfoEx/src/classPsTree.cpp
+++ b/plugins/UserInfoEx/src/classPsTree.cpp
@@ -132,7 +132,7 @@ int CPsTree::AddDummyItem(LPCSTR pszGroup)
odp.flags = ODPF_UNICODE;
odp.szTitle.w = mir_utf8decodeW(pszGroup);
- INT_PTR rc = UserInfo_AddPage((WPARAM)&psh, &odp);
+ int rc = g_plugin.addUserInfo((WPARAM)&psh, &odp);
mir_free(odp.szTitle.w);
if (!rc) {
_pItems = psh._pPages;
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp
index d18c2ace97..442be8a388 100644
--- a/plugins/Weather/src/weather_userinfo.cpp
+++ b/plugins/Weather/src/weather_userinfo.cpp
@@ -321,7 +321,7 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam)
if (lParam == 0) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO);
odp.pfnDlgProc = DlgProcINIPage;
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
}
else {
// check if it is a weather contact
@@ -330,7 +330,7 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
odp.pfnDlgProc = DlgProcUIPage;
odp.flags = ODPF_BOLDGROUPS;
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
}
}
return 0;
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp
index bc311e486a..20e71b2b37 100644
--- a/protocols/Gadu-Gadu/src/dialogs.cpp
+++ b/protocols/Gadu-Gadu/src/dialogs.cpp
@@ -815,7 +815,7 @@ int GaduProto::details_init(WPARAM wParam, LPARAM lParam)
odp.pszTemplate = pszTemplate;
odp.szTitle.w = m_tszUserName;
odp.dwInitParam = (LPARAM)this;
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
// Start search for user data
if (hContact == NULL)
diff --git a/protocols/ICQCorp/src/user.cpp b/protocols/ICQCorp/src/user.cpp
index becb17221f..48ad3b84b1 100644
--- a/protocols/ICQCorp/src/user.cpp
+++ b/protocols/ICQCorp/src/user.cpp
@@ -156,6 +156,6 @@ int icqUserInfoInitialise(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = icqUserInfoDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_ICQCORP);
odp.hInstance = g_plugin.getInst();
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
return 0;
}
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp
index 56946ec121..2e36ef5f22 100644
--- a/protocols/IRCG/src/userinfo.cpp
+++ b/protocols/IRCG/src/userinfo.cpp
@@ -217,6 +217,6 @@ int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = UserDetailsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
odp.szTitle.a = m_szModuleName;
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
return 0;
}
diff --git a/protocols/IcqOscarJ/src/userinfotab.cpp b/protocols/IcqOscarJ/src/userinfotab.cpp
index 76ec477cca..c6740c3dd0 100644
--- a/protocols/IcqOscarJ/src/userinfotab.cpp
+++ b/protocols/IcqOscarJ/src/userinfotab.cpp
@@ -276,7 +276,7 @@ int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
odp.position = -1900000000;
odp.szTitle.w = m_tszUserName;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_ICQ);
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
if (!lParam) {
wchar_t buf[200];
@@ -286,7 +286,7 @@ int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
odp.position = -1899999999;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_CHANGEINFO);
odp.pfnDlgProc = ChangeInfoDlgProc;
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
}
return 0;
}
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 374c60bee3..7aa1c6adba 100755
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -829,13 +829,13 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
odp.position = -2000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_JABBER);
odp.szTitle.a = LPGEN("Account");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = JabberUserPhotoDlgProc;
odp.position = 2000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_VCARD_PHOTO);
odp.szTitle.a = LPGEN("Photo");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
}
//TODO: add omemo dialog to userinfo
return 0;
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index 95b737973b..09fb8bcd3d 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -1187,32 +1187,32 @@ void CJabberProto::OnUserInfoInit_VCard(WPARAM wParam, LPARAM)
odp.pfnDlgProc = PersonalDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_VCARD_PERSONAL);
odp.szTab.w = LPGENW("General");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = ContactDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_VCARD_CONTACT);
odp.szTab.w = LPGENW("Contacts");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = HomeDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_VCARD_HOME);
odp.szTab.w = LPGENW("Home");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = WorkDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_VCARD_WORK);
odp.szTab.w = LPGENW("Work");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = PhotoDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_VCARD_PHOTO);
odp.szTab.w = LPGENW("Photo");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = NoteDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_VCARD_NOTE);
odp.szTab.w = LPGENW("Note");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
SendGetVcard(m_szJabberJID);
}
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp
index f6e72d7b47..4fd148e394 100644
--- a/protocols/Tox/src/tox_contacts.cpp
+++ b/protocols/Tox/src/tox_contacts.cpp
@@ -358,7 +358,7 @@ int CToxProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = UserInfoProc;
odp.position = -2000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USER_INFO);
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
}
return 0;
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp
index 5892e57f6c..1cf54246b4 100644
--- a/src/core/stduserinfo/src/stdinfo.cpp
+++ b/src/core/stduserinfo/src/stdinfo.cpp
@@ -614,36 +614,36 @@ int DetailsInit(WPARAM wParam, LPARAM lParam)
odp.position = -2100000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SUMMARY);
odp.szTitle.a = LPGEN("Summary");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = ContactDlgProc;
odp.position = -1800000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_CONTACT);
odp.szTitle.a = LPGEN("Contact");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = LocationDlgProc;
odp.position = -1500000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_LOCATION);
odp.szTitle.a = LPGEN("Location");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = WorkDlgProc;
odp.position = -1200000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_WORK);
odp.szTitle.a = LPGEN("Work");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = BackgroundDlgProc;
odp.position = -900000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_BACKGROUND);
odp.szTitle.a = LPGEN("Background info");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
odp.pfnDlgProc = NotesDlgProc;
odp.position = 0;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_NOTES);
odp.szTitle.a = LPGEN("Notes");
- UserInfo_AddPage(wParam, &odp);
+ g_plugin.addUserInfo(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp
index 916a1e3f43..cc2400269d 100644
--- a/src/mir_app/src/CMPluginBase.cpp
+++ b/src/mir_app/src/CMPluginBase.cpp
@@ -97,6 +97,14 @@ void CMPluginBase::tryOpenLog()
/////////////////////////////////////////////////////////////////////////////////////////
+int CMPluginBase::addUserInfo(WPARAM wParam, OPTIONSDIALOGPAGE *odp)
+{
+ odp->langId = hLangpack;
+ return CallService("UserInfo/AddPage", wParam, (LPARAM)odp);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
void CMPluginBase::debugLogA(LPCSTR szFormat, ...)
{
if (m_hLogger == nullptr)
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 7a3868195a..ed4f7da8f1 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -595,3 +595,4 @@ Contact_GetStatus @609
GetPluginByLangId @624
GetInstByAddress @625
GetPluginByInstance @626
+?addUserInfo@CMPluginBase@@QAEHIPAUOPTIONSDIALOGPAGE@@@Z @627 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 5e8ddd4069..9fae50382f 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -595,3 +595,4 @@ Contact_GetStatus @609
GetPluginByLangId @624
GetInstByAddress @625
GetPluginByInstance @626
+?addUserInfo@CMPluginBase@@QEAAH_KPEAUOPTIONSDIALOGPAGE@@@Z @627 NONAME