From 4a1bf959c8dc0e254e3cc8efcce0f2c89108e350 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 26 Sep 2014 22:16:18 +0000 Subject: CrashDumper: -Moved menu item back to MODULESLOADED git-svn-id: http://svn.miranda-ng.org/main/trunk@10608 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CrashDumper/src/crshdmp.cpp | 104 ++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'plugins') diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 7788bc4b43..a6f68eeb21 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -223,58 +223,6 @@ static int ModulesLoaded(WPARAM, LPARAM) FoldersPathChanged(0, 0); } - SetExceptionHandler(); - - HookEvent(ME_TTB_MODULELOADED, ToolbarModulesLoaded); - - if (servicemode) - ViewVersionInfo(0, 0); - else if (db_get_b(NULL, PluginName, "UploadChanged", 0) && !ProcessVIHash(false)) - UploadVersionInfo(0, 0xa1); - - return 0; -} - -static int PreShutdown(WPARAM, LPARAM) -{ - DestroyAllWindows(); - UploadClose(); - return 0; -} - -extern "C" int __declspec(dllexport) Load(void) -{ - if (LoadLibraryA("riched20.dll") == NULL) - return 1; - - clsdates = db_get_b(NULL, PluginName, "ClassicDates", 1) != 0; - - dtsubfldr = db_get_b(NULL, PluginName, "SubFolders", 1) != 0; - mir_getLP(&pluginInfoEx); - - profname = Utils_ReplaceVarsT(_T("%miranda_profilename%.dat")); - profpath = Utils_ReplaceVarsT(_T("%miranda_userdata%")); - mir_sntprintf(CrashLogFolder, MAX_PATH, TEXT("%s\\CrashLog"), profpath); - mir_sntprintf(VersionInfoFolder, MAX_PATH, TEXT("%s"), profpath); - - - HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); - HookEvent(ME_OPT_INITIALISE, OptionsInit); - HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); - - packlcid = (LCID)Langpack_GetDefaultLocale(); - - InitIcons(); - - InitExceptionHandler(); - - CreateServiceFunction(MS_CRASHDUMPER_STORETOFILE, StoreVersionInfoToFile); - CreateServiceFunction(MS_CRASHDUMPER_STORETOCLIP, StoreVersionInfoToClipboard); - CreateServiceFunction(MS_CRASHDUMPER_VIEWINFO, ViewVersionInfo); - CreateServiceFunction(MS_CRASHDUMPER_UPLOAD, UploadVersionInfo); - CreateServiceFunction(MS_CRASHDUMPER_URL, OpenUrl); - CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceModeLaunch); - CLISTMENUITEM mi = { sizeof(mi) }; mi.popupPosition = 2000089999; mi.position = 2000089999; @@ -348,6 +296,58 @@ extern "C" int __declspec(dllexport) Load(void) Hotkey_Register(&hk); UploadInit(); + + SetExceptionHandler(); + + HookEvent(ME_TTB_MODULELOADED, ToolbarModulesLoaded); + + if (servicemode) + ViewVersionInfo(0, 0); + else if (db_get_b(NULL, PluginName, "UploadChanged", 0) && !ProcessVIHash(false)) + UploadVersionInfo(0, 0xa1); + + return 0; +} + +static int PreShutdown(WPARAM, LPARAM) +{ + DestroyAllWindows(); + UploadClose(); + return 0; +} + +extern "C" int __declspec(dllexport) Load(void) +{ + if (LoadLibraryA("riched20.dll") == NULL) + return 1; + + clsdates = db_get_b(NULL, PluginName, "ClassicDates", 1) != 0; + + dtsubfldr = db_get_b(NULL, PluginName, "SubFolders", 1) != 0; + mir_getLP(&pluginInfoEx); + + profname = Utils_ReplaceVarsT(_T("%miranda_profilename%.dat")); + profpath = Utils_ReplaceVarsT(_T("%miranda_userdata%")); + mir_sntprintf(CrashLogFolder, MAX_PATH, TEXT("%s\\CrashLog"), profpath); + mir_sntprintf(VersionInfoFolder, MAX_PATH, TEXT("%s"), profpath); + + + HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); + HookEvent(ME_OPT_INITIALISE, OptionsInit); + HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); + + packlcid = (LCID)Langpack_GetDefaultLocale(); + + InitIcons(); + + InitExceptionHandler(); + + CreateServiceFunction(MS_CRASHDUMPER_STORETOFILE, StoreVersionInfoToFile); + CreateServiceFunction(MS_CRASHDUMPER_STORETOCLIP, StoreVersionInfoToClipboard); + CreateServiceFunction(MS_CRASHDUMPER_VIEWINFO, ViewVersionInfo); + CreateServiceFunction(MS_CRASHDUMPER_UPLOAD, UploadVersionInfo); + CreateServiceFunction(MS_CRASHDUMPER_URL, OpenUrl); + CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceModeLaunch); return 0; } -- cgit v1.2.3