From a6635e8fe50620e0466b1b93608862cdbbb17f14 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 21 Aug 2015 19:43:50 +0000 Subject: db_autobackups: - Create services in Load() git-svn-id: http://svn.miranda-ng.org/main/trunk@15005 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db_autobackups/src/main.cpp | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'plugins') diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp index e497ee4a6f..0c50ade1fc 100644 --- a/plugins/Db_autobackups/src/main.cpp +++ b/plugins/Db_autobackups/src/main.cpp @@ -43,6 +43,27 @@ extern "C" __declspec(dllexport) int Load(void) Icon_Register(g_hInstance, LPGEN("Database") "/" LPGEN("Database backups"), iconList, _countof(iconList)); + CreateServiceFunction(MS_AB_BACKUP, ABService); + CreateServiceFunction(MS_AB_SAVEAS, DBSaveAs); + + CMenuItem mi; + mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 500100000); + + mi.name.a = LPGEN("Backup profile"); + mi.pszService = MS_AB_BACKUP; + mi.hIcolibItem = iconList[0].hIcolib; + mi.position = 500100000; + Menu_AddMainMenuItem(&mi); + + mi.name.a = LPGEN("Save profile as..."); + mi.pszService = MS_AB_SAVEAS; + mi.hIcolibItem = iconList[1].hIcolib; + mi.position = 500100001; + Menu_AddMainMenuItem(&mi); + + HookEvent(ME_OPT_INITIALISE, OptionsInit); + LoadOptions(); + return 0; } @@ -96,27 +117,6 @@ int ModulesLoad(WPARAM, LPARAM) FoldersGetBackupPath(0, 0); } - CreateServiceFunction(MS_AB_BACKUP, ABService); - CreateServiceFunction(MS_AB_SAVEAS, DBSaveAs); - - CMenuItem mi; - mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 500100000); - - mi.name.a = LPGEN("Backup profile"); - mi.pszService = MS_AB_BACKUP; - mi.hIcolibItem = iconList[0].hIcolib; - mi.position = 500100000; - Menu_AddMainMenuItem(&mi); - - mi.name.a = LPGEN("Save profile as..."); - mi.pszService = MS_AB_SAVEAS; - mi.hIcolibItem = iconList[1].hIcolib; - mi.position = 500100001; - Menu_AddMainMenuItem(&mi); - - HookEvent(ME_OPT_INITIALISE, OptionsInit); - LoadOptions(); - if (options.backup_types & BT_START) BackupStart(NULL); return 0; -- cgit v1.2.3