diff options
22 files changed, 80 insertions, 86 deletions
diff --git a/include/m_clist.h b/include/m_clist.h index 0536dedc54..83bc98ab90 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -181,11 +181,11 @@ __inline static HGENMENU Menu_AddProtoMenuItem(CLISTMENUITEM *mi) //hMenuItem will have been returned by clist/add*menuItem
//clmi.flags should contain cmim_ constants below specifying which fields to
//update. Fields without a mask flag cannot be changed and will be ignored
-#define CMIM_NAME 0x80000000
-#define CMIM_FLAGS 0x40000000
-#define CMIM_ICON 0x20000000
-#define CMIM_HOTKEY 0x10000000
-#define CMIM_ALL 0xF0000000
+#define CMIM_NAME 0x80000000
+#define CMIM_FLAGS 0x40000000
+#define CMIM_ICON 0x20000000
+#define CMIM_HOTKEY 0x10000000
+#define CMIM_ALL 0xF0000000
#define MS_CLIST_MODIFYMENUITEM "CList/ModifyMenuItem"
//the context menu for a contact is about to be built v0.1.0.1+
diff --git a/include/m_options.h b/include/m_options.h index bc3469998a..2011127e3c 100644 --- a/include/m_options.h +++ b/include/m_options.h @@ -118,18 +118,25 @@ __inline static INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp) //activated, the page won't be changed. This may change in the future.
typedef struct {
int cbSize;
- const char *pszGroup; //set to NULL if it's a root item
- const char *pszPage; //set to NULL to just open the options at no
+ const char *pszGroup; //set to NULL if it's a root item
+ const char *pszPage; //set to NULL to just open the options at no
//specific page
- const char *pszTab; //set to NULL to just open the options at no
+ const char *pszTab; //set to NULL to just open the options at no
//specific tab
}
OPENOPTIONSDIALOG;
-#define MS_OPT_OPENOPTIONS "Opt/OpenOptions"
+__inline static INT_PTR Options_Open(OPENOPTIONSDIALOG *ood)
+{
+ return CallService("Opt/OpenOptions", hLangpack, (LPARAM)ood);
+}
//Opens the options dialog, with only specified page v0.8.0.x+
-#define MS_OPT_OPENOPTIONSPAGE "Opt/OpenOptionsPage"
+
+__inline static HWND Options_OpenPage(OPENOPTIONSDIALOG *ood)
+{
+ return (HWND)CallService("Opt/OpenOptionsPage", hLangpack, (LPARAM)ood);
+}
#define SETTING_SHOWEXPERT_DEFAULT 1
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 6ebb459026..15fa91accc 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -407,7 +407,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar oop.pszGroup = Translate("Events");
oop.pszPage = Translate("Alarms");
oop.pszTab = 0;
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&oop);
+ Options_Open(&oop);
}
break;
case ID_REMINDERFRAMECONTEXT_SUSPEND:
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 377882b3c1..046ddb322b 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -326,12 +326,13 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR }
break;
case IDC_URL_IDLE:
- { OPENOPTIONSDIALOG ood;
- ood.cbSize=sizeof(ood);
- ood.pszGroup="Status"; /* autotranslated */
- ood.pszPage="Idle"; /* autotranslated */
- ood.pszTab=NULL;
- CallService(MS_OPT_OPENOPTIONS,0,(LPARAM)&ood);
+ {
+ OPENOPTIONSDIALOG ood;
+ ood.cbSize = sizeof(ood);
+ ood.pszGroup = "Status"; /* autotranslated */
+ ood.pszPage = "Idle"; /* autotranslated */
+ ood.pszTab = NULL;
+ Options_Open(&ood);
return TRUE;
}
case IDC_COMBO_SHUTDOWNTYPE:
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 0226f87508..a518914278 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -593,7 +593,7 @@ void OpenOptions(char* group, char* page, char* tab = NULL) op.pszGroup = group;
op.pszPage = page;
op.pszTab = tab;
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&op);
+ Options_Open(&op);
}
#define DlgReturn(ret){\
@@ -668,7 +668,7 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP OPENOPTIONSDIALOG opd = {0};
opd.cbSize = sizeof(OPENOPTIONSDIALOG);
opd.pszPage = LPGEN("History");
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&opd);
+ Options_Open(&opd);
DlgReturn(TRUE);
}
diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp index eefb5bac96..838f329673 100644 --- a/plugins/BossKeyPlus/src/Options.cpp +++ b/plugins/BossKeyPlus/src/Options.cpp @@ -244,7 +244,7 @@ INT_PTR CALLBACK MainOptDlg(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) ood.cbSize = sizeof(ood);
ood.pszGroup = "Customize";
ood.pszPage = "Hotkeys";
- CallService( MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood );
+ Options_Open(&ood);
return (true);
} break;
}
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp index f3ca4f21da..934ed51487 100644 --- a/plugins/DbEditorPP/src/main_window.cpp +++ b/plugins/DbEditorPP/src/main_window.cpp @@ -566,7 +566,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) odp.pszGroup = "Services";
odp.pszPage = modFullname;
odp.pszTab = 0;
- CallService(MS_OPT_OPENOPTIONS,0,(LPARAM)&odp);
+ Options_Open(&odp);
break;
}
return TRUE; // case WM_COMMAND
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp index ef94ab8872..601cfe88e4 100644 --- a/plugins/Db_autobackups/src/options.cpp +++ b/plugins/Db_autobackups/src/options.cpp @@ -268,7 +268,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ood.cbSize = sizeof(ood);
ood.pszGroup = "Customize";
ood.pszPage = "Folders";
- CallService( MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood );
+ Options_Open(&ood);
break;
}
}
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 760520ce91..ca7a914527 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -19,8 +19,8 @@ const int vf_default = VF_VS|VF_HFL|VF_IGN|VF_CID|VF_SHOWID|VF_RECV|VF_STAT|VF_SMNAME|VF_CIDN|VF_CIP;
HINSTANCE hinstance;
-HANDLE hmenuVis,hmenuOff,hmenuHide,hmenuIgnore,hmenuProto,hmenuAdded,hmenuAuthReq;
-HANDLE hmenuCopyID,hmenuRecvFiles,hmenuStatusMsg,hmenuCopyIP,hmenuCopyMirVer;
+HGENMENU hmenuVis,hmenuOff,hmenuHide,hmenuIgnore,hmenuProto,hmenuAdded,hmenuAuthReq;
+HGENMENU hmenuCopyID,hmenuRecvFiles,hmenuStatusMsg,hmenuCopyIP,hmenuCopyMirVer;
static HANDLE hIgnoreItem[9], hProtoItem[MAX_PROTOS], hHooks[8], hServices[12];
HICON hIcon[5];
BOOL bMetaContacts, bMir_08;
@@ -914,20 +914,17 @@ INT_PTR onIgnore(WPARAM wparam,LPARAM lparam) return 0;
}
-static HANDLE AddSubmenuItem(HANDLE hRoot, TCHAR* name, HICON icon, DWORD flag, char* service, int pos, int param)
+static HANDLE AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD flag, char* service, int pos, int param)
{
- CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(mi);
- mi.hParentMenu = (HGENMENU)hRoot;
- mi.pszPopupName = (char*)hRoot; // for Miranda 0.7
- mi.popupPosition = param;
- mi.position = pos;
- mi.ptszName = name;
- mi.hIcon = icon;
- mi.flags = CMIF_TCHAR | CMIF_CHILDPOPUP;
- if (flag)
- mi.flags |= flag;
- mi.pszService = service;
+ CLISTMENUITEM mi = { 0 };
+ mi.cbSize = sizeof(mi);
+ mi.hParentMenu = hRoot;
+ mi.popupPosition = param;
+ mi.position = pos;
+ mi.ptszName = name;
+ mi.hIcon = icon;
+ mi.flags = CMIF_TCHAR | CMIF_CHILDPOPUP | flag;
+ mi.pszService = service;
return Menu_AddContactMenuItem(&mi);
}
@@ -1094,7 +1091,7 @@ int EnumProtoSubmenu(WPARAM wparam, LPARAM lparam) protoCount = MAX_PROTOS;
for (i = 0; i < protoCount; i++)
{
- hProtoItem[i] = AddSubmenuItem((HGENMENU)hmenuProto, accs[i]->tszAccountName,
+ hProtoItem[i] = AddSubmenuItem(hmenuProto, accs[i]->tszAccountName,
LoadSkinnedProtoIcon(accs[i]->szModuleName, ID_STATUS_ONLINE), CMIF_KEEPUNTRANSLATED,
MS_PROTO, pos++, (int)accs[i]->szModuleName);
}
@@ -1270,7 +1267,7 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) ood.cbSize = sizeof(ood);
ood.pszGroup = "Events";
ood.pszPage = "Ignore";
- AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_ignore"), 0, MS_OPT_OPENOPTIONS, pos, (int)&ood );
+ AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_ignore"), 0, "Opt/OpenOptions", pos, (int)&ood );
mi.pszPopupName = 0;
if (bMir_08) {
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp index 5dd9dc302e..3c616bbcc2 100644 --- a/plugins/ModernOpt/src/modernopt.cpp +++ b/plugins/ModernOpt/src/modernopt.cpp @@ -273,7 +273,7 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, ood.pszGroup = obj->optObject.lpzClassicGroup;
ood.pszPage = obj->optObject.lpzClassicPage;
ood.pszTab = obj->optObject.lpzClassicTab;
- HWND hwndOpt = (HWND)CallService(MS_OPT_OPENOPTIONSPAGE, 0, (LPARAM)&ood);
+ HWND hwndOpt = Options_OpenPage(&ood);
PostMessage(hwndDlg, WM_CLOSE, 0, 0);
}
else {
diff --git a/plugins/ModernOpt/src/mopt_home.cpp b/plugins/ModernOpt/src/mopt_home.cpp index b9ef4a3ffb..214a0d664b 100644 --- a/plugins/ModernOpt/src/mopt_home.cpp +++ b/plugins/ModernOpt/src/mopt_home.cpp @@ -57,7 +57,7 @@ INT_PTR CALLBACK ModernOptHome_DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L {
OPENOPTIONSDIALOG ood = {0};
ood.cbSize = sizeof(ood);
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
}
break;
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index 8c02d2eeb8..9a3d9e4c55 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -249,7 +249,7 @@ INT_PTR CALLBACK DlgProcGeneralOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ood.cbSize = sizeof(ood);
ood.pszGroup = "Customize";
ood.pszPage = "Sounds";
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
return FALSE;
}
}
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index a8464746c6..14c44f0937 100644 --- a/plugins/PluginUpdater/src/Options.cpp +++ b/plugins/PluginUpdater/src/Options.cpp @@ -108,7 +108,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ood.cbSize = sizeof(ood);
ood.pszGroup = "Customize";
ood.pszPage = "Hotkeys";
- CallService( MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood );
+ Options_Open(&ood);
}
return true;
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index bba0731eda..82d71b288a 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -397,7 +397,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l ood.cbSize = sizeof(OPENOPTIONSDIALOG);
ood.pszGroup = "Customize";
ood.pszPage = "Fonts & Colors";
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
}
break;
case IDC_SOFFLINE: case IDC_SONLINE: case IDC_SAWAY: case IDC_SNA: case IDC_SOCCUPIED:
diff --git a/plugins/QuickReplies/src/events.cpp b/plugins/QuickReplies/src/events.cpp index 2227c6d6f1..4fdf1827fb 100644 --- a/plugins/QuickReplies/src/events.cpp +++ b/plugins/QuickReplies/src/events.cpp @@ -111,9 +111,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) ood.pszGroup = "Message Sessions";
ood.pszPage = "Quick Replies";
ood.pszTab = buttonName;
-
- CallService(MS_OPT_OPENOPTIONS, NULL, (LPARAM)&ood);
-
+ Options_Open(&ood);
return 0;
}
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index f688efc50a..fb660d59d7 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -829,7 +829,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, ood.pszGroup = "Customize";
ood.pszPage = "Fonts & Colors";
ood.pszTab = NULL;
- CallService( MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood );
+ Options_Open(&ood);
}
break;
case IDC_LOADCOUNT:
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index 3685091b25..6d60d22106 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -511,7 +511,7 @@ std::string toUTF8(std::wstring str) try{ utf8::utf16to8(str.begin(), str.end(), back_inserter(ustr)); } - catch(const std::exception &e) + catch(const std::exception&) { //TODO: handle utf8cpp exceptions } @@ -532,7 +532,7 @@ std::wstring toUTF16(std::string str) //convert as much as possible utf8::replace_invalid(str.begin(), str.end(), back_inserter(tmpstr)); utf8::utf8to16(tmpstr.begin(), tmpstr.end(), back_inserter(ustr)); } - catch(const std::exception &e) + catch(const std::exception &) { //TODO: handle utf8cpp exceptions } diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 2c933a61cb..a2f09e2d45 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -485,7 +485,7 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId) ood.pszPage = "Message Sessions";
ood.pszTab = NULL;
M->WriteByte(SRMSGMOD_T, "opage", 3); // force 3th tab to appear
- CallService (MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
return 1;
}
diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp index 9ba815eac3..f736bf991c 100644 --- a/plugins/TipperYM/src/mir_smileys.cpp +++ b/plugins/TipperYM/src/mir_smileys.cpp @@ -22,16 +22,6 @@ Boston, MA 02111-1307, USA. #include "options.h"
#include "mir_smileys.h"
-
-
-void *mir_calloc(size_t size)
-{
- void *ptr = mir_alloc(size);
- if (ptr) memset(ptr, 0, size);
-
- return ptr;
-}
-
int InitTipperSmileys()
{
// Register smiley category
diff --git a/protocols/JabberG/jabber_opt.cpp b/protocols/JabberG/jabber_opt.cpp index fe885888b8..9f41640340 100644 --- a/protocols/JabberG/jabber_opt.cpp +++ b/protocols/JabberG/jabber_opt.cpp @@ -2298,7 +2298,7 @@ INT_PTR __cdecl CJabberProto::OnMenuOptions( WPARAM, LPARAM ) ood.pszGroup = "Network";
ood.pszPage = mir_t2a(m_tszUserName);
ood.pszTab = "Account";
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
mir_free((void *)ood.pszPage);
return 0;
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index e7f5304b33..d4ea3e39e3 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -105,9 +105,8 @@ struct OptionsDlgData HTREEITEM FindNamedTreeItemAtRoot(HWND hwndTree, const TCHAR* name)
{
- TVITEM tvi;
TCHAR str[128];
-
+ TVITEM tvi;
tvi.mask = TVIF_TEXT;
tvi.pszText = str;
tvi.cchTextMax = SIZEOF(str);
@@ -1419,27 +1418,27 @@ void OpenAccountOptions(PROTOACCOUNT* pa) FreeOptionsData(&opi);
} }
-static void OpenOptionsNow(const char *pszGroup, const char *pszPage, const char *pszTab, bool bSinglePage = false)
+static void OpenOptionsNow(int hLangpack, const char *pszGroup, const char *pszPage, const char *pszTab, bool bSinglePage = false)
{
if (IsWindow(hwndOptions)) {
ShowWindow(hwndOptions, SW_RESTORE);
SetForegroundWindow(hwndOptions);
if (pszPage != NULL) {
- TCHAR *ptszPage = mir_a2t(pszPage);
+ mir_ptr<TCHAR> ptszPage( mir_a2t(pszPage));
HTREEITEM hItem = NULL;
if (pszGroup != NULL) {
- TCHAR *ptszGroup = mir_a2t(pszGroup);
- hItem = FindNamedTreeItemAtRoot(GetDlgItem(hwndOptions, IDC_PAGETREE), ptszGroup);
- if (hItem != NULL) {
- hItem = FindNamedTreeItemAtChildren(GetDlgItem(hwndOptions, IDC_PAGETREE), hItem, ptszPage);
- }
+ mir_ptr<TCHAR> ptszGroup( mir_a2t(pszGroup));
+ hItem = FindNamedTreeItemAtRoot(GetDlgItem(hwndOptions, IDC_PAGETREE), TranslateTH(hLangpack, ptszGroup));
+ if (hItem != NULL)
+ hItem = FindNamedTreeItemAtChildren(GetDlgItem(hwndOptions, IDC_PAGETREE), hItem, TranslateTH(hLangpack, ptszPage));
+
mir_free(ptszGroup);
- } else {
- hItem = FindNamedTreeItemAtRoot(GetDlgItem(hwndOptions, IDC_PAGETREE), ptszPage);
}
- if (hItem != NULL) {
+ else hItem = FindNamedTreeItemAtRoot(GetDlgItem(hwndOptions, IDC_PAGETREE), TranslateTH(hLangpack, ptszPage));
+
+ if (hItem != NULL)
TreeView_SelectItem(GetDlgItem(hwndOptions, IDC_PAGETREE), hItem);
- }
+
mir_free(ptszPage);
}
}
@@ -1467,32 +1466,34 @@ static void OpenOptionsNow(const char *pszGroup, const char *pszPage, const char FreeOptionsData(&opi);
} } }
-static INT_PTR OpenOptions(WPARAM, LPARAM lParam)
+static INT_PTR OpenOptions(WPARAM wParam, LPARAM lParam)
{
OPENOPTIONSDIALOG *ood = (OPENOPTIONSDIALOG*)lParam;
if (ood == NULL)
return 1;
+ int hLangpack = (int)wParam;
if (ood->cbSize == OPENOPTIONSDIALOG_OLD_SIZE)
- OpenOptionsNow(ood->pszGroup, ood->pszPage, NULL);
+ OpenOptionsNow(hLangpack, ood->pszGroup, ood->pszPage, NULL);
else if (ood->cbSize == sizeof(OPENOPTIONSDIALOG))
- OpenOptionsNow(ood->pszGroup, ood->pszPage, ood->pszTab);
+ OpenOptionsNow(hLangpack, ood->pszGroup, ood->pszPage, ood->pszTab);
else
return 1;
return 0;
}
-static INT_PTR OpenOptionsPage(WPARAM, LPARAM lParam)
+static INT_PTR OpenOptionsPage(WPARAM wParam, LPARAM lParam)
{
OPENOPTIONSDIALOG *ood = (OPENOPTIONSDIALOG*)lParam;
if (ood == NULL)
return 1;
+ int hLangpack = (int)wParam;
if (ood->cbSize == OPENOPTIONSDIALOG_OLD_SIZE)
- OpenOptionsNow(ood->pszGroup, ood->pszPage, NULL, true);
+ OpenOptionsNow(hLangpack, ood->pszGroup, ood->pszPage, NULL, true);
else if (ood->cbSize == sizeof(OPENOPTIONSDIALOG))
- OpenOptionsNow(ood->pszGroup, ood->pszPage, ood->pszTab, true);
+ OpenOptionsNow(hLangpack, ood->pszGroup, ood->pszPage, ood->pszTab, true);
else
return 1;
@@ -1502,7 +1503,7 @@ static INT_PTR OpenOptionsPage(WPARAM, LPARAM lParam) static INT_PTR OpenOptionsDialog(WPARAM, LPARAM)
{
if (hwndOptions || GetAsyncKeyState(VK_CONTROL) || !ServiceExists(MS_MODERNOPT_SHOW))
- OpenOptionsNow(NULL, NULL, NULL);
+ OpenOptionsNow(NULL, NULL, NULL, NULL);
else
CallService(MS_MODERNOPT_SHOW, 0, 0);
return 0;
@@ -1584,8 +1585,8 @@ int LoadOptionsModule(void) hwndOptions = NULL;
hOptionsInitEvent = CreateHookableEvent(ME_OPT_INITIALISE);
CreateServiceFunction("Opt/AddPage", AddOptionsPage);
- CreateServiceFunction(MS_OPT_OPENOPTIONS, OpenOptions);
- CreateServiceFunction(MS_OPT_OPENOPTIONSPAGE, OpenOptionsPage);
+ CreateServiceFunction("Opt/OpenOptions", OpenOptions);
+ CreateServiceFunction("Opt/OpenOptionsPage", OpenOptionsPage);
CreateServiceFunction("Options/OptionsCommand", OpenOptionsDialog);
HookEvent(ME_SYSTEM_MODULESLOADED, OptModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownOptionsModule);
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index 5cd17259fb..659e5b4dde 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -892,7 +892,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM ood.pszGroup = "Network";
ood.pszPage = pa->szModuleName;
ood.pszTab = NULL;
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
}
else OpenAccountOptions(pa);
} }
@@ -918,7 +918,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM OPENOPTIONSDIALOG ood = {0};
ood.cbSize = sizeof(ood);
ood.pszPage = "Network";
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
break;
}
|