diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-18 20:53:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-18 20:53:59 +0000 |
commit | 3f23417a1099f73dc28ec1b7d6ec2a1a7fc2b7a2 (patch) | |
tree | 3e0bcd88c55dad310da0dc980e252bf9fbfa6dc5 /plugins | |
parent | 537b94169bf2483798a651ee3b96f7904eebe7b4 (diff) |
- PLUGININFO structure removed at all;
- Options_AddPage & UserInfo_AddPage replaced MS_OPT_ADDPAGE & MS_USERINFO_ADDPAGE services respectively
- total internal redesign of options' translation
- code reformatting
git-svn-id: http://svn.miranda-ng.org/main/trunk@477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
101 files changed, 249 insertions, 294 deletions
diff --git a/plugins/AVS/main.cpp b/plugins/AVS/main.cpp index 70372a2f0d..5137944b00 100644 --- a/plugins/AVS/main.cpp +++ b/plugins/AVS/main.cpp @@ -2180,17 +2180,17 @@ static int OptInit(WPARAM wParam, LPARAM lParam) odp.ptszTab = LPGENT("Protocols");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_PICTS);
odp.pfnDlgProc = DlgProcOptionsProtos;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Contact Avatars");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_AVATARS);
odp.pfnDlgProc = DlgProcOptionsAvatars;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Own Avatars");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_OWN);
odp.pfnDlgProc = DlgProcOptionsOwn;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
@@ -2383,7 +2383,7 @@ static int OnDetailsInit(WPARAM wParam, LPARAM lParam) odp.pfnDlgProc = DlgProcAvatarProtoInfo;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PROTO_AVATARS);
odp.ptszTitle = LPGENT("Avatar");
- CallService(MS_USERINFO_ADDPAGE, wParam, (LPARAM)&odp);
+ UserInfo_AddPage(wParam, &odp);
}
else
{
@@ -2400,7 +2400,7 @@ static int OnDetailsInit(WPARAM wParam, LPARAM lParam) odp.position = -2000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USER_AVATAR);
odp.ptszTitle = LPGENT("Avatar");
- CallService(MS_USERINFO_ADDPAGE, wParam, (LPARAM)&odp);
+ UserInfo_AddPage(wParam, &odp);
}
}
return 0;
diff --git a/plugins/Alarms/options.cpp b/plugins/Alarms/options.cpp index 9f2b9d1222..8d88a7004d 100644 --- a/plugins/Alarms/options.cpp +++ b/plugins/Alarms/options.cpp @@ -1156,7 +1156,7 @@ int OptInit(WPARAM wParam,LPARAM lParam) odp.flags = ODPF_BOLDGROUPS;
odp.nIDBottomSimpleControl = 0;
odp.pfnDlgProc = DlgProcOpts;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/AssocMgr/assoclist.cpp b/plugins/AssocMgr/assoclist.cpp index 4cedcb519c..761aa9f05d 100644 --- a/plugins/AssocMgr/assoclist.cpp +++ b/plugins/AssocMgr/assoclist.cpp @@ -980,7 +980,7 @@ static int AssocListOptInit(WPARAM wParam, LPARAM lParam) odp.ptszTitle = _T("Associations"); /* autotranslated */
odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY|ODPF_TCHAR;
odp.pfnDlgProc = AssocListOptDlgProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/AuthState/options.cpp b/plugins/AuthState/options.cpp index 37dbdca812..cc3e2d8934 100644 --- a/plugins/AuthState/options.cpp +++ b/plugins/AuthState/options.cpp @@ -148,7 +148,7 @@ int onOptInitialise(WPARAM wParam, LPARAM lParam) odp.ptszTitle = _T("Auth State");
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/AutoRun/main.c b/plugins/AutoRun/main.c index 84745d3b11..696027f1d8 100644 --- a/plugins/AutoRun/main.c +++ b/plugins/AutoRun/main.c @@ -138,7 +138,7 @@ static int AutorunOptInitialise(WPARAM wParam,LPARAM lParam) odp.pszGroup=Translate("Plugins");
odp.pfnDlgProc=DlgProcAutorunOpts;
odp.flags=ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
//==========================================================================
diff --git a/plugins/BASS_interface/Main.cpp b/plugins/BASS_interface/Main.cpp index 4a5cdfbf03..2c45df6ab3 100644 --- a/plugins/BASS_interface/Main.cpp +++ b/plugins/BASS_interface/Main.cpp @@ -350,7 +350,7 @@ int OptionsInit(WPARAM wParam, LPARAM lParam) odp.ptszGroup = _T("Customize");
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/BasicHistory/Options.cpp b/plugins/BasicHistory/Options.cpp index 86abbf88c1..bcc4f424ad 100644 --- a/plugins/BasicHistory/Options.cpp +++ b/plugins/BasicHistory/Options.cpp @@ -130,32 +130,32 @@ int Options::InitOptions(WPARAM wParam, LPARAM lParam) odp.ptszTab = LPGENT("Group list");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GROUPLIST);
odp.pfnDlgProc = Options::DlgProcOptsGroupList;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Messages");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MESSAGES);
odp.pfnDlgProc = Options::DlgProcOptsMessages;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Searching");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SEARCHING);
odp.pfnDlgProc = Options::DlgProcOptsSearching;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Export");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_EXPORT);
odp.pfnDlgProc = Options::DlgProcOptsExport;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Scheduler");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SCHEDULER);
odp.pfnDlgProc = Options::DlgProcOptsScheduler;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MAIN);
odp.pfnDlgProc = Options::DlgProcOptsMain;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Boltun/boltun.cpp b/plugins/Boltun/boltun.cpp index 9d7d9b6fb5..6efebc906f 100644 --- a/plugins/Boltun/boltun.cpp +++ b/plugins/Boltun/boltun.cpp @@ -528,11 +528,11 @@ static int MessageOptInit(WPARAM wParam, LPARAM lParam) odp.pfnDlgProc = MainDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MAIN);
odp.pszTab = TAB_GENERAL;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.pfnDlgProc = EngineDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_ENGINE);
odp.pszTab = TAB_ENGINE;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Bonsai/hooked_events.cpp b/plugins/Bonsai/hooked_events.cpp index ba1ee85d91..2c32516c83 100644 --- a/plugins/Bonsai/hooked_events.cpp +++ b/plugins/Bonsai/hooked_events.cpp @@ -86,7 +86,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam) odp.groupPosition = 810000000;
odp.flags=ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOptions;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
\ No newline at end of file diff --git a/plugins/BossKeyPlus/Options.cpp b/plugins/BossKeyPlus/Options.cpp index 0f83079593..7d5b103450 100644 --- a/plugins/BossKeyPlus/Options.cpp +++ b/plugins/BossKeyPlus/Options.cpp @@ -405,13 +405,13 @@ int OptsDlgInit(WPARAM wParam,LPARAM lParam) optDi.ptszTab = _T("Main");
optDi.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&optDi);
+ Options_AddPage(wParam, &optDi);
optDi.flags |= ODPF_EXPERTONLY;
optDi.pfnDlgProc = AdvOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_OPTDIALOGADV);
optDi.ptszTab = _T("Advanced");
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&optDi);
+ Options_AddPage(wParam, &optDi);
return(0);
}
diff --git a/plugins/BuddyExpectator/options.cpp b/plugins/BuddyExpectator/options.cpp index 84b9eef9e2..fa0af1b535 100644 --- a/plugins/BuddyExpectator/options.cpp +++ b/plugins/BuddyExpectator/options.cpp @@ -498,14 +498,14 @@ static int OptionsInit(WPARAM wParam, LPARAM lParam) odp.pszTitle = Translate("Buddy Expectator");
odp.pfnDlgProc = OptionsFrameProc;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
if (ServiceExists(MS_POPUP_ADDPOPUP))
{
odp.pszGroup = Translate("PopUps");
odp.pszTemplate = MAKEINTRESOURCE(IDD_POPUPPANEL);
odp.pfnDlgProc = PopUpOptionsFrameProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
@@ -609,7 +609,7 @@ int UserinfoInit(WPARAM wparam, LPARAM lparam) uip.pszTitle = Translate("Buddy Expectator");
uip.pfnDlgProc = UserinfoDlgProc;
- CallService(MS_USERINFO_ADDPAGE, wparam, (LPARAM)&uip);
+ UserInfo_AddPage(wparam, &uip);
}
return 0;
}
diff --git a/plugins/CSList/cslist.cpp b/plugins/CSList/cslist.cpp index edb87b0175..c842881603 100644 --- a/plugins/CSList/cslist.cpp +++ b/plugins/CSList/cslist.cpp @@ -200,7 +200,7 @@ int CSList::initOptions( WPARAM wparam, LPARAM lparam ) odp.pfnDlgProc = ( DLGPROC )CSOptionsProc;
odp.ptszGroup = _T("Status");
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService( MS_OPT_ADDPAGE, wparam, ( LPARAM )&odp );
+ Options_AddPage(wparam, &odp);
return FALSE;
}
diff --git a/plugins/ChangeKeyboardLayout/commonheaders.h b/plugins/ChangeKeyboardLayout/commonheaders.h index 8eb8f3671e..e7d8c78283 100644 --- a/plugins/ChangeKeyboardLayout/commonheaders.h +++ b/plugins/ChangeKeyboardLayout/commonheaders.h @@ -94,7 +94,6 @@ typedef struct } PopupOptions;
PLUGININFOEX pluginInfoEx;
-PLUGININFO pluginInfo;
HINSTANCE hInst;
diff --git a/plugins/ChangeKeyboardLayout/hook_events.c b/plugins/ChangeKeyboardLayout/hook_events.c index 4afad800d1..b3e97159f0 100644 --- a/plugins/ChangeKeyboardLayout/hook_events.c +++ b/plugins/ChangeKeyboardLayout/hook_events.c @@ -199,19 +199,8 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) }
OnIconsChanged(0, 0);
RegPopupActions();
-
- //Ïîääåðæêà Àïäåéòåðà
- if(ServiceExists(MS_UPDATE_REGISTERFL))
- {
-
- CallService(MS_UPDATE_REGISTERFL, (WPARAM)3632, (LPARAM)&pluginInfo);
-
- }
-
DBWriteContactSettingDword(NULL, ModuleName, "CurrentVer", VERSION);
-
-
return 0;
}
@@ -226,7 +215,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam) odp.pszGroup = Translate("Plugins");
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgMainProcOptions;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
if (ServiceExists(MS_POPUP_ADDPOPUP))
{
@@ -238,7 +227,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam) odp.pszGroup = Translate("PopUps");
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgPopupsProcOptions;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
}
diff --git a/plugins/Chat/options.c b/plugins/Chat/options.c index 54d1f30f39..73f1bc364b 100644 --- a/plugins/Chat/options.c +++ b/plugins/Chat/options.c @@ -937,13 +937,13 @@ static int OptionsInitialize(WPARAM wParam, LPARAM lParam) odp.pszTab = LPGEN("General");
odp.pfnDlgProc = DlgProcOptions1;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.position = 910000001;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS2);
odp.pszTab = LPGEN("Chat Log");
odp.pfnDlgProc = DlgProcOptions2;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
if (PopUpInstalled) {
odp.position = 910000002;
@@ -952,7 +952,7 @@ static int OptionsInitialize(WPARAM wParam, LPARAM lParam) odp.pszGroup = LPGEN("Popups");
odp.pszTab = NULL;
odp.pfnDlgProc = DlgProcOptionsPopup;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
}
diff --git a/plugins/ClientChangeNotify/OptDlg.cpp b/plugins/ClientChangeNotify/OptDlg.cpp index 95224fb672..164e51e795 100644 --- a/plugins/ClientChangeNotify/OptDlg.cpp +++ b/plugins/ClientChangeNotify/OptDlg.cpp @@ -183,7 +183,7 @@ int OptionsDlgInit(WPARAM wParam, LPARAM lParam) optDi.hInstance = g_hInstance;
optDi.ptszGroup = LPGENT("PopUps");
optDi.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&optDi);
+ Options_AddPage(wParam, &optDi);
return 0;
}
diff --git a/plugins/Clist/clcopts.c b/plugins/Clist/clcopts.c index 7e1fc9d3d9..51f9c8a08b 100644 --- a/plugins/Clist/clcopts.c +++ b/plugins/Clist/clcopts.c @@ -441,13 +441,13 @@ int ClcOptInit(WPARAM wParam, LPARAM lParam) odp.pszTitle = LPGEN("List");
odp.pfnDlgProc = DlgProcClcMainOpts;
odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLCBKG);
odp.pszTitle = LPGEN("List Background");
odp.pfnDlgProc = DlgProcClcBkgOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Clist/clistopts.c b/plugins/Clist/clistopts.c index 7aef5c297a..33e880e3fc 100644 --- a/plugins/Clist/clistopts.c +++ b/plugins/Clist/clistopts.c @@ -249,7 +249,7 @@ int CListOptInit(WPARAM wParam, LPARAM lParam) odp.nIDBottomSimpleControl = IDC_STCLISTGROUP;
odp.expertOnlyControls = expertOnlyControls;
odp.nExpertOnlyControls = SIZEOF(expertOnlyControls);
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Clist/cluiopts.c b/plugins/Clist/cluiopts.c index c101f0db8b..2094716a07 100644 --- a/plugins/Clist/cluiopts.c +++ b/plugins/Clist/cluiopts.c @@ -351,7 +351,7 @@ int CluiOptInit(WPARAM wParam, LPARAM lParam) odp.nIDBottomSimpleControl = IDC_STWINDOWGROUP;
odp.expertOnlyControls = expertOnlyControls;
odp.nExpertOnlyControls = SIZEOF(expertOnlyControls);
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SBAR);
odp.pszTitle = LPGEN("Status Bar");
@@ -360,7 +360,7 @@ int CluiOptInit(WPARAM wParam, LPARAM lParam) odp.nIDBottomSimpleControl = 0;
odp.nExpertOnlyControls = 0;
odp.expertOnlyControls = NULL;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Clist_modern/modern_clcopts.cpp b/plugins/Clist_modern/modern_clcopts.cpp index 91b3f15bf8..1fcf7dbb0b 100644 --- a/plugins/Clist_modern/modern_clcopts.cpp +++ b/plugins/Clist_modern/modern_clcopts.cpp @@ -286,7 +286,7 @@ int ClcOptInit(WPARAM wParam,LPARAM lParam) odp.ptszTitle=LPGENT("Contact List");
odp.pfnDlgProc=DlgProcClistListOpts;
odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- //CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ //Options_AddPage(wParam,&odp);
{
int i;
for (i=0; clist_opt_items[i].id!=0; i++)
@@ -297,7 +297,7 @@ int ClcOptInit(WPARAM wParam,LPARAM lParam) odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR|clist_opt_items[i].flag;
odp.expertOnlyControls = clist_opt_items[i].expertControls;
odp.nExpertOnlyControls = clist_opt_items[i].nExpertControls;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
}
}
@@ -309,7 +309,7 @@ int ClcOptInit(WPARAM wParam,LPARAM lParam) odp.ptszTab = LPGENT("List Background");
odp.pfnDlgProc = DlgProcClcBkgOpts;
odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
diff --git a/plugins/Clist_modern/modern_clistopts.cpp b/plugins/Clist_modern/modern_clistopts.cpp index 07092018a0..73c7c8c7e7 100644 --- a/plugins/Clist_modern/modern_clistopts.cpp +++ b/plugins/Clist_modern/modern_clistopts.cpp @@ -72,7 +72,7 @@ int CListOptInit(WPARAM wParam,LPARAM lParam) odp.ptszGroup=LPGENT("Contact List");
odp.ptszTitle=LPGENT("Row items");
odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- // CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ // Options_AddPage(wParam,&odp);
{
BOOL hasExtraIconsService = ServiceExists("ExtraIcon/Register");
@@ -85,7 +85,7 @@ int CListOptInit(WPARAM wParam,LPARAM lParam) odp.pszTemplate=MAKEINTRESOURCEA(row_opt_items[i].id);
odp.ptszTab=row_opt_items[i].name;
odp.pfnDlgProc=row_opt_items[i].wnd_proc;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
}
}
diff --git a/plugins/Clist_modern/modern_skinopt.cpp b/plugins/Clist_modern/modern_skinopt.cpp index adbbc6a895..021691db9f 100644 --- a/plugins/Clist_modern/modern_skinopt.cpp +++ b/plugins/Clist_modern/modern_skinopt.cpp @@ -65,7 +65,7 @@ int SkinOptInit( WPARAM wParam, LPARAM lParam ) odp.ptszTitle = LPGENT( "Contact List" );
odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
odp.ptszTab = LPGENT( "Load/Save" );
- CallService( MS_OPT_ADDPAGE, wParam, ( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
if ( ModernGetSettingByte( NULL, "ModernData", "EnableSkinEditor", SETTING_ENABLESKINEDITOR_DEFAULT ) )
{
@@ -73,7 +73,7 @@ int SkinOptInit( WPARAM wParam, LPARAM lParam ) odp.pfnDlgProc = DlgSkinEditorOpts;
odp.pszTemplate = MAKEINTRESOURCEA( IDD_OPT_SKINEDITOR );
odp.ptszTab = LPGENT( "Object Editor" );
- CallService( MS_OPT_ADDPAGE, wParam, ( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
}
}
return 0;
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp index 2c59d750f0..0c3e9e868b 100644 --- a/plugins/Clist_modern/modern_toolbar.cpp +++ b/plugins/Clist_modern/modern_toolbar.cpp @@ -298,7 +298,7 @@ static int ehhToolbarOptInit(WPARAM wParam, LPARAM lParam) odp.ptszTitle=LPGENT("ToolBar");
odp.pfnDlgProc=(DLGPROC)ToolBar_OptDlgProc;
odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
static INT_PTR svcToolBarAddButton(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/Clist_mw/BkgrCfg.cpp b/plugins/Clist_mw/BkgrCfg.cpp index c24974ccc7..b08a833aca 100644 --- a/plugins/Clist_mw/BkgrCfg.cpp +++ b/plugins/Clist_mw/BkgrCfg.cpp @@ -291,7 +291,7 @@ int OnOptionsInit(WPARAM wParam,LPARAM lParam) odp.pfnDlgProc = DlgProcBkgOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
diff --git a/plugins/Clist_mw/clcopts.cpp b/plugins/Clist_mw/clcopts.cpp index 32de8b13f6..f7567594b1 100644 --- a/plugins/Clist_mw/clcopts.cpp +++ b/plugins/Clist_mw/clcopts.cpp @@ -59,20 +59,20 @@ int ClcOptInit(WPARAM wParam,LPARAM lParam) odp.pszTitle = LPGEN("List");
odp.pfnDlgProc = DlgProcClcMainOpts;
odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
if (!ServiceExists(MS_BACKGROUNDCONFIG_REGISTER)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLCBKG);
odp.pszTitle = LPGEN("List Background");
odp.pfnDlgProc = DlgProcClcBkgOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
}
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_META_CLC);
odp.pszTitle = LPGEN("List MetaContacts");
odp.pfnDlgProc = DlgProcClcMetaOpts;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
if (!ServiceExists(MS_BACKGROUNDCONFIG_REGISTER))
{
@@ -80,7 +80,7 @@ int ClcOptInit(WPARAM wParam,LPARAM lParam) odp.pszTitle = LPGEN("StatusBar Background");
odp.pfnDlgProc = DlgProcStatusBarBkgOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
}
return 0;
diff --git a/plugins/Clist_mw/clistopts.cpp b/plugins/Clist_mw/clistopts.cpp index 947d68da69..508a356d45 100644 --- a/plugins/Clist_mw/clistopts.cpp +++ b/plugins/Clist_mw/clistopts.cpp @@ -48,7 +48,7 @@ int CListOptInit(WPARAM wParam,LPARAM lParam) odp.nIDBottomSimpleControl = IDC_STCLISTGROUP;
odp.expertOnlyControls = expertOnlyControls;
odp.nExpertOnlyControls = sizeof(expertOnlyControls)/sizeof(expertOnlyControls[0]);
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
diff --git a/plugins/Clist_mw/cluiopts.cpp b/plugins/Clist_mw/cluiopts.cpp index 33fc3abaf4..27c7a1defe 100644 --- a/plugins/Clist_mw/cluiopts.cpp +++ b/plugins/Clist_mw/cluiopts.cpp @@ -50,7 +50,7 @@ int CluiOptInit(WPARAM wParam,LPARAM lParam) odp.nIDBottomSimpleControl = IDC_STWINDOWGROUP;
odp.expertOnlyControls = expertOnlyControls;
odp.nExpertOnlyControls = sizeof(expertOnlyControls)/sizeof(expertOnlyControls[0]);
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SBAR);
odp.pszTitle = LPGEN("Status Bar");
odp.pfnDlgProc = DlgProcSBarOpts;
@@ -58,7 +58,7 @@ int CluiOptInit(WPARAM wParam,LPARAM lParam) odp.nIDBottomSimpleControl = 0;
odp.nExpertOnlyControls = 0;
odp.expertOnlyControls = NULL;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
diff --git a/plugins/Clist_nicer/SRC/clcopts.cpp b/plugins/Clist_nicer/SRC/clcopts.cpp index 0b59425f65..3a243e6084 100644 --- a/plugins/Clist_nicer/SRC/clcopts.cpp +++ b/plugins/Clist_nicer/SRC/clcopts.cpp @@ -1421,20 +1421,20 @@ int ClcOptInit(WPARAM wParam, LPARAM lParam) odp.pszTitle = LPGEN("Contact rows");
odp.pfnDlgProc = DlgProcDspProfiles;
odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FLOATING);
odp.pszTitle = LPGEN("Floating contacts");
odp.pfnDlgProc = DlgProcFloatingContacts;
odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT);
odp.pszGroup = LPGEN("Skins");
odp.pszTitle = LPGEN("Contact list");
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = OptionsDlgProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
odp.position = -1000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONSDIALOG);
@@ -1443,7 +1443,7 @@ int ClcOptInit(WPARAM wParam, LPARAM lParam) odp.pfnDlgProc = TabOptionsDlgProc;
odp.flags = ODPF_BOLDGROUPS;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Clist_nicer/SRC/clui.cpp b/plugins/Clist_nicer/SRC/clui.cpp index ed0c228011..03b9f7ab97 100644 --- a/plugins/Clist_nicer/SRC/clui.cpp +++ b/plugins/Clist_nicer/SRC/clui.cpp @@ -106,6 +106,34 @@ static HBITMAP hbmLockedPoint = 0, hbmOldLockedPoint = 0; HICON overlayicons[10];
+struct {
+ HICON hIcon, hAltIcon;
+ UINT idIcon, idAltIcon;
+ char *szIcoLibIcon, *szIcoLibAltIcon;
+ DWORD visibilityOrder;
+ TCHAR *szTooltip;
+}
+static top_buttons[] =
+{
+ { 0, 0, IDI_TBTOPMENU, 0, "CLN_topmenu", NULL, 1, LPGENT("Show menu") },
+ { 0, 0, IDI_HIDEOFFLINE, 0, "CLN_online", NULL, 2, LPGENT("Show / hide offline contacts") },
+ { 0, 0, IDI_HIDEGROUPS, 0, "CLN_groups", NULL, 4, LPGENT("Toggle group mode") },
+ { 0, 0, IDI_FINDANDADD, 0, "CLN_findadd", NULL, 8, LPGENT("Find and add contacts") },
+ { 0, 0, IDI_TBACCOUNTS, 0, "CLN_accounts", NULL, 8192, LPGENT("Accounts") },
+ { 0, 0, IDI_TBOPTIONS, 0, "CLN_options", NULL, 16, LPGENT("Open preferences") },
+ { 0, 0, IDI_SOUNDSON, IDI_SOUNDSOFF, "CLN_sound", "CLN_soundsoff", 32, LPGENT("Toggle sounds") },
+ { 0, 0, IDI_MINIMIZE, 0, "CLN_minimize", NULL, 64, LPGENT("Minimize contact list") },
+ { 0, 0, 0, 0, "CLN_topstatus", NULL, 128, LPGENT("Status menu") },
+ { 0, 0, IDI_TABSRMMSESSIONLIST, 0, "CLN_slist", NULL, 256, LPGENT("tabSRMM session list") },
+ { 0, 0, IDI_TABSRMMMENU, 0, "CLN_menu", NULL, 512, LPGENT("tabSRMM Menu") },
+
+ { 0, 0, IDI_CLVM_SELECT, 0, "CLN_CLVM_select", NULL, 1024, LPGENT("Select view mode") },
+ { 0, 0, IDI_CLVM_OPTIONS, 0, "CLN_CLVM_options", NULL, 2048, LPGENT("Setup view modes") },
+ { 0, 0, IDI_DELETE, 0, "CLN_CLVM_reset", NULL, 4096, LPGENT("Clear view mode") },
+
+ { 0, 0, IDI_MINIMIZE, 0, "", NULL, 0, LPGENT("Open main menu") }
+};
+
HWND hTbMenu, hTbGlobalStatus;
/*
diff --git a/plugins/Console/Console.c b/plugins/Console/Console.c index 877dc28c30..54bc0af80f 100644 --- a/plugins/Console/Console.c +++ b/plugins/Console/Console.c @@ -1196,7 +1196,7 @@ static int OptInit(WPARAM wParam,LPARAM lParam) odp.pfnDlgProc = OptDlgProc;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.expertOnlyControls = NULL;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/CountryFlags/extraimg.c b/plugins/CountryFlags/extraimg.c index 8484da05d1..43f2930848 100644 --- a/plugins/CountryFlags/extraimg.c +++ b/plugins/CountryFlags/extraimg.c @@ -388,7 +388,7 @@ static int ExtraImgOptInit(WPARAM wParam,LPARAM lParam) odp.pfnDlgProc=ExtraImgOptDlgProc;
odp.expertOnlyControls=expertOnlyControls;
odp.nExpertOnlyControls=SIZEOF(expertOnlyControls);
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
diff --git a/plugins/Db_autobackups/options.c b/plugins/Db_autobackups/options.c index acb6072718..06051a940a 100644 --- a/plugins/Db_autobackups/options.c +++ b/plugins/Db_autobackups/options.c @@ -354,7 +354,7 @@ int OptionsInit(WPARAM wParam, LPARAM lParam) odp.ptszGroup = LPGENT("Services");
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.pfnDlgProc = DlgProcOptions;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Dbx_mmap_SA/dialogs.c b/plugins/Dbx_mmap_SA/dialogs.c index eda06729d6..26c15790c6 100644 --- a/plugins/Dbx_mmap_SA/dialogs.c +++ b/plugins/Dbx_mmap_SA/dialogs.c @@ -59,7 +59,7 @@ static int OptionsInit(WPARAM wParam, LPARAM lParam) odp.ptszTitle = TranslateT("Database Features");
odp.ptszGroup = TranslateT("Services");
odp.pfnDlgProc = DlgProcOptions;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/ExternalAPI/m_updater.h b/plugins/ExternalAPI/m_updater.h index 488d3722ce..9f6a92b5e2 100644 --- a/plugins/ExternalAPI/m_updater.h +++ b/plugins/ExternalAPI/m_updater.h @@ -59,10 +59,6 @@ __inline static char *CreateVersionString(DWORD version, char *buf) { return buf;
}
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
__inline static char *CreateVersionStringPluginEx(PLUGININFOEX *pluginInfo, char *buf) {
return CreateVersionString(pluginInfo->version, buf);
}
diff --git a/plugins/ExtraIcons/extraicons.cpp b/plugins/ExtraIcons/extraicons.cpp index ea3f803a32..8479bccdbd 100644 --- a/plugins/ExtraIcons/extraicons.cpp +++ b/plugins/ExtraIcons/extraicons.cpp @@ -155,7 +155,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) upd.cpbBetaVersionPrefix = (int)strlen((char *) upd.pbBetaVersionPrefix);
upd.szBetaUpdateURL = "http://pescuma.org/miranda/extraicons.zip";
- upd.pbVersion = (BYTE *) CreateVersionStringPlugin((PLUGININFO*) &pluginInfo, szCurrentVersion);
+ upd.pbVersion = (BYTE *) CreateVersionStringPluginEx((PLUGININFOEX*) &pluginInfo, szCurrentVersion);
upd.cpbVersion = (int)strlen((char *) upd.pbVersion);
CallService(MS_UPDATE_REGISTER, 0, (LPARAM)&upd);
diff --git a/plugins/ExtraIcons/options.cpp b/plugins/ExtraIcons/options.cpp index 1d325d0e87..a47450a7fe 100644 --- a/plugins/ExtraIcons/options.cpp +++ b/plugins/ExtraIcons/options.cpp @@ -44,7 +44,7 @@ int InitOptionsCallback(WPARAM wParam, LPARAM lParam) odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index 77711caee3..0fb5757e54 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -297,7 +297,7 @@ int ProcessOptInitialise(WPARAM wParam, LPARAM lParam) odp.groupPosition = 910000000;
odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
odp.pfnDlgProc = OptionsDlgProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/FingerPrintModPlus/src/fingerprint.cpp b/plugins/FingerPrintModPlus/src/fingerprint.cpp index 429e9defb6..7ef43072b5 100644 --- a/plugins/FingerPrintModPlus/src/fingerprint.cpp +++ b/plugins/FingerPrintModPlus/src/fingerprint.cpp @@ -949,7 +949,7 @@ int OnOptInitialise(WPARAM wParam, LPARAM lParam) odp.ptszTitle = LPGENT("Fingerprint");
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/FloatingContacts/options.cpp b/plugins/FloatingContacts/options.cpp index f4c2c6371c..2779b22804 100644 --- a/plugins/FloatingContacts/options.cpp +++ b/plugins/FloatingContacts/options.cpp @@ -114,7 +114,7 @@ OnOptionsInitialize odp.ptszTab = _T("Main Features");
odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
odp.pfnDlgProc = (DLGPROC)OptWndProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
ZeroMemory(&odp, sizeof(odp));
odp.cbSize = sizeof(odp);
@@ -125,7 +125,7 @@ OnOptionsInitialize odp.ptszTab = _T("Appearance");
odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
odp.pfnDlgProc = (DLGPROC)OptSknWndProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Folders/hooked_events.cpp b/plugins/Folders/hooked_events.cpp index 78439bb3da..20ba19d4ec 100644 --- a/plugins/Folders/hooked_events.cpp +++ b/plugins/Folders/hooked_events.cpp @@ -80,7 +80,7 @@ int OnOptionsInitialize(WPARAM wParam, LPARAM lParam) odp.groupPosition = 910000000;
odp.flags=ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOpts;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
\ No newline at end of file diff --git a/plugins/Gender/options.cpp b/plugins/Gender/options.cpp index 32d919c020..cc9ab8d59f 100644 --- a/plugins/Gender/options.cpp +++ b/plugins/Gender/options.cpp @@ -161,7 +161,7 @@ int onOptInitialise(WPARAM wParam, LPARAM lParam) odp.ptszTitle = LPGENT("Gender");
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/HistoryLinkListPlus/linklist.c b/plugins/HistoryLinkListPlus/linklist.c index d6e3462d7f..bcf72add92 100644 --- a/plugins/HistoryLinkListPlus/linklist.c +++ b/plugins/HistoryLinkListPlus/linklist.c @@ -174,7 +174,7 @@ int InitOptionsDlg(WPARAM wParam, LPARAM lParam) optionsDialog.expertOnlyControls = NULL;
optionsDialog.nExpertOnlyControls = 0;
optionsDialog.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&optionsDialog);
+ Options_AddPage(wParam, (LPARAM)&optionsDialog);
return 0;
}
diff --git a/plugins/HistorySweeperLight/options.c b/plugins/HistorySweeperLight/options.c index eb32f12b83..601c768201 100644 --- a/plugins/HistorySweeperLight/options.c +++ b/plugins/HistorySweeperLight/options.c @@ -350,7 +350,7 @@ int HSOptInitialise(WPARAM wParam,LPARAM lParam) odp.pfnDlgProc = DlgProcHSOpts;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/IEView/Options.cpp b/plugins/IEView/Options.cpp index 9ab5bfe63c..4c1948d60e 100644 --- a/plugins/IEView/Options.cpp +++ b/plugins/IEView/Options.cpp @@ -434,14 +434,14 @@ int IEViewOptInit(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(tabPages[0].dlgId);
odp.pfnDlgProc = tabPages[0].dlgProc;
odp.ptszTab = tabPages[0].tabName;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.ptszGroup = _T("Skins");
odp.ptszTitle = _T("IEView");
for (i = 1; i < SIZEOF(tabPages); i++) {
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[i].dlgId);
odp.pfnDlgProc = tabPages[i].dlgProc;
odp.ptszTab = tabPages[i].tabName;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
}
diff --git a/plugins/IgnoreState/options.cpp b/plugins/IgnoreState/options.cpp index 685ad239b9..83ebefa587 100644 --- a/plugins/IgnoreState/options.cpp +++ b/plugins/IgnoreState/options.cpp @@ -275,7 +275,7 @@ int onOptInitialise(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_RATE_OPT);
odp.ptszTitle = _T(MODULENAME);
odp.pfnDlgProc = DlgProcOptions;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/KeyboardNotify/options.cpp b/plugins/KeyboardNotify/options.cpp index fe48da9162..c196a84ec3 100644 --- a/plugins/KeyboardNotify/options.cpp +++ b/plugins/KeyboardNotify/options.cpp @@ -176,7 +176,7 @@ int InitializeOptions(WPARAM wParam,LPARAM lParam) odp.flags=ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOptions;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE,wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/LangMan/options.cpp b/plugins/LangMan/options.cpp index a0c6aa70e0..bd3d421726 100644 --- a/plugins/LangMan/options.cpp +++ b/plugins/LangMan/options.cpp @@ -658,7 +658,7 @@ static int LangOptInit(WPARAM wParam, LPARAM lParam) // odp.ptszTab = _T("Language"); /* autotranslated, can be made a tab */
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_LANG);
odp.pfnDlgProc = LangOptDlgProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/ListeningTo/options.cpp b/plugins/ListeningTo/options.cpp index 3c93cf9855..babbbe7ebd 100644 --- a/plugins/ListeningTo/options.cpp +++ b/plugins/ListeningTo/options.cpp @@ -93,19 +93,19 @@ int InitOptionsCallback(WPARAM wParam,LPARAM lParam) odp.expertOnlyControls = optionsExpertControls;
odp.nExpertOnlyControls = MAX_REGS(optionsExpertControls);
odp.nIDBottomSimpleControl = IDC_LISTENING_G;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = TranslateT("Format");
odp.pfnDlgProc = FormatDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_FORMAT);
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = TranslateT("Players");
odp.pfnDlgProc = PlayersDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PLAYERS);
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
diff --git a/plugins/MenuItemEx/options.c b/plugins/MenuItemEx/options.c index 6b3944d0c2..70626f64d6 100644 --- a/plugins/MenuItemEx/options.c +++ b/plugins/MenuItemEx/options.c @@ -132,6 +132,6 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) odp.ptszGroup=_T("Customize");
odp.flags=ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam,&odp);
return 0;
}
diff --git a/plugins/MetaContacts/meta_services.c b/plugins/MetaContacts/meta_services.c index 92e503568d..e066ef8709 100644 --- a/plugins/MetaContacts/meta_services.c +++ b/plugins/MetaContacts/meta_services.c @@ -1859,21 +1859,21 @@ int Meta_OptInit(WPARAM wParam, LPARAM lParam) { odp.pszGroup = "Contact List";
odp.pszTab = "General";
odp.pfnDlgProc = DlgProcOpts;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCE(IDD_PRIORITIES);
odp.pszTitle = "MetaContacts";
odp.pszGroup = "Contact List";
odp.pszTab = "Priorities";
odp.pfnDlgProc = DlgProcOptsPriorities;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCE(IDD_HISTORY);
odp.pszTitle = "MetaContacts";
odp.pszGroup = "Contact List";
odp.pszTab = "History";
odp.pfnDlgProc = DlgProcOpts;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/NewAwaySysMod/AwayOpt.cpp b/plugins/NewAwaySysMod/AwayOpt.cpp index aa135f890d..dc8ed83d56 100644 --- a/plugins/NewAwaySysMod/AwayOpt.cpp +++ b/plugins/NewAwaySysMod/AwayOpt.cpp @@ -1764,7 +1764,7 @@ int OptsDlgInit(WPARAM wParam, LPARAM lParam) optDi.pfnDlgProc = PopupOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPOPTDLG);
optDi.ptszGroup = OPT_POPUPGROUP;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&optDi);
+ Options_AddPage(wParam, &optDi);
*/
// optDi.ptszTitle = OPT_TITLE;
optDi.ptszTitle = OPT_MAINGROUP;
@@ -1773,22 +1773,22 @@ int OptsDlgInit(WPARAM wParam, LPARAM lParam) optDi.pfnDlgProc = MessagesOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_MESSAGES);
optDi.ptszTab = LPGENT("Statuses messages");
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&optDi);
+ Options_AddPage(wParam, &optDi);
optDi.pfnDlgProc = MoreOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_MOREOPTDIALOG);
optDi.ptszTab = LPGENT("Main options");
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&optDi);
+ Options_AddPage(wParam, &optDi);
optDi.pfnDlgProc = AutoreplyOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_AUTOREPLY);
optDi.ptszTab = LPGENT("Autoreply");
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&optDi);
+ Options_AddPage(wParam, &optDi);
optDi.pfnDlgProc = ContactsOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACTSOPTDLG);
optDi.ptszTab = LPGENT("Contacts");
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&optDi);
+ Options_AddPage(wParam, &optDi);
return 0;
}
@@ -1799,34 +1799,6 @@ COptPage g_MsgTreePage(MOD_NAME, NULL); void InitOptions()
{
InitThemes();
- /*g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_USEPOPUPS, DB_POPUPNOTIFY, DBVT_BYTE, POPUP_DEF_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Edit(IDC_POPUPOPTDLG_POPUPFORMAT, "PopupsFormat", AWAY_MSGDATA_MAX, POPUP_DEF_POPUP_FORMAT, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_POPUPPREVIEW, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_VARS, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_EXTRATEXT, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Combobox(IDC_POPUPOPTDLG_LCLICK_ACTION, "PopupLClickAction", DBVT_BYTE, POPUP_DEF_LCLICKACTION, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Combobox(IDC_POPUPOPTDLG_RCLICK_ACTION, "PopupRClickAction", DBVT_BYTE, POPUP_DEF_RCLICKACTION, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_LCLICK, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_RCLICK, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Colourpicker(IDC_POPUPOPTDLG_BGCOLOUR, "PopupBGColour", POPUP_DEF_POPUP_BGCOLOUR, IDC_POPUPOPTDLG_DEFBGCOLOUR));
- g_PopupOptPage.Items.AddElem(new COptItem_Colourpicker(IDC_POPUPOPTDLG_TEXTCOLOUR, "PopupTextColour", POPUP_DEF_POPUP_TEXTCOLOUR, IDC_POPUPOPTDLG_DEFTEXTCOLOUR));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_DEFBGCOLOUR, "UseDefBGColour", DBVT_BYTE, POPUP_DEF_USEDEFBGCOLOUR, 0, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_DEFTEXTCOLOUR, "UseDefTextColour", DBVT_BYTE, POPUP_DEF_USEDEFTEXTCOLOUR, 0, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_BGCOLOUR, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_TEXTCOLOUR, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_ONLNOTIFY, "PopupNotify", DBVT_DWORD, POPUP_DEF_POPUPNOTIFYFLAGS, SF_ONL, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_AWAYNOTIFY, "PopupNotify", DBVT_DWORD, POPUP_DEF_POPUPNOTIFYFLAGS, SF_AWAY, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_NANOTIFY, "PopupNotify", DBVT_DWORD, POPUP_DEF_POPUPNOTIFYFLAGS, SF_NA, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_OCCNOTIFY, "PopupNotify", DBVT_DWORD, POPUP_DEF_POPUPNOTIFYFLAGS, SF_OCC, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_DNDNOTIFY, "PopupNotify", DBVT_DWORD, POPUP_DEF_POPUPNOTIFYFLAGS, SF_DND, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_FFCNOTIFY, "PopupNotify", DBVT_DWORD, POPUP_DEF_POPUPNOTIFYFLAGS, SF_FFC, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_OTHERNOTIFY, "PopupNotify", DBVT_DWORD, POPUP_DEF_POPUPNOTIFYFLAGS, SF_OTHER, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_IntEdit(IDC_POPUPOPTDLG_POPUPDELAY, "PopupDelay", DBVT_WORD, true, POPUP_DEF_POPUPDELAY, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_SEC, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_DEFAULT, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_INFINITE, IDC_POPUPOPTDLG_USEPOPUPS));
- g_PopupOptPage.Items.AddElem(new COptItem_Checkbox(IDC_POPUPOPTDLG_LOGONLYWITHPOPUP, "LogOnlyWithPopup", DBVT_BYTE, 0));*/
-
g_MessagesOptPage.Items.AddElem(new COptItem_Generic(IDC_MESSAGEDLG_VARS, IDC_MESSAGEDLG_MSGTREE));
g_MessagesOptPage.Items.AddElem(new COptItem_Generic(IDC_MESSAGEDLG_DEL));
g_MessagesOptPage.Items.AddElem(new COptItem_Generic(IDC_MESSAGEDLG_MSGTITLE));
diff --git a/plugins/NewXstatusNotify/indsnd.cpp b/plugins/NewXstatusNotify/indsnd.cpp index 1d5e06788a..27a8b9a02a 100644 --- a/plugins/NewXstatusNotify/indsnd.cpp +++ b/plugins/NewXstatusNotify/indsnd.cpp @@ -339,7 +339,7 @@ int UserInfoInitialise(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SOUNDS);
odp.pszTitle = LPGEN("Status Notify");
odp.pfnDlgProc = DlgProcSoundUIPage;
- CallService(MS_USERINFO_ADDPAGE, wParam, (LPARAM)&odp);
+ UserInfo_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/NewXstatusNotify/options.cpp b/plugins/NewXstatusNotify/options.cpp index 0bcf192351..193fb56884 100644 --- a/plugins/NewXstatusNotify/options.cpp +++ b/plugins/NewXstatusNotify/options.cpp @@ -1059,17 +1059,17 @@ int OptionsInitialize(WPARAM wParam, LPARAM lParam) odp.ptszTab = LPGENT("General");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GENERAL);
odp.pfnDlgProc = DlgProcGeneralOpts;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = LPGENT("Filtering");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FILTERS);
odp.pfnDlgProc = DlgProcFiltering;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = LPGENT("Message log");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_XLOG);
odp.pfnDlgProc = DlgProcXLogOpts;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
if (ServiceExists(MS_POPUP_ADDPOPUP))
{
@@ -1078,17 +1078,17 @@ int OptionsInitialize(WPARAM wParam, LPARAM lParam) odp.ptszTab = LPGENT("General");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP);
odp.pfnDlgProc = DlgProcPopUpOpts;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = LPGENT("Extra status");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_XPOPUP);
odp.pfnDlgProc = DlgProcXPopupOpts;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Status message");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SMPOPUP);
odp.pfnDlgProc = DlgProcSMPopupOpts;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
diff --git a/plugins/Nudge/options.cpp b/plugins/Nudge/options.cpp index 15bd1e224b..7d5f052c6d 100644 --- a/plugins/Nudge/options.cpp +++ b/plugins/Nudge/options.cpp @@ -20,14 +20,14 @@ int NudgeOptInit(WPARAM wParam,LPARAM lParam) odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
// odp.nIDBottomSimpleControl = IDC_STMSNGROUP;
odp.pfnDlgProc = DlgProcNudgeOpt;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
odp.position = -790000001;
odp.ptszTab = LPGENT("Window Shaking");
odp.pfnDlgProc = DlgProcShakeOpt;
odp.flags |= ODPF_EXPERTONLY;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SHAKE);
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/PackUpdater/Src/Options.cpp b/plugins/PackUpdater/Src/Options.cpp index 04045a3293..8c0d236aba 100644 --- a/plugins/PackUpdater/Src/Options.cpp +++ b/plugins/PackUpdater/Src/Options.cpp @@ -469,14 +469,14 @@ int OptInit(WPARAM wParam, LPARAM lParam) odp.ptszGroup = _T("Events");
odp.ptszTitle = _T("Pack Updater");
odp.pfnDlgProc = UpdateNotifyOptsProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
if (ServiceExists(MS_POPUP_ADDPOPUP))
{
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP);
odp.ptszGroup = _T("PopUps");
odp.ptszTitle = _T("Pack Updater");
odp.pfnDlgProc = DlgPopUpOpts;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
}
return 0;
}
\ No newline at end of file diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index de8ae07f58..f24b89f7e5 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -144,40 +144,40 @@ static int OptionsInitialize(WPARAM wParam,LPARAM lParam) odp.ptszTab = LPGENT("General");
odp.pfnDlgProc = DlgProcPopUpGeneral;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP_GENERAL);
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = LPGENT("Classes");
odp.pfnDlgProc = DlgProcOptsClasses;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NOTIFICATIONS);
- CallService( MS_OPT_ADDPAGE, wParam,(LPARAM)&odp );
+ Options_AddPage(wParam,&odp);
odp.ptszTab = LPGENT("Actions");
odp.pfnDlgProc = DlgProcPopupActions;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ACTIONS);
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = LPGENT("Contacts");
odp.pfnDlgProc = DlgProcContactOpts;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONTACTS);
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = LPGENT("Advanced");
odp.pfnDlgProc = DlgProcPopUpAdvOpts;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP_ADVANCED);
odp.flags |= ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszGroup = LPGENT("Skins");
odp.ptszTab = LPGENT(MODULNAME_PLU);
odp.pfnDlgProc = DlgProcPopSkinsOpts;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN2);
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
//Test page
//odp.ptszTab = LPGEN("General (old)");
//odp.pfnDlgProc = DlgProcPopUpOpts;
//odp.pszTemplate = MAKEINTRESOURCE(IDD_OPT_POPUP);
- //CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ //Options_AddPage(wParam,&odp);
return 0;
}
diff --git a/plugins/QuickMessages/options.c b/plugins/QuickMessages/options.c index 833c546262..4e269f1273 100644 --- a/plugins/QuickMessages/options.c +++ b/plugins/QuickMessages/options.c @@ -1164,6 +1164,6 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) odp.pszGroup=LPGEN("Plugins");
odp.flags=ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam,&odp);
return 0;
}
diff --git a/plugins/QuickReplies/options.cpp b/plugins/QuickReplies/options.cpp index 1c26b9c385..84ce88dc1c 100644 --- a/plugins/QuickReplies/options.cpp +++ b/plugins/QuickReplies/options.cpp @@ -205,7 +205,7 @@ int OnOptInitialized(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_PAGE);
odp.pfnDlgProc = DlgProcOptionsPage;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
\ No newline at end of file diff --git a/plugins/Rate/options.cpp b/plugins/Rate/options.cpp index 47714d6828..013945258f 100644 --- a/plugins/Rate/options.cpp +++ b/plugins/Rate/options.cpp @@ -218,7 +218,7 @@ int onOptInitialise(WPARAM wParam, LPARAM lParam) odp.pszTitle = Translate("Rate");
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/RecentContacts/options.cpp b/plugins/RecentContacts/options.cpp index c7922b2609..264b813d72 100644 --- a/plugins/RecentContacts/options.cpp +++ b/plugins/RecentContacts/options.cpp @@ -68,7 +68,7 @@ int onOptInitialise(WPARAM wParam, LPARAM lParam) odp.pszTitle = Translate(msLastUC_ShowListName);
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/SRMM/msgoptions.c b/plugins/SRMM/msgoptions.c index 3542902fb4..feb91e8266 100644 --- a/plugins/SRMM/msgoptions.c +++ b/plugins/SRMM/msgoptions.c @@ -593,19 +593,19 @@ static int OptInitialise(WPARAM wParam, LPARAM lParam) odp.pszTitle = LPGEN("Message Sessions");
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGLOG);
odp.pszTab = LPGEN("Messaging Log");
odp.pfnDlgProc = DlgProcLogOptions;
odp.nIDBottomSimpleControl = IDC_STMSGLOGGROUP;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGTYPE);
odp.pszTab = LPGEN("Typing Notify");
odp.pfnDlgProc = DlgProcTypeOptions;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Scriver/chat/options.c b/plugins/Scriver/chat/options.c index e58e1e824a..11ea14a12d 100644 --- a/plugins/Scriver/chat/options.c +++ b/plugins/Scriver/chat/options.c @@ -793,7 +793,7 @@ static int OptionsInitialize(WPARAM wParam, LPARAM lParam) odp.pfnDlgProc = DlgProcOptionsPopup;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.ptszTab = NULL;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
diff --git a/plugins/Scriver/msgoptions.c b/plugins/Scriver/msgoptions.c index 80358590f4..9dd1624540 100644 --- a/plugins/Scriver/msgoptions.c +++ b/plugins/Scriver/msgoptions.c @@ -1100,7 +1100,7 @@ int OptInitialise(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(tabPages[i].dlgId);
odp.pfnDlgProc = tabPages[i].dlgProc;
odp.pszTab = (char*)tabPages[i].tabName;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
}
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGTYPE);
@@ -1108,7 +1108,7 @@ int OptInitialise(WPARAM wParam, LPARAM lParam) odp.pszTitle = LPGEN("Typing Notify");
odp.pfnDlgProc = DlgProcTypeOptions;
odp.pszTab = NULL;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/SecureIM/options.cpp b/plugins/SecureIM/options.cpp index 3f84c98b10..93689874a9 100644 --- a/plugins/SecureIM/options.cpp +++ b/plugins/SecureIM/options.cpp @@ -1921,7 +1921,7 @@ int onRegisterOptions(WPARAM wParam, LPARAM) { odp.pszTitle = (char*)szModuleName;
odp.pszGroup = LPGEN("Services");
odp.pfnDlgProc = OptionsDlgProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/SecureIM/popupOptions.cpp b/plugins/SecureIM/popupOptions.cpp index 03776ea777..a295c8dac8 100644 --- a/plugins/SecureIM/popupOptions.cpp +++ b/plugins/SecureIM/popupOptions.cpp @@ -231,7 +231,7 @@ int onRegisterPopOptions(WPARAM wParam, LPARAM) { odp.pszTitle = (char*)szModuleName;
odp.pszGroup = Translate("Popups");
odp.pfnDlgProc = PopOptionsDlgProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/SeenPlugin/options.c b/plugins/SeenPlugin/options.c index af3c4f20f8..fc39a64a63 100644 --- a/plugins/SeenPlugin/options.c +++ b/plugins/SeenPlugin/options.c @@ -484,14 +484,14 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) odp.pszGroup="Services";
odp.pszTitle="Last seen";
odp.pfnDlgProc= OptsSettingsDlgProc;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam,&odp);
if (ServiceExists(MS_POPUP_ADDPOPUP))
{
odp.pszTemplate = MAKEINTRESOURCE(IDD_POPUPS);
odp.pszGroup = "PopUps";
odp.pszTitle = "Last seen";
odp.pfnDlgProc = OptsPopUpsDlgProc;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam,&odp);
}
return 0;
}
diff --git a/plugins/SeenPlugin/userinfo.c b/plugins/SeenPlugin/userinfo.c index bf23679ba9..442860bb86 100644 --- a/plugins/SeenPlugin/userinfo.c +++ b/plugins/SeenPlugin/userinfo.c @@ -89,7 +89,7 @@ int UserinfoInit(WPARAM wparam,LPARAM lparam) uip.pszTemplate=MAKEINTRESOURCE(IDD_USERINFO);
uip.pszTitle="Last seen";
uip.pfnDlgProc=UserinfoDlgProc;
- CallService(MS_USERINFO_ADDPAGE,wparam,(LPARAM)&uip);
+ UserInfo_AddPage(wparam, &uip);
}
return 0;
}
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp index b52e2d92d7..ccdf23c1ff 100644 --- a/plugins/Sessions/Src/Options.cpp +++ b/plugins/Sessions/Src/Options.cpp @@ -567,6 +567,6 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) odp.ptszGroup=LPGENT("Message Sessions");
odp.flags=ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam,&odp);
return 0;
}
\ No newline at end of file diff --git a/plugins/SimpleAR/Src/Options.cpp b/plugins/SimpleAR/Src/Options.cpp index 1f91c39220..78e4161a86 100644 --- a/plugins/SimpleAR/Src/Options.cpp +++ b/plugins/SimpleAR/Src/Options.cpp @@ -158,6 +158,6 @@ INT OptInit(WPARAM wParam,LPARAM lParam) odp.flags=ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.nIDBottomSimpleControl=0;
odp.pfnDlgProc=DlgProcOpts;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
\ No newline at end of file diff --git a/plugins/SimpleStatusMsg/options.cpp b/plugins/SimpleStatusMsg/options.cpp index b67583776b..dac11ff175 100644 --- a/plugins/SimpleStatusMsg/options.cpp +++ b/plugins/SimpleStatusMsg/options.cpp @@ -1722,7 +1722,7 @@ int InitOptions(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_STATUS);
odp.pfnDlgProc = DlgStatusOptionsProc;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
if (accounts->statusMsgCount == 0)
@@ -1735,18 +1735,18 @@ int InitOptions(WPARAM wParam, LPARAM lParam) odp.ptszTab = LPGENT("General");
odp.pfnDlgProc = DlgOptionsProc;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Variables");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_VARIABLES);
odp.pfnDlgProc = DlgVariablesOptionsProc;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ADVANCED);
odp.pfnDlgProc = DlgAdvancedOptionsProc;
odp.flags |= ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/SmileyAdd/options.cpp b/plugins/SmileyAdd/options.cpp index e2b63f3be9..b540b15b35 100644 --- a/plugins/SmileyAdd/options.cpp +++ b/plugins/SmileyAdd/options.cpp @@ -73,7 +73,7 @@ int SmileysOptionsInitialize(WPARAM addInfo, LPARAM) odp.pszGroup = "Customize";
odp.pfnDlgProc = DlgProcSmileysOptions;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, addInfo, (LPARAM)&odp);
+ Options_AddPage( addInfo, &odp);
return 0;
}
diff --git a/plugins/SpellChecker/options.cpp b/plugins/SpellChecker/options.cpp index cf9f6c3058..015cfc893c 100644 --- a/plugins/SpellChecker/options.cpp +++ b/plugins/SpellChecker/options.cpp @@ -78,7 +78,7 @@ int InitOptionsCallback(WPARAM wParam,LPARAM lParam) odp.nIDBottomSimpleControl = IDC_SPELL_CHECKER;
odp.expertOnlyControls = optionsExpertControls;
odp.nExpertOnlyControls = MAX_REGS(optionsExpertControls);
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
ZeroMemory(&odp,sizeof(odp));
odp.cbSize=sizeof(odp);
@@ -89,7 +89,7 @@ int InitOptionsCallback(WPARAM wParam,LPARAM lParam) odp.pfnDlgProc = AutoreplaceDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_REPLACEMENTS);
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp index b400eca26d..1ed7c5e9e8 100644 --- a/plugins/SplashScreen/src/options.cpp +++ b/plugins/SplashScreen/src/options.cpp @@ -443,6 +443,6 @@ int OptInit(WPARAM wParam, LPARAM lParam) odp.ptszTitle = _T("Splash Screen");
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_TCHAR | ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp index 7266bf5aaa..29b17ac44c 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp @@ -548,6 +548,6 @@ int AutoAwayOptInitialise(WPARAM wParam,LPARAM lParam) odp.pszGroup = LPGEN("Status");
odp.pfnDlgProc = DlgProcAutoAwayTabs;
odp.flags = ODPF_BOLDGROUPS;
- CallService( MS_OPT_ADDPAGE, wParam, (LPARAM)&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp index b434f592ca..ba6cf472d5 100644 --- a/plugins/StatusPlugins/KeepStatus/options.cpp +++ b/plugins/StatusPlugins/KeepStatus/options.cpp @@ -590,7 +590,7 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABS);
odp.pfnDlgProc = DlgProcKsTabs;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam,&odp);
if ( ServiceExists( MS_POPUP_ADDPOPUP )) {
ZeroMemory(&odp,sizeof(odp));
@@ -603,7 +603,7 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) odp.pszTitle = LPGEN("KeepStatus");
odp.pfnDlgProc = PopupOptDlgProc;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam,&odp);
}
return 0;
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index 992fe13701..9227ae7f62 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -938,12 +938,12 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) odp.pszTab = LPGEN("General");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_STARTUPSTATUS);
odp.pfnDlgProc = StartupStatusOptDlgProc;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam,&odp);
odp.pszTab = LPGEN("Status Profiles");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_STATUSPROFILES);
odp.pfnDlgProc = StatusProfilesOptDlgProc;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam,&odp);
return 0;
}
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index f857560c8c..8a3ab3e92e 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -202,18 +202,18 @@ MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l) odp.ptszTab = _T("Main");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MAIN);
odp.pfnDlgProc = MainDlgProc;
- CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp);
+ Options_AddPage( w, &odp);
odp.ptszTab = _T("Messages");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MESSAGES);
odp.pfnDlgProc = MessagesDlgProc;
- CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp);
+ Options_AddPage( w, &odp);
odp.ptszTab = _T("Protocols");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PROTO);
odp.pfnDlgProc = ProtoDlgProc;
- CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp);
+ Options_AddPage( w, &odp);
return 0;
}
diff --git a/plugins/Svc_crshdmp/crshdmp.cpp b/plugins/Svc_crshdmp/crshdmp.cpp index fb71d68807..919171c7f0 100644 --- a/plugins/Svc_crshdmp/crshdmp.cpp +++ b/plugins/Svc_crshdmp/crshdmp.cpp @@ -207,7 +207,7 @@ int OptionsInit(WPARAM wParam, LPARAM) odp.pszGroup = LPGEN("Services");
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOptions;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Svc_crshdmp/dumper.cpp b/plugins/Svc_crshdmp/dumper.cpp index bce015016b..bae091a023 100644 --- a/plugins/Svc_crshdmp/dumper.cpp +++ b/plugins/Svc_crshdmp/dumper.cpp @@ -231,13 +231,13 @@ static void GetPluginsString(bkstring& buffer, unsigned& flags) continue;
}
- PLUGININFO* pi = GetMirInfo(hModule);
+ PLUGININFOEX* pi = GetMirInfo(hModule);
if (pi != NULL)
{
TCHAR timebuf[30] = TEXT("");
GetLastWriteTime(&FindFileData.ftLastWriteTime, timebuf, 30);
- bool ep = (size_t)pi->cbSize > sizeof(PLUGININFO);
+ bool ep = (size_t)pi->cbSize > sizeof(PLUGININFOEX);
const TCHAR *unica = (ep && ((PLUGININFOEX*)pi)->flags & 1) ? TEXT("|Unicode aware|") : TEXT("");
ListItem* lst = new ListItem;
@@ -702,7 +702,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHA if (crashpos != 0)
{
HMODULE hModule = (HMODULE)Module.BaseOfImage;
- PLUGININFO *pi = GetMirInfo(hModule);
+ PLUGININFOEX *pi = GetMirInfo(hModule);
if (pi != NULL)
{
diff --git a/plugins/Svc_crshdmp/utils.cpp b/plugins/Svc_crshdmp/utils.cpp index e60893ecf5..d4dced7d70 100644 --- a/plugins/Svc_crshdmp/utils.cpp +++ b/plugins/Svc_crshdmp/utils.cpp @@ -360,14 +360,13 @@ void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, DWORD dwSize) GetLastWriteTime(&FindFileData.ftLastWriteTime, lpszString, dwSize);
}
+typedef PLUGININFOEX * (__cdecl * Miranda_Plugin_Info) (DWORD mirandaVersion);
-typedef PLUGININFO * (__cdecl * Miranda_Plugin_Info) (DWORD mirandaVersion);
-
-PLUGININFO* GetMirInfo(HMODULE hModule)
+PLUGININFOEX* GetMirInfo(HMODULE hModule)
{
Miranda_Plugin_Info bpi = (Miranda_Plugin_Info)GetProcAddress(hModule, "MirandaPluginInfoEx");
- if (bpi == NULL) bpi = (Miranda_Plugin_Info)GetProcAddress(hModule, "MirandaPluginInfo");
- if (bpi == NULL) return NULL;
+ if (bpi == NULL)
+ return NULL;
return bpi(mirandaVersion);
}
diff --git a/plugins/Svc_crshdmp/utils.h b/plugins/Svc_crshdmp/utils.h index 6c03552db7..9089f57571 100644 --- a/plugins/Svc_crshdmp/utils.h +++ b/plugins/Svc_crshdmp/utils.h @@ -147,7 +147,7 @@ void StoreStringToClip(bkstring& buffer); void ShowMessage(int type, const TCHAR* format, ...);
bool IsPluginEnabled(TCHAR* filename);
-PLUGININFO* GetMirInfo(HMODULE hModule);
+PLUGININFOEX* GetMirInfo(HMODULE hModule);
const PLUGININFOEX* GetPluginInfoEx(void);
void CreateMiniDump (HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr);
diff --git a/plugins/Svc_dbepp/options.cpp b/plugins/Svc_dbepp/options.cpp index 741796ca25..b149e7f41f 100644 --- a/plugins/Svc_dbepp/options.cpp +++ b/plugins/Svc_dbepp/options.cpp @@ -92,7 +92,7 @@ INT OptInit(WPARAM wParam,LPARAM lParam) odp.pfnDlgProc = DlgProcOpts;
odp.flags = ODPF_BOLDGROUPS;
odp.expertOnlyControls=NULL;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
\ No newline at end of file diff --git a/plugins/Svc_vi/hooked_events.cpp b/plugins/Svc_vi/hooked_events.cpp index 3a9dfa3ce2..7645bf83bc 100644 --- a/plugins/Svc_vi/hooked_events.cpp +++ b/plugins/Svc_vi/hooked_events.cpp @@ -91,7 +91,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam) odp.expertOnlyControls = uiExpertOnlyControls;
odp.nExpertOnlyControls = 2;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
\ No newline at end of file diff --git a/plugins/Svc_vi/utils.cpp b/plugins/Svc_vi/utils.cpp index 9a29b45fdf..9be552c8cc 100644 --- a/plugins/Svc_vi/utils.cpp +++ b/plugins/Svc_vi/utils.cpp @@ -237,26 +237,23 @@ PLUGININFOEX *CopyPluginInfo(PLUGININFOEX *piSrc) else
pi->uuid = UUID_NULL;
- if (piSrc->cbSize >= sizeof(PLUGININFO)) {
- if(pi->author) pi->author = _strdup(pi->author);
- if(pi->authorEmail) pi->authorEmail = _strdup(pi->authorEmail);
- if(pi->copyright) pi->copyright = _strdup(pi->copyright);
- if(pi->description) pi->description = _strdup(pi->description);
- if(pi->homepage) pi->homepage = _strdup(pi->homepage);
- if(pi->shortName) pi->shortName = _strdup(pi->shortName);
- }
-
+ if (pi->author) pi->author = _strdup(pi->author);
+ if (pi->authorEmail) pi->authorEmail = _strdup(pi->authorEmail);
+ if (pi->copyright) pi->copyright = _strdup(pi->copyright);
+ if (pi->description) pi->description = _strdup(pi->description);
+ if (pi->homepage) pi->homepage = _strdup(pi->homepage);
+ if (pi->shortName) pi->shortName = _strdup(pi->shortName);
return pi;
}
void FreePluginInfo(PLUGININFOEX *pi)
{
- if(pi->author) free(pi->author);
- if(pi->authorEmail) free(pi->authorEmail);
- if(pi->copyright) free(pi->copyright);
- if(pi->description) free(pi->description);
- if(pi->homepage) free(pi->homepage);
- if(pi->shortName) free(pi->shortName);
+ if (pi->author) free(pi->author);
+ if (pi->authorEmail) free(pi->authorEmail);
+ if (pi->copyright) free(pi->copyright);
+ if (pi->description) free(pi->description);
+ if (pi->homepage) free(pi->homepage);
+ if (pi->shortName) free(pi->shortName);
free(pi);
}
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 4e0cbd275a..61279c2eb9 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -1289,46 +1289,46 @@ static int OptInitialise(WPARAM wParam, LPARAM lParam) odp.nIDBottomSimpleControl = 0;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.ptszTab = TranslateT("General");
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = TranslateT("Tabs and layout");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABBEDMSG);
odp.pfnDlgProc = DlgProcTabbedOptions;
- CallService(MS_OPT_ADDPAGE, wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = TranslateT("Containers");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONTAINERS);
odp.pfnDlgProc = DlgProcContainerSettings;
- CallService(MS_OPT_ADDPAGE, wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = TranslateT("Message log");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGLOG);
odp.pfnDlgProc = DlgProcLogOptions;
- CallService(MS_OPT_ADDPAGE, wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = TranslateT("Tool bar");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TOOLBAR);
odp.pfnDlgProc = DlgProcToolBar;
- CallService(MS_OPT_ADDPAGE, wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszTab = TranslateT("Advanced tweaks");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_PLUS);
odp.pfnDlgProc = PlusOptionsProc;
- CallService(MS_OPT_ADDPAGE, wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
odp.ptszGroup = LPGENT("Message Sessions");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGTYPE);
odp.ptszTitle = LPGENT("Typing Notify");
odp.pfnDlgProc = DlgProcTypeOptions;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP_OPT);
odp.ptszTitle = LPGENT("Event notifications");
odp.ptszGroup = LPGENT("PopUps");
odp.pfnDlgProc = DlgProcPopupOpts;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
@@ -1338,13 +1338,13 @@ static int OptInitialise(WPARAM wParam, LPARAM lParam) odp.pfnDlgProc = DlgProcSkinOpts;
odp.nIDBottomSimpleControl = 0;
odp.ptszGroup = LPGENT("Skins");
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_TABCONFIG);
odp.ptszTab = TranslateT("Window layout tweaks");
odp.pfnDlgProc = DlgProcTabConfig;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
/* group chats */
@@ -1353,25 +1353,25 @@ static int OptInitialise(WPARAM wParam, LPARAM lParam) odp.ptszTitle = LPGENT("Group Chats");
odp.ptszTab = TranslateT("Settings");
odp.pfnDlgProc = DlgProcOptions1;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS2);
odp.ptszTab = TranslateT("Log formatting");
odp.pfnDlgProc = DlgProcOptions2;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS3);
odp.ptszTab = TranslateT("Events and filters");
odp.pfnDlgProc = DlgProcOptions3;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS4);
odp.ptszTab = TranslateT("Highlighting");
odp.pfnDlgProc = CMUCHighlight::dlgProc;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 4a892a9390..f68973c42d 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -508,7 +508,7 @@ int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam) odp.groupPosition = 910000000;
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOpts;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
}
return 0;
}
diff --git a/plugins/TipperYM/options.cpp b/plugins/TipperYM/options.cpp index cf763bd861..29624e2b3a 100644 --- a/plugins/TipperYM/options.cpp +++ b/plugins/TipperYM/options.cpp @@ -2430,14 +2430,14 @@ int OptInit(WPARAM wParam, LPARAM lParam) odp.ptszGroup = LPGENT("Customize");
odp.nIDBottomSimpleControl = 0;
odp.pfnDlgProc = DlgProcOptsAppearance;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
odp.ptszTab = LPGENT("Tooltips");
odp.ptszGroup = LPGENT("Skins");
odp.nIDBottomSimpleControl = 0;
odp.pfnDlgProc = DlgProcOptsSkin;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONTENT);
odp.ptszTab = LPGENT("Content");
@@ -2445,7 +2445,7 @@ int OptInit(WPARAM wParam, LPARAM lParam) odp.ptszGroup = LPGENT("Customize");
odp.nIDBottomSimpleControl = 0;
odp.pfnDlgProc = DlgProcOptsContent;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TRAYTIP);
odp.ptszTab = LPGENT("Tray tooltip");
@@ -2454,14 +2454,14 @@ int OptInit(WPARAM wParam, LPARAM lParam) odp.nIDBottomSimpleControl = 0;
odp.pfnDlgProc = DlgProcOptsTraytip;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_EXTRA);
odp.ptszTab = LPGENT("Extra");
odp.ptszTitle = LPGENT("Tooltips");
odp.ptszGroup = LPGENT("Customize");
odp.nIDBottomSimpleControl = 0;
odp.pfnDlgProc = DlgProcOptsExtra;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index d4864c96d5..88ab42b740 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -309,7 +309,7 @@ int CTooltipNotify::InitializeOptions(WPARAM wParam, LPARAM lParam) odp.groupPosition = 910000000;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.pfnDlgProc = CTooltipNotify::OptionsDlgProcWrapper;
- ::CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ ::Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp index f7161fa6ca..4d6ab5916d 100644 --- a/plugins/TopToolBar/ttbopt.cpp +++ b/plugins/TopToolBar/ttbopt.cpp @@ -511,7 +511,7 @@ int TTBOptInit(WPARAM wParam, LPARAM lParam) odp.pszTitle = LPGEN("TTBBackground");
odp.pfnDlgProc = DlgProcTTBBkgOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
odp.position = -1000000000;
@@ -520,6 +520,6 @@ int TTBOptInit(WPARAM wParam, LPARAM lParam) odp.pszTitle = LPGEN("Buttons");
odp.pfnDlgProc = ButOrderOpts;
odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Updater/options.cpp b/plugins/Updater/options.cpp index 1c4545d76e..03acb47c00 100644 --- a/plugins/Updater/options.cpp +++ b/plugins/Updater/options.cpp @@ -384,7 +384,7 @@ int OptInit(WPARAM wParam,LPARAM lParam) odp.ptszGroup = LPGENT("Services");
odp.nIDBottomSimpleControl = 0;
odp.pfnDlgProc = DlgProcOpts1;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Updater/scan.cpp b/plugins/Updater/scan.cpp index ddae89dc43..2144f80fbc 100644 --- a/plugins/Updater/scan.cpp +++ b/plugins/Updater/scan.cpp @@ -1,7 +1,6 @@ #include "common.h"
#include "scan.h"
-typedef PLUGININFO * (__cdecl * Miranda_Plugin_Info) ( DWORD mirandaVersion );
typedef PLUGININFOEX * (__cdecl * Miranda_Plugin_Info_Ex) ( DWORD mirandaVersion );
struct AlternateShortName
@@ -56,10 +55,9 @@ void ScanPlugins(FilenameMap *fn_map, UpdateList *update_list) TCHAR plugins_folder[MAX_PATH], dll_path[MAX_PATH];
TCHAR *dll_name;
- Miranda_Plugin_Info dll_info_func;
Miranda_Plugin_Info_Ex dll_info_func_ex;
DWORD mirandaVersion = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0);
- PLUGININFO *pluginInfo;
+ PLUGININFOEX *pluginInfo;
GetRootDir(plugins_folder);
_tcscat(plugins_folder, _T("\\Plugins"));
@@ -92,9 +90,8 @@ void ScanPlugins(FilenameMap *fn_map, UpdateList *update_list) }
if (hModule)
{
- dll_info_func = (Miranda_Plugin_Info)GetProcAddress(hModule, "MirandaPluginInfo");
dll_info_func_ex = (Miranda_Plugin_Info_Ex)GetProcAddress(hModule, "MirandaPluginInfoEx");
- if ((dll_info_func_ex && (pluginInfo = (PLUGININFO *)dll_info_func_ex(mirandaVersion))) || (dll_info_func && (pluginInfo = dll_info_func(mirandaVersion))))
+ if (dll_info_func_ex && (pluginInfo = (PLUGININFOEX*)dll_info_func_ex(mirandaVersion)) != NULL)
{
// *** This is a dodgy and unfair hack...
// In order to disable new plugins that may be unintentionally installed with an update,
@@ -254,10 +251,9 @@ bool RearrangeDllsWorker(char *shortName, StrList &filenames, TCHAR *basedir) TCHAR file_path[MAX_PATH];
- Miranda_Plugin_Info dll_info_func;
Miranda_Plugin_Info_Ex dll_info_func_ex;
DWORD mirandaVersion = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0);
- PLUGININFO *pluginInfo;
+ PLUGININFOEX *pluginInfo;
HMODULE hModule;
// add filemask
@@ -272,9 +268,8 @@ bool RearrangeDllsWorker(char *shortName, StrList &filenames, TCHAR *basedir) mir_sntprintf(file_path, SIZEOF(file_path), _T("%s\\%s"), basedir, findData.cFileName);
if (valDllName(findData.cFileName) && (hModule = LoadLibrary(file_path)))
{
- dll_info_func = (Miranda_Plugin_Info)GetProcAddress(hModule, "MirandaPluginInfo");
dll_info_func_ex = (Miranda_Plugin_Info_Ex)GetProcAddress(hModule, "MirandaPluginInfoEx");
- if ((dll_info_func_ex && (pluginInfo = (PLUGININFO *)dll_info_func_ex(mirandaVersion))) || (dll_info_func && (pluginInfo = dll_info_func(mirandaVersion))))
+ if (dll_info_func_ex && (pluginInfo = (PLUGININFOEX *)dll_info_func_ex(mirandaVersion)) != NULL)
{
bool found = !_stricmp(pluginInfo->shortName, shortName);
if (!found)
diff --git a/plugins/Updater/services.cpp b/plugins/Updater/services.cpp index 3b11ddf850..21aaa4552e 100644 --- a/plugins/Updater/services.cpp +++ b/plugins/Updater/services.cpp @@ -514,7 +514,7 @@ INT_PTR GetUpdateOptions(WPARAM wParam, LPARAM lParam) { return found ? 0 : 1;
}
-bool RegisterForFileListing(int file_id, PLUGININFO *pluginInfo, bool auto_register)
+bool RegisterForFileListing(int file_id, PLUGININFOEX *pluginInfo, bool auto_register)
{
return RegisterForFileListing(file_id, pluginInfo->shortName, pluginInfo->version, auto_register, MC_PLUGINS);
}
@@ -739,7 +739,7 @@ INT_PTR Register(WPARAM wParam, LPARAM lParam) { INT_PTR RegisterFL(WPARAM wParam, LPARAM lParam) {
int file_id = (INT_PTR)wParam;
- PLUGININFO *pluginInfo = (PLUGININFO *)lParam;
+ PLUGININFOEX *pluginInfo = (PLUGININFOEX *)lParam;
// remove registered plugin if already there
EnterCriticalSection(&list_cs);
diff --git a/plugins/Updater/services.h b/plugins/Updater/services.h index 0bbac4d94a..ce4a2dc574 100644 --- a/plugins/Updater/services.h +++ b/plugins/Updater/services.h @@ -68,7 +68,7 @@ INT_PTR EnumerateUpdates(WPARAM wParam, LPARAM lParam); ////////////////////////////
bool IsRegistered(int file_id);
-bool RegisterForFileListing(int file_id, PLUGININFO *pluginInfo, bool auto_register);
+bool RegisterForFileListing(int file_id, PLUGININFOEX *pluginInfo, bool auto_register);
bool RegisterForFileListing(int file_id, const char *fl_name, DWORD version, bool auto_register, const Category cat);
void InitServices();
diff --git a/plugins/UserInfoEx/classPsTree.cpp b/plugins/UserInfoEx/classPsTree.cpp index 55e4fbcd77..ac88130d17 100644 --- a/plugins/UserInfoEx/classPsTree.cpp +++ b/plugins/UserInfoEx/classPsTree.cpp @@ -134,26 +134,21 @@ INT CPsTree::AddDummyItem(LPCSTR pszGroup) if (mir_stricmp(pszGroup, TREE_ROOTITEM))
{
CPsHdr psh;
- OPTIONSDIALOGPAGE odp;
- INT rc;
-
psh._hContact = _pPs->hContact;
psh._pszProto = _pPs->pszProto;
psh._hImages = _hImages;
psh._pPages = _pItems;
psh._numPages = _numItems;
- ZeroMemory(&odp, sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.hInstance = ghInst;
odp.flags = ODPF_TCHAR;
odp.ptszTitle = mir_utf8decodeT(pszGroup);
- rc = CallService(MS_USERINFO_ADDPAGE, (WPARAM)&psh, (LPARAM)&odp);
+ INT_PTR rc = UserInfo_AddPage((WPARAM)&psh, &odp);
mir_free(odp.ptszTitle);
-
- if (!rc)
- {
+ if (!rc) {
_pItems = psh._pPages;
_numItems = psh._numPages;
return _numItems - 1;
diff --git a/plugins/UserInfoEx/dlg_propsheet.cpp b/plugins/UserInfoEx/dlg_propsheet.cpp index cefb8e777e..0b9db512cd 100644 --- a/plugins/UserInfoEx/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/dlg_propsheet.cpp @@ -43,6 +43,8 @@ Last change by : $Author: ing.u.horn $ #include <m_protocols.h>
#include <m_icq.h>
+#define OPTIONPAGE_OLD_SIZE (offsetof(OPTIONSDIALOGPAGE, hLangpack))
+
#define UPDATEANIMFRAMES 20
// internal dialog message handler
@@ -389,13 +391,9 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam) // check size of the handled structures
if (pPsh == NULL || odp == NULL || pPsh->_dwSize != sizeof(CPsHdr))
- {
return 1;
- }
- if (odp->cbSize != sizeof(OPTIONSDIALOGPAGE) &&
- odp->cbSize != OPTIONPAGE_OLD_SIZE2 &&
- odp->cbSize != OPTIONPAGE_OLD_SIZE3)
- {
+
+ if (odp->cbSize != sizeof(OPTIONSDIALOGPAGE) && odp->cbSize != OPTIONPAGE_OLD_SIZE) {
MsgErr(NULL, LPGENT("The Page to add has invalid size %d bytes!"), odp->cbSize);
return 1;
}
@@ -403,34 +401,28 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam) // try to check whether the flag member is initialized or not
odp->flags = odp->flags > (ODPF_UNICODE|ODPF_BOLDGROUPS|ODPF_ICON|PSPF_PROTOPREPENDED) ? 0 : odp->flags;
- if (pPsh->_dwFlags & (PSF_PROTOPAGESONLY|PSF_PROTOPAGESONLY_INIT))
- {
+ if (pPsh->_dwFlags & (PSF_PROTOPAGESONLY|PSF_PROTOPAGESONLY_INIT)) {
BOOLEAN bIsUnicode = (odp->flags & ODPF_UNICODE) == ODPF_UNICODE;
TCHAR* ptszTitle = bIsUnicode ? mir_tstrdup(odp->ptszTitle) : mir_a2t(odp->pszTitle);
// avoid adding pages for a meta subcontact, which have been added for a metacontact.
- if (pPsh->_dwFlags & PSF_PROTOPAGESONLY)
- {
- if (pPsh->_ignore.getIndex(ptszTitle) != -1)
- {
+ if (pPsh->_dwFlags & PSF_PROTOPAGESONLY) {
+ if (pPsh->_ignore.getIndex(ptszTitle) != -1) {
mir_free(ptszTitle);
return 0;
}
}
// init ignore list with pages added by metacontact
else if (pPsh->_dwFlags & PSF_PROTOPAGESONLY_INIT)
- {
pPsh->_ignore.insert(mir_tstrdup(ptszTitle));
- }
+
mir_free(ptszTitle);
}
// create the new tree item
CPsTreeItem *pNew = new CPsTreeItem();
- if (pNew)
- {
- if (pNew->Create(pPsh, odp))
- {
+ if (pNew) {
+ if (pNew->Create(pPsh, odp)) {
MIR_DELETE(pNew);
return 1;
}
@@ -715,7 +707,7 @@ VOID DlgContactInfoLoadModule() ghDetailsInitEvent = CreateHookableEvent(ME_USERINFO_INITIALISE);
myCreateServiceFunction(MS_USERINFO_SHOWDIALOG, ShowDialog);
- myCreateServiceFunction(MS_USERINFO_ADDPAGE, AddPage);
+ myCreateServiceFunction("UserInfo/AddPage", AddPage);
HookEvent(ME_DB_CONTACT_DELETED, OnDeleteContact);
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
diff --git a/plugins/UserInfoEx/psp_options.cpp b/plugins/UserInfoEx/psp_options.cpp index cb82943643..d399f82c57 100644 --- a/plugins/UserInfoEx/psp_options.cpp +++ b/plugins/UserInfoEx/psp_options.cpp @@ -1527,28 +1527,28 @@ static INT OnInitOptions(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_COMMON);
odp.pfnDlgProc = DlgProc_CommonOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
// Advanced page
odp.pszTab = LPGEN("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ADVANCED);
odp.pfnDlgProc = DlgProc_AdvancedOpts;
odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
// Details Dialog page
odp.pszTab = LPGEN("Details Dialog");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_DETAILSDLG);
odp.pfnDlgProc = DlgProc_DetailsDlgOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
// Reminder page
odp.pszTab = LPGEN("Reminder");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_REMINDER);
odp.pfnDlgProc = DlgProc_ReminderOpts;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
// Popups page
if (ServiceExists(MS_POPUP_ADDPOPUPT))
@@ -1558,7 +1558,7 @@ static INT OnInitOptions(WPARAM wParam, LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP);
odp.pfnDlgProc = DlgProc_Popups;
odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
return MIR_OK;
}
diff --git a/plugins/Variables/options.cpp b/plugins/Variables/options.cpp index 03956ddea9..9fceb111c6 100644 --- a/plugins/Variables/options.cpp +++ b/plugins/Variables/options.cpp @@ -141,7 +141,7 @@ int OptionsInit(WPARAM wParam, LPARAM lParam) odp.pszTitle = LPGEN("Variables");
odp.pfnDlgProc = SetOptsDlgProc;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam,&odp);
return 0;
}
diff --git a/plugins/WhenWasIt/hooked_events.cpp b/plugins/WhenWasIt/hooked_events.cpp index 94c0e674dd..6d11805c28 100644 --- a/plugins/WhenWasIt/hooked_events.cpp +++ b/plugins/WhenWasIt/hooked_events.cpp @@ -200,7 +200,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam) odp.groupPosition = 910000000;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.pfnDlgProc = DlgProcOptions;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/YAPP/options.cpp b/plugins/YAPP/options.cpp index d161234afe..268135db8b 100644 --- a/plugins/YAPP/options.cpp +++ b/plugins/YAPP/options.cpp @@ -480,12 +480,12 @@ int OptInit(WPARAM wParam, LPARAM lParam) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT1);
odp.pszTab = LPGEN("Settings");
odp.pfnDlgProc = DlgProcOpts1;
- CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CLASSES);
odp.pszTab = LPGEN("Classes");
odp.pfnDlgProc = DlgProcOptsClasses;
- CallService( MS_OPT_ADDPAGE, wParam, (LPARAM)&odp );
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/ZeroNotification/main.c b/plugins/ZeroNotification/main.c index 946699b18a..92572cb326 100644 --- a/plugins/ZeroNotification/main.c +++ b/plugins/ZeroNotification/main.c @@ -234,7 +234,7 @@ static int OptionsInitialize(WPARAM wParam,LPARAM lParam) odp.pszGroup = Translate("Plugins");
odp.groupPosition = 100000000;
odp.pfnDlgProc = DlgProcNoSoundOpts;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/helpers/gen_helpers.cpp b/plugins/helpers/gen_helpers.cpp index 817f1d9f48..084be88139 100644 --- a/plugins/helpers/gen_helpers.cpp +++ b/plugins/helpers/gen_helpers.cpp @@ -272,13 +272,10 @@ TCHAR *itot(int num) { void Utf8Decode( char* str, wchar_t** ucs2 )
{
- int len;
- wchar_t* tempBuf;
-
if ( str == NULL )
return;
- len = strlen( str );
+ size_t len = strlen( str );
if ( len < 2 ) {
if ( ucs2 != NULL ) {
*ucs2 = ( wchar_t* )malloc(( len+1 )*sizeof( wchar_t ));
@@ -288,7 +285,7 @@ void Utf8Decode( char* str, wchar_t** ucs2 ) return;
}
- tempBuf = ( wchar_t* )alloca(( len+1 )*sizeof( wchar_t ));
+ wchar_t* tempBuf = ( wchar_t* )alloca(( len+1 )*sizeof( wchar_t ));
{
wchar_t* d = tempBuf;
BYTE* s = ( BYTE* )str;
@@ -332,19 +329,15 @@ void Utf8Decode( char* str, wchar_t** ucs2 ) char* Utf8Encode( const char* src )
{
- int len;
- char* result;
- wchar_t* tempBuf;
-
if ( src == NULL )
return NULL;
- len = strlen( src );
- result = ( char* )malloc( len*3 + 1 );
+ size_t len = strlen( src );
+ char* result = ( char* )malloc( len*3 + 1 );
if ( result == NULL )
return NULL;
- tempBuf = ( wchar_t* )alloca(( len+1 )*sizeof( wchar_t ));
+ wchar_t* tempBuf = ( wchar_t* )alloca(( len+1 )*sizeof( wchar_t ));
MultiByteToWideChar( CP_ACP, 0, src, -1, tempBuf, len );
tempBuf[ len ] = 0;
{
|