[Winpt-commits] r102 - trunk/Src
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Tue Nov 29 09:56:22 CET 2005
Author: twoaday
Date: 2005-11-29 09:56:21 +0100 (Tue, 29 Nov 2005)
New Revision: 102
Modified:
trunk/Src/ChangeLog
trunk/Src/WinPT.cpp
Log:
2005-11-29 Timo Schulz <ts at g10code.com>
* WinPT.cpp (WinMain): Modify --keymanager. If an instance
is running, just send the command to open the manager.
Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog 2005-11-25 10:56:05 UTC (rev 101)
+++ trunk/Src/ChangeLog 2005-11-29 08:56:21 UTC (rev 102)
@@ -1,3 +1,8 @@
+2005-11-29 Timo Schulz <ts at g10code.com>
+
+ * WinPT.cpp (WinMain): Modify --keymanager. If an instance
+ is running, just send the command to open the manager.
+
2005-11-25 Timo Schulz <ts at g10code.com>
* wptKeyEditCB.cpp (addrev_cmd_handler): Avoid hanging
Modified: trunk/Src/WinPT.cpp
===================================================================
--- trunk/Src/WinPT.cpp 2005-11-25 10:56:05 UTC (rev 101)
+++ trunk/Src/WinPT.cpp 2005-11-29 08:56:21 UTC (rev 102)
@@ -407,6 +407,15 @@
if (cmdline && (stristr (cmdline, "--keymanager")
|| stristr (cmdline, "--cardmanager"))) {
+ /* If an instance of WinPT is running, just send the command
+ to open the key manager. Otherwise start a new instance.
+ */
+ HWND tray = FindWindow ("WinPT", "WinPT");
+ if (tray != NULL) {
+ PostMessage (tray, WM_COMMAND, ID_WINPT_KEY, 0);
+ free_gnupg_table ();
+ return 0;
+ }
update_keycache (GetDesktopWindow ());
if (stristr (cmdline, "keymanager"))
dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC,
@@ -421,9 +430,11 @@
IDS_WINPT_CARD_EDIT);
gpg_card_release (crd);
}
+ /*
keycache_release (0);
free_gnupg_table ();
return 0;
+ */
}
/* If we found another WinPT instance, just quit to avoid it
More information about the Winpt-commits
mailing list