diff options
author | aunsane <aunsane@gmail.com> | 2017-01-06 20:12:37 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-01-06 20:12:37 +0300 |
commit | 36a18b725e67bbc0286f4d550a368cc3400fc7ff (patch) | |
tree | aab063191ea8941792929dde23d9b47cb7c3d9c7 /plugins/StatusManager/src/StartupStatus | |
parent | b7336b2fc97092442ce643532f67466868a87812 (diff) |
StatusManager: #662
- ability to disable subplugins
- project cleaning
Diffstat (limited to 'plugins/StatusManager/src/StartupStatus')
5 files changed, 14 insertions, 2 deletions
diff --git a/plugins/StatusManager/src/StartupStatus/ss_options.cpp b/plugins/StatusManager/src/StartupStatus/ss_options.cpp index 644be1f1e6..eaa5566820 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_options.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_options.cpp @@ -905,6 +905,7 @@ int StartupStatusOptionsInit(WPARAM wparam,LPARAM) { OPTIONSDIALOGPAGE odp = { 0 }; odp.hInstance = hInst; + odp.hLangpack = hSSLangpack; odp.szGroup.a = LPGEN("Status"); odp.szTitle.a = LPGEN("Startup status"); odp.flags = ODPF_BOLDGROUPS; diff --git a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp index 8abeeaa495..5cb311b605 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp @@ -57,6 +57,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM) CMenuItem mi; mi.position = 2000100000; mi.flags = CMIF_UNICODE; + mi.hLangpack = hSSLangpack; mcount = 0; int count = GetProfileCount(0, 0); for (int i = 0; i < count && mcount < MAX_MMITEMS; i++) { @@ -65,7 +66,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM) continue; if (db_get_b(NULL, SSMODULENAME, OptName(i, SETTING_INSUBMENU), 1) && !mi.root) { - mi.root = Menu_CreateRoot(MO_STATUS, LPGENW("Status profiles"), 2000100000); + mi.root = Menu_CreateRoot(MO_STATUS, LPGENW("Status profiles"), 2000100000, 0, hSSLangpack); Menu_ConfigureItem(mi.root, MCI_OPT_UID, "1AB30D51-BABA-4B27-9288-1A12278BAD8D"); } diff --git a/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp b/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp index e9d153670a..db8f6aeb61 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp @@ -41,7 +41,7 @@ void RemoveTopToolbarButtons() int CreateTopToolbarButtons(WPARAM, LPARAM) { if (iconList[0].hIcolib == NULL) - Icon_Register(hInst, "Toolbar/StartupStatus", iconList, _countof(iconList)); + Icon_Register(hInst, "Toolbar/StartupStatus", iconList, _countof(iconList), NULL, hSSLangpack); int profileCount = CallService(MS_SS_GETPROFILECOUNT, 0, 0); diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp index 2af4dc146d..b9bb67d684 100644 --- a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp +++ b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp @@ -19,6 +19,8 @@ #include "..\stdafx.h" +int hSSLangpack = 0; + static UINT_PTR setStatusTimerId = 0; static TSettingsList startupSettings(10, SSCompareSettings); @@ -488,6 +490,9 @@ HANDLE hSSModuleLoadedHook = NULL, void StartupStatusLoad() { + MUUID muidLast = MIID_LAST; + hSSLangpack = GetPluginLangId(muidLast, 0); + hSSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, SSModuleLoaded); if (db_get_b(NULL, SSMODULENAME, SETTING_SETPROFILE, 1) || @@ -513,6 +518,9 @@ void StartupStatusLoad() void StartupStatusUnload() { + KillModuleIcons(hSSLangpack); + KillModuleMenus(hSSLangpack); + DeinitProfilesModule(); UnloadProfileModule(); diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.h b/plugins/StatusManager/src/StartupStatus/startupstatus.h index 5686e03981..e1ad779103 100644 --- a/plugins/StatusManager/src/StartupStatus/startupstatus.h +++ b/plugins/StatusManager/src/StartupStatus/startupstatus.h @@ -19,6 +19,8 @@ #ifndef __STARTUPSTATUSHEADER #define __STARTUPSTATUSHEADER +extern int hSSLangpack; + #define SSMODULENAME "StartupStatus" struct TSSSetting : public PROTOCOLSETTINGEX, public MZeroedObject |