summaryrefslogtreecommitdiff
path: root/plugins/DbChecker/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-28 18:29:52 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-28 18:29:52 +0000
commitbe3185a374d39a8ee0f12a4e985ecca279633fff (patch)
tree14ba64a79d7dd62d95797db402950702a24667fe /plugins/DbChecker/src/main.cpp
parent61be34f18c2d61c075a7e268aa9aab89b78ec17a (diff)
- MS_DB_CHECKPROFILE - service for checking databases
- added menu item "Check" to a context menu in profile manager git-svn-id: http://svn.miranda-ng.org/main/trunk@1228 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbChecker/src/main.cpp')
-rw-r--r--plugins/DbChecker/src/main.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/plugins/DbChecker/src/main.cpp b/plugins/DbChecker/src/main.cpp
index 4a98a5dd1d..a36f74f340 100644
--- a/plugins/DbChecker/src/main.cpp
+++ b/plugins/DbChecker/src/main.cpp
@@ -22,9 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HINSTANCE hInst;
int hLangpack = 0;
-bool bServiceMode = false, bLaunchMiranda = false;
-
-static HANDLE hLaunchFunc;
+bool bServiceMode, bLaunchMiranda, bShortMode;
DbToolOptions opts = {0};
@@ -63,22 +61,31 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_SERVICE
static INT_PTR ServiceMode(WPARAM, LPARAM)
{
- bLaunchMiranda = false;
+ bLaunchMiranda = bShortMode = false;
bServiceMode = true;
DialogBox(hInst, MAKEINTRESOURCE(IDD_WIZARD), NULL, WizardDlgProc);
return (bLaunchMiranda) ? SERVICE_CONTINUE : SERVICE_FAILED;
}
+static INT_PTR CheckProfile(WPARAM wParam, LPARAM)
+{
+ bShortMode = true;
+ bLaunchMiranda = bServiceMode = false;
+ _tcsncpy(opts.filename, (TCHAR*)wParam, SIZEOF(opts.filename));
+ DialogBox(hInst, MAKEINTRESOURCE(IDD_WIZARD), NULL, WizardDlgProc);
+ return 0;
+}
+
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
- hLaunchFunc = CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
+ CreateServiceFunction(MS_DB_CHECKPROFILE, CheckProfile);
+ CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
return 0;
}
extern "C" __declspec(dllexport) int Unload(void)
{
- DestroyServiceFunction(hLaunchFunc);
return 0;
}