[svn] GpgEX - r22 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Fri Oct 5 02:40:30 CEST 2007
Author: marcus
Date: 2007-10-05 02:40:21 +0200 (Fri, 05 Oct 2007)
New Revision: 22
Modified:
trunk/src/ChangeLog
trunk/src/client.cc
trunk/src/client.h
trunk/src/gpgex.cc
Log:
2007-10-05 Marcus Brinkmann <marcus at g10code.de>
* client.h (class client_t): Two new member functions
create_checksums and verify_checksums.
* client.cc (client_t::create_checksums, client_t::verify_checksums): New functions.
(client_t::encrypt_sign, client_t::encrypt): Fix spelling.
* gpgex.cc (ID_CMD_CREATE_CHECKSUMS, ID_CMD_VERIFY_CHECKSUMS,
ID_CMD_STR_CREATE_CHECKSUMS, ID_CMD_STR_VERIFY_CHECKSUMS): New macros.
(gpgex_t::QueryContextMenu): Add create and verify checksums menu entries.
(gpgex_t::GetCommandString): Support these here as well. Translate all strings.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2007-10-03 10:48:48 UTC (rev 21)
+++ trunk/src/ChangeLog 2007-10-05 00:40:21 UTC (rev 22)
@@ -1,3 +1,14 @@
+2007-10-05 Marcus Brinkmann <marcus at g10code.de>
+
+ * client.h (class client_t): Two new member functions
+ create_checksums and verify_checksums.
+ * client.cc (client_t::create_checksums, client_t::verify_checksums): New functions.
+ (client_t::encrypt_sign, client_t::encrypt): Fix spelling.
+ * gpgex.cc (ID_CMD_CREATE_CHECKSUMS, ID_CMD_VERIFY_CHECKSUMS,
+ ID_CMD_STR_CREATE_CHECKSUMS, ID_CMD_STR_VERIFY_CHECKSUMS): New macros.
+ (gpgex_t::QueryContextMenu): Add create and verify checksums menu entries.
+ (gpgex_t::GetCommandString): Support these here as well. Translate all strings.
+
2007-10-03 Marcus Brinkmann <marcus at g10code.de>
* client.cc (percent_escape, escape): New functions.
Modified: trunk/src/client.cc
===================================================================
--- trunk/src/client.cc 2007-10-03 10:48:48 UTC (rev 21)
+++ trunk/src/client.cc 2007-10-05 00:40:21 UTC (rev 22)
@@ -223,14 +223,14 @@
void
client_t::encrypt_sign (vector<string> &filenames)
{
- this->call_assuan ("ENCRPYT_SIGN", filenames);
+ this->call_assuan ("ENCRYPT_SIGN", filenames);
}
void
client_t::encrypt (vector<string> &filenames)
{
- this->call_assuan ("ENCRPYT", filenames);
+ this->call_assuan ("ENCRYPT", filenames);
}
@@ -246,3 +246,17 @@
{
this->call_assuan ("IMPORT", filenames);
}
+
+
+void
+client_t::create_checksums (vector<string> &filenames)
+{
+ this->call_assuan ("CREATE_CHECKSUMS", filenames);
+}
+
+
+void
+client_t::verify_checksums (vector<string> &filenames)
+{
+ this->call_assuan ("VERIFY_CHECKSUMS", filenames);
+}
Modified: trunk/src/client.h
===================================================================
--- trunk/src/client.h 2007-10-03 10:48:48 UTC (rev 21)
+++ trunk/src/client.h 2007-10-05 00:40:21 UTC (rev 22)
@@ -49,6 +49,8 @@
void encrypt (vector<string> &filenames);
void sign (vector<string> &filenames);
void import (vector<string> &filenames);
+ void create_checksums (vector<string> &filenames);
+ void verify_checksums (vector<string> &filenames);
};
#endif /* ! CLIENT_H */
Modified: trunk/src/gpgex.cc
===================================================================
--- trunk/src/gpgex.cc 2007-10-03 10:48:48 UTC (rev 21)
+++ trunk/src/gpgex.cc 2007-10-05 00:40:21 UTC (rev 22)
@@ -49,8 +49,10 @@
#define ID_CMD_ENCRYPT 5
#define ID_CMD_SIGN 6
#define ID_CMD_IMPORT 7
-#define ID_CMD_POPUP 8
-#define ID_CMD_MAX 8
+#define ID_CMD_CREATE_CHECKSUMS 8
+#define ID_CMD_VERIFY_CHECKSUMS 9
+#define ID_CMD_POPUP 10
+#define ID_CMD_MAX 10
#define ID_CMD_STR_HELP _("Help on GpgEX")
#define ID_CMD_STR_DECRYPT_VERIFY _("Decrypt and verify")
@@ -60,6 +62,8 @@
#define ID_CMD_STR_ENCRYPT _("Encrypt")
#define ID_CMD_STR_SIGN _("Sign")
#define ID_CMD_STR_IMPORT _("Import keys")
+#define ID_CMD_STR_CREATE_CHECKSUMS _("Create checksums")
+#define ID_CMD_STR_VERIFY_CHECKSUMS _("Verify checksums")
/* Reset the instance between operations. */
@@ -322,20 +326,16 @@
return TRACE_RES (HRESULT_FROM_WIN32 (GetLastError ()));
res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
- idCmdFirst + ID_CMD_DECRYPT_VERIFY,
- ID_CMD_STR_DECRYPT_VERIFY);
+ idCmdFirst + ID_CMD_DECRYPT,
+ ID_CMD_STR_DECRYPT);
if (res)
res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
- idCmdFirst + ID_CMD_DECRYPT,
- ID_CMD_STR_DECRYPT);
- if (res)
- res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
idCmdFirst + ID_CMD_VERIFY,
ID_CMD_STR_VERIFY);
if (res)
res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
- idCmdFirst + ID_CMD_ENCRYPT_SIGN,
- ID_CMD_STR_ENCRYPT_SIGN);
+ idCmdFirst + ID_CMD_DECRYPT_VERIFY,
+ ID_CMD_STR_DECRYPT_VERIFY);
if (res)
res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
idCmdFirst + ID_CMD_ENCRYPT,
@@ -346,8 +346,18 @@
ID_CMD_STR_SIGN);
if (res)
res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
+ idCmdFirst + ID_CMD_ENCRYPT_SIGN,
+ ID_CMD_STR_ENCRYPT_SIGN);
+ if (res)
+ res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
idCmdFirst + ID_CMD_IMPORT, ID_CMD_STR_IMPORT);
if (res)
+ res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
+ idCmdFirst + ID_CMD_CREATE_CHECKSUMS, ID_CMD_STR_CREATE_CHECKSUMS);
+ if (res)
+ res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
+ idCmdFirst + ID_CMD_VERIFY_CHECKSUMS, ID_CMD_STR_VERIFY_CHECKSUMS);
+ if (res)
res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
if (res)
res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING,
@@ -389,39 +399,47 @@
switch (idCommand)
{
case ID_CMD_HELP:
- txt = "Invoke the GpgEX documentation.";
+ txt = _("Invoke the GpgEX documentation.");
break;
case ID_CMD_DECRYPT_VERIFY:
- txt = "Decrypt and verify the marked files.";
+ txt = _("Decrypt and verify the marked files.");
break;
case ID_CMD_DECRYPT:
- txt = "Decrypt the marked files.";
+ txt = _("Decrypt the marked files.");
break;
case ID_CMD_VERIFY:
- txt = "Verify the marked files.";
+ txt = _("Verify the marked files.");
break;
case ID_CMD_ENCRYPT_SIGN:
- txt = "Encrypt and sign the marked files.";
+ txt = _("Encrypt and sign the marked files.");
break;
case ID_CMD_ENCRYPT:
- txt = "Encrypt the marked files.";
+ txt = _("Encrypt the marked files.");
break;
case ID_CMD_SIGN:
- txt = "Sign the marked files.";
+ txt = _("Sign the marked files.");
break;
case ID_CMD_IMPORT:
- txt = "Import the marked files.";
+ txt = _("Import the marked files.");
break;
+ case ID_CMD_CREATE_CHECKSUMS:
+ txt = _("Create checksums.");
+ break;
+
+ case ID_CMD_VERIFY_CHECKSUMS:
+ txt = _("Verify checksums.");
+ break;
+
case ID_CMD_POPUP:
- txt = "Show more GpgEX options.";
+ txt = _("Show more GpgEX options.");
break;
default:
@@ -484,23 +502,8 @@
return;
}
-#if 0
- VARIANT_BOOL busy;
- do
- {
- web->get_Busy (&busy);
- Sleep (500);
- }
- while (busy == VARIANT_TRUE);
-
-
- HWND hwnd = NULL;
- web->get_HWND (&hwnd);
-#endif
-
Sleep (5000);
web->Release ();
-
}
@@ -553,6 +556,14 @@
client.import (this->filenames);
break;
+ case ID_CMD_CREATE_CHECKSUMS:
+ client.create_checksums (this->filenames);
+ break;
+
+ case ID_CMD_VERIFY_CHECKSUMS:
+ client.verify_checksums (this->filenames);
+ break;
+
default:
return TRACE_RES (E_INVALIDARG);
break;
More information about the Gnupg-commits
mailing list