diff options
author | George Hazan <george.hazan@gmail.com> | 2015-04-13 15:05:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-04-13 15:05:51 +0000 |
commit | 6d0076208df04f1d161220beb7cd9155330dead9 (patch) | |
tree | 234a9fb900eef695da2948e7de9d19190853b6d3 /protocols/Steam/src/steam_events.cpp | |
parent | 05cd31c1d99a2adb8bae18b220a728ef66567543 (diff) |
dialog fix for Steam
git-svn-id: http://svn.miranda-ng.org/main/trunk@12787 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_events.cpp')
-rw-r--r-- | protocols/Steam/src/steam_events.cpp | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/protocols/Steam/src/steam_events.cpp b/protocols/Steam/src/steam_events.cpp index bbf707886e..7a31c566cd 100644 --- a/protocols/Steam/src/steam_events.cpp +++ b/protocols/Steam/src/steam_events.cpp @@ -2,7 +2,7 @@ int CSteamProto::OnModulesLoaded(WPARAM, LPARAM) { - HookEventObj(ME_OPT_INITIALISE, OnOptionsInit, this); + HookProtoEvent(ME_OPT_INITIALISE, &CSteamProto::OnOptionsInit); HookProtoEvent(ME_IDLE_CHANGED, &CSteamProto::OnIdleChanged); TCHAR name[128]; @@ -34,36 +34,21 @@ INT_PTR CSteamProto::OnAccountManagerInit(WPARAM wParam, LPARAM lParam) return (INT_PTR)(CSteamOptionsMain::CreateAccountManagerPage(this, (HWND)lParam))->GetHwnd(); } -int CSteamProto::OnOptionsInit(void *obj, WPARAM wParam, LPARAM lParam) +int CSteamProto::OnOptionsInit(WPARAM wParam, LPARAM lParam) { - CSteamProto *instance = (CSteamProto*)obj; - - char *title = mir_t2a(instance->m_tszUserName); - OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.hInstance = g_hInstance; - odp.pszTitle = title; - odp.flags = ODPF_BOLDGROUPS; - odp.pszGroup = LPGEN("Network"); - - odp.pszTab = LPGEN("Account"); - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MAIN); - odp.pfnDlgProc = CSteamOptionsMain::DynamicDlgProc;
- odp.dwInitParam = (LPARAM)&instance->SteamMainOptionsParam;
- instance->SteamMainOptionsParam.create = CSteamOptionsMain::CreateOptionsPage;
- instance->SteamMainOptionsParam.param = instance; - Options_AddPage(wParam, &odp); + odp.ptszTitle = m_tszUserName; + odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; + odp.ptszGroup = LPGENT("Network"); - odp.pszTab = LPGEN("Blocked contacts"); - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_BLOCK_LIST); - odp.pfnDlgProc = CSteamOptionsMain::DynamicDlgProc;
- odp.dwInitParam = (LPARAM)&instance->SteamBlockListOptionsParam;
- instance->SteamBlockListOptionsParam.create = CSteamOptionsBlockList::CreateOptionsPage;
- instance->SteamBlockListOptionsParam.param = instance; + odp.ptszTab = LPGENT("Account"); + odp.pDialog = new CSteamOptionsMain(this, IDD_OPT_MAIN);
Options_AddPage(wParam, &odp); - mir_free(title); - + odp.ptszTab = LPGENT("Blocked contacts"); + odp.pDialog = new CSteamOptionsBlockList(this);
+ Options_AddPage(wParam, &odp); return 0; } |