[Winpt-commits] r247 - in trunk: Include Po Src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Jul 21 10:19:27 CEST 2006
Author: twoaday
Date: 2006-07-21 10:19:24 +0200 (Fri, 21 Jul 2006)
New Revision: 247
Modified:
trunk/Include/wptUtil.h
trunk/Po/ChangeLog
trunk/Po/de.po
trunk/Po/jp.po
trunk/Po/pt_BR.po
trunk/Src/ChangeLog
trunk/Src/wptFileSaveDlg.cpp
trunk/Src/wptFileVerifyDlg.cpp
trunk/Src/wptGPGMEData.cpp
trunk/Src/wptGPGMEWrapper.cpp
trunk/Src/wptImportList.cpp
trunk/Src/wptKeyManager.cpp
trunk/Src/wptKeyRevokeDlg.cpp
trunk/Src/wptMDSumDlg.cpp
trunk/Src/wptUtil.cpp
Log:
Modified: trunk/Include/wptUtil.h
===================================================================
--- trunk/Include/wptUtil.h 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Include/wptUtil.h 2006-07-21 08:19:24 UTC (rev 247)
@@ -1,10 +1,13 @@
#ifndef WPT_UTIL_H
#define WPT_UTIL_H
+#define IS_PATH 1
+
/* helpers */
char* strsep (char **stringp, const char *delim);
const char *stristr (const char *buf, const char *sub);
int check_email_address (const char *email);
+int check_file_name (const char *fname, int is_path);
char* substr (const char *str, unsigned int begin, unsigned int end);
void unhexify_buffer (const char *in, char **out);
Modified: trunk/Po/ChangeLog
===================================================================
--- trunk/Po/ChangeLog 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Po/ChangeLog 2006-07-21 08:19:24 UTC (rev 247)
@@ -1,3 +1,7 @@
+2006-07-10 Timo Schulz <ts at g10code.de>
+
+ * de.po: Updated.
+
2006-07-05 Timo Schulz <ts at g10code.de>
* de.po: Updated.
Modified: trunk/Po/de.po
===================================================================
--- trunk/Po/de.po 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Po/de.po 2006-07-21 08:19:24 UTC (rev 247)
@@ -14,7 +14,7 @@
msgstr ""
"Project-Id-Version: WinPT 1.0.0\n"
"Report-Msgid-Bugs-To: winpt at freakmail.de\n"
-"POT-Creation-Date: 2006-07-06 22:49+0200\n"
+"POT-Creation-Date: 2006-07-13 09:48+0200\n"
"PO-Revision-Date: 2005-12-28 16:10+0100\n"
"Last-Translator: Timo Schulz <ts at g10code.de>\n"
"Language-Team: DE <twoaday at freakmail.de>\n"
@@ -253,7 +253,7 @@
#: Src/wptCardDlg.cpp:207
msgid "No OpenPGP smart card detected."
-msgstr "Keine OpenPGP-Smartcard erkannt."
+msgstr "Keine OpenPGP-Smartcard gefunden."
#: Src/wptCardDlg.cpp:326
msgid "No PINs found."
@@ -487,8 +487,9 @@
"*** Signatur erstellt: %s\r\n"
"*** Signatur überprüft: %s\r\n"
"*** %s\r\n"
-"*** Signatur: %s\r\\n*** Unterzeichner: %s (0x%s)\r\n"
-"*** BEGINN PGP ENTSCHLÜSSELTER TEXT***\r\n"
+"*** Signatur: %s\r\\n"
+"*** Unterzeichner: %s (0x%s)\r\n"
+"*** BEGINN PGP ENTSCHLÜSSELTER TEXT ***\r\n"
#: Src/wptClipDecryptDlg.cpp:131
msgid ""
@@ -522,7 +523,7 @@
#: Src/wptClipVerifyDlg.cpp:207 Src/wptClipVerifyDlg.cpp:225
#: Src/wptClipVerifyDlg.cpp:237 Src/wptFileManager.cpp:1636
#: Src/wptFileManager.cpp:1689 Src/wptFileManagerDlg.cpp:591
-#: Src/wptFileVerifyDlg.cpp:82 Src/wptFileVerifyDlg.cpp:149
+#: Src/wptFileVerifyDlg.cpp:83 Src/wptFileVerifyDlg.cpp:150
#: Src/wptMainProc.cpp:179 Src/wptMainProc.cpp:239 Src/wptMainProc.cpp:253
#: Src/wptMainProc.cpp:261 Src/wptMainProc.cpp:413
msgid "Verify"
@@ -668,12 +669,12 @@
#: Src/wptClipEncryptDlg.cpp:157 Src/wptClipSignEncDlg.cpp:112
#: Src/wptCommonDlg.cpp:76 Src/wptCommonDlg.cpp:253
#: Src/wptFileManagerDlg.cpp:97 Src/wptFileManagerDlg.cpp:231
-#: Src/wptFileManagerDlg.cpp:293 Src/wptFileSaveDlg.cpp:58
+#: Src/wptFileManagerDlg.cpp:293 Src/wptFileSaveDlg.cpp:59
#: Src/wptFirstRunDlg.cpp:47 Src/wptGPGPrefsDlg.cpp:166
#: Src/wptKeyEditDlgs.cpp:359 Src/wptKeyEditDlgs.cpp:440
#: Src/wptKeyEditDlgs.cpp:506 Src/wptKeyEditDlgs.cpp:641
#: Src/wptKeyEditOwnertrustDlg.cpp:67 Src/wptKeygenDlg.cpp:382
-#: Src/wptKeygenDlg.cpp:538 Src/wptKeyRevokeDlg.cpp:81
+#: Src/wptKeygenDlg.cpp:538 Src/wptKeyRevokeDlg.cpp:79
#: Src/wptKeyserverDlg.cpp:518 Src/wptKeyserverSearchDlg.cpp:66
#: Src/wptKeysignDlg.cpp:336 Src/wptPassphraseCB.cpp:93
#: Src/wptPassphraseDlg.cpp:104 Src/wptPINDlg.cpp:54
@@ -773,10 +774,11 @@
msgid "Could not extract key or signature information."
msgstr "Konnte Schlüssel- oder Signaturinfos nicht extrahieren."
-#: Src/wptClipVerifyDlg.cpp:272 Src/wptFileSaveDlg.cpp:57
-#: Src/wptFileSaveDlg.cpp:84 Src/wptFileSaveDlg.cpp:89
-#: Src/wptFileSaveDlg.cpp:95 Src/wptFileSaveDlg.cpp:99
-#: Src/wptFileSaveDlg.cpp:104 Src/wptFileSaveDlg.cpp:110
+#: Src/wptClipVerifyDlg.cpp:272 Src/wptFileSaveDlg.cpp:58
+#: Src/wptFileSaveDlg.cpp:81 Src/wptFileSaveDlg.cpp:86
+#: Src/wptFileSaveDlg.cpp:92 Src/wptFileSaveDlg.cpp:98
+#: Src/wptFileSaveDlg.cpp:100 Src/wptFileSaveDlg.cpp:108
+#: Src/wptFileSaveDlg.cpp:114 Src/wptFileSaveDlg.cpp:120
msgid "Save Plaintext"
msgstr "Klartext speichern"
@@ -786,7 +788,7 @@
#: Src/wptCommonDlg.cpp:115
msgid "HTTP Key Import"
-msgstr "HTTP Schlüssel Import"
+msgstr "HTTP Schlüssel-Import"
#: Src/wptCommonDlg.cpp:116
msgid "Enter URL to retrieve the public key"
@@ -1038,7 +1040,7 @@
#: Src/wptFileManager.cpp:1591 Src/wptFileManager.cpp:1841
#: Src/wptFileManager.cpp:1903 Src/wptFileManagerDlg.cpp:535
#: Src/wptFileManagerDlg.cpp:638 Src/wptFileStatDlg.cpp:149
-#: Src/wptMainProc.cpp:400 Src/wptMDSumDlg.cpp:273
+#: Src/wptMainProc.cpp:400 Src/wptMDSumDlg.cpp:276 Src/wptMDSumDlg.cpp:281
msgid "File Manager"
msgstr "Dateimanager"
@@ -1192,7 +1194,7 @@
# c:\oss\winpt-gpgme\src\wptFileManager.cpp:1362
#: Src/wptFileManager.cpp:1591
msgid "No files to check."
-msgstr "Keine Datei(en) zu pruefen."
+msgstr "Keine Datei(en) zu prüfen."
#: Src/wptFileManager.cpp:1608
msgid "Select Data File"
@@ -1208,8 +1210,8 @@
#: Src/wptFileManager.cpp:1734 Src/wptFileManager.cpp:1745
#: Src/wptFileManagerDlg.cpp:250 Src/wptImportList.cpp:404
-#: Src/wptImportList.cpp:410 Src/wptImportList.cpp:420
-#: Src/wptImportList.cpp:428 Src/wptImportList.cpp:437
+#: Src/wptImportList.cpp:411 Src/wptImportList.cpp:421
+#: Src/wptImportList.cpp:429 Src/wptImportList.cpp:438
#: Src/wptKeyManager.cpp:478 Src/wptKeyManager.cpp:489
#: Src/wptKeyManager.cpp:617 Src/wptKeyserverDlg.cpp:221
msgid "Import"
@@ -1235,7 +1237,7 @@
#: Src/wptFileManager.cpp:1769 Src/wptFileManager.cpp:1792
#: Src/wptKeyserverDlg.cpp:92
msgid "Export"
-msgstr "Exportieren"
+msgstr "Export"
#: Src/wptFileManager.cpp:1777 Src/wptKeyManagerDlg.cpp:1852
#: Src/wptKeyManagerDlg.cpp:1884
@@ -1510,27 +1512,31 @@
"Gesamtkapazität: %12sk\n"
"Freier Platz : %12sk"
-#: Src/wptFileSaveDlg.cpp:59
+#: Src/wptFileSaveDlg.cpp:60
msgid "&Save additional information"
msgstr "&Sichere zusätzliche Informationen"
-#: Src/wptFileSaveDlg.cpp:60
+#: Src/wptFileSaveDlg.cpp:61
msgid "Save to &file"
msgstr "In &Datei sichern"
-#: Src/wptFileSaveDlg.cpp:61
+#: Src/wptFileSaveDlg.cpp:62
msgid "Send to &clipboard"
msgstr "An &Ablage senden"
-#: Src/wptFileSaveDlg.cpp:74
+#: Src/wptFileSaveDlg.cpp:71
msgid "Destination for Plaintext"
msgstr "Speicherort für Klartextausgabe"
-#: Src/wptFileSaveDlg.cpp:84
+#: Src/wptFileSaveDlg.cpp:81
msgid "Please enter a filename."
msgstr "Bitte geben Sie einen Dateinamen ein."
-#: Src/wptFileSaveDlg.cpp:95 Src/wptFileSaveDlg.cpp:110
+#: Src/wptFileSaveDlg.cpp:85 Src/wptKeyRevokeDlg.cpp:171
+msgid "The file name contains one or more illegal characters."
+msgstr "Der Dateiname enthält ein oder mehrere illegale Zeichen."
+
+#: Src/wptFileSaveDlg.cpp:98 Src/wptFileSaveDlg.cpp:120
msgid "Finished"
msgstr "Fertig"
@@ -1538,7 +1544,7 @@
msgid "File Verify"
msgstr "Dateiüberprüfung"
-#: Src/wptFileVerifyDlg.cpp:81
+#: Src/wptFileVerifyDlg.cpp:82
msgid "Do you want to retrieve the key?"
msgstr "Wollen Sie den Schlüssel herunterladen?"
@@ -1992,7 +1998,7 @@
msgstr "Typ"
# c:\oss\winpt-gpgme\src\wptImportList.cpp:424
-#: Src/wptImportList.cpp:418
+#: Src/wptImportList.cpp:419
msgid ""
"It is possible that the ASCII-Armor is damaged\n"
"and thus a CRC error occurs."
@@ -2087,7 +2093,7 @@
msgid "'%s' is not a valid JPEG file."
msgstr "'%s' is keine gültige JPEG Datei."
-#: Src/wptKeyEditDlgs.cpp:381 Src/wptKeyRevokeDlg.cpp:168
+#: Src/wptKeyEditDlgs.cpp:381 Src/wptKeyRevokeDlg.cpp:166
msgid "Please enter a file name."
msgstr "Bitte Dateinamen eingeben."
@@ -2724,7 +2730,7 @@
msgid "Please do NOT enter the email address in the comment field."
msgstr "Bitte geben Sie die E-Mail-Adresse NICHT im Kommentarfeld ein."
-#: Src/wptKeygenDlg.cpp:465 Src/wptKeyRevokeDlg.cpp:176
+#: Src/wptKeygenDlg.cpp:465 Src/wptKeyRevokeDlg.cpp:180
msgid "Please enter the passphrase."
msgstr "Bitte das Passwort eingeben."
@@ -3071,19 +3077,19 @@
msgid "String pattern \"%s\" not found."
msgstr "Zeichenkette \"%s\" nicht gefunden."
-#: Src/wptKeyManager.cpp:1063 Src/wptKeyRevokeDlg.cpp:87
+#: Src/wptKeyManager.cpp:1063 Src/wptKeyRevokeDlg.cpp:85
msgid "0. No reason specified"
msgstr "0. Kein Grund angeben"
-#: Src/wptKeyManager.cpp:1064 Src/wptKeyRevokeDlg.cpp:88
+#: Src/wptKeyManager.cpp:1064 Src/wptKeyRevokeDlg.cpp:86
msgid "1. Key has been compromised"
msgstr "1. Der Schlüssel ist nicht mehr sicher"
-#: Src/wptKeyManager.cpp:1065 Src/wptKeyRevokeDlg.cpp:89
+#: Src/wptKeyManager.cpp:1065 Src/wptKeyRevokeDlg.cpp:87
msgid "2. Key is superseded"
msgstr "2. Der Schlüssel ist veraltet"
-#: Src/wptKeyManager.cpp:1066 Src/wptKeyRevokeDlg.cpp:90
+#: Src/wptKeyManager.cpp:1066 Src/wptKeyRevokeDlg.cpp:88
msgid "3. Key is no longer used"
msgstr "3. Der Schlüssel wird nicht mehr benutzt"
@@ -3373,10 +3379,11 @@
msgid "Key already revoked!"
msgstr "Schlüssel ist bereits widerrufen!"
-#: Src/wptKeyManagerDlg.cpp:1704 Src/wptKeyRevokeDlg.cpp:70
-#: Src/wptKeyRevokeDlg.cpp:80 Src/wptKeyRevokeDlg.cpp:164
-#: Src/wptKeyRevokeDlg.cpp:169 Src/wptKeyRevokeDlg.cpp:177
-#: Src/wptKeyRevokeDlg.cpp:187 Src/wptKeyRevokeDlg.cpp:193
+#: Src/wptKeyManagerDlg.cpp:1704 Src/wptKeyRevokeDlg.cpp:68
+#: Src/wptKeyRevokeDlg.cpp:78 Src/wptKeyRevokeDlg.cpp:162
+#: Src/wptKeyRevokeDlg.cpp:167 Src/wptKeyRevokeDlg.cpp:172
+#: Src/wptKeyRevokeDlg.cpp:181 Src/wptKeyRevokeDlg.cpp:191
+#: Src/wptKeyRevokeDlg.cpp:197
msgid "Key Revocation Cert"
msgstr "Schlüsselwiderruf Zertifikat"
@@ -3534,23 +3541,23 @@
msgid "Key Revokers"
msgstr "Schlüsselwiderrufer"
-#: Src/wptKeyRevokeDlg.cpp:82
+#: Src/wptKeyRevokeDlg.cpp:80
msgid "Reason for revocation"
msgstr "Grund des Widerrufes"
-#: Src/wptKeyRevokeDlg.cpp:83
+#: Src/wptKeyRevokeDlg.cpp:81
msgid "Optional description text"
msgstr "Optionale Beschreibung"
-#: Src/wptKeyRevokeDlg.cpp:84
+#: Src/wptKeyRevokeDlg.cpp:82
msgid "&Passphrase"
msgstr "&Passwort"
-#: Src/wptKeyRevokeDlg.cpp:85
+#: Src/wptKeyRevokeDlg.cpp:83
msgid "Output file"
msgstr "Ausgabedatei"
-#: Src/wptKeyRevokeDlg.cpp:136
+#: Src/wptKeyRevokeDlg.cpp:134
msgid ""
"Please move this certificate to a medium where it can bestored in a safe "
"place (floppy, CDR, etc..).\n"
@@ -3562,15 +3569,15 @@
"Wenn jemand darauf Zugriff bekommt, kann er Ihren Schlüssel unbrauchbar "
"machen!"
-#: Src/wptKeyRevokeDlg.cpp:154
+#: Src/wptKeyRevokeDlg.cpp:152
msgid "Choose File to save the Certificate"
msgstr "Dateinamen für Zertifikat auswählen"
-#: Src/wptKeyRevokeDlg.cpp:163
+#: Src/wptKeyRevokeDlg.cpp:161
msgid "Please select a reason."
msgstr "Bitte geben Sie einen Grund an."
-#: Src/wptKeyRevokeDlg.cpp:192
+#: Src/wptKeyRevokeDlg.cpp:196
msgid "Revocation certificate generated."
msgstr "Widerrufzertifikat wurde erstellt."
@@ -4155,7 +4162,7 @@
msgid "Select File to Save Checksums"
msgstr "Datei auswählen zum Speichern der Prüfsummen"
-#: Src/wptMDSumDlg.cpp:274
+#: Src/wptMDSumDlg.cpp:277
#, c-format
msgid "Checksums successfully saved in '%s'"
msgstr "Prüfsummen erfolgreich in '%s' gespeichert."
Modified: trunk/Po/jp.po
===================================================================
--- trunk/Po/jp.po 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Po/jp.po 2006-07-21 08:19:24 UTC (rev 247)
@@ -5,7 +5,7 @@
msgstr ""
"Project-Id-Version: WinPT 0.10.2\n"
"Report-Msgid-Bugs-To: winpt at freakmail.de\n"
-"POT-Creation-Date: 2006-07-06 22:49+0200\n"
+"POT-Creation-Date: 2006-07-13 09:48+0200\n"
"PO-Revision-Date: 2005-12-22 07:28+0100\n"
"Last-Translator: Davar Pishva <dpishva at andrew.cmu.edu>\n"
"Language-Team: jp <jp at li.org>\n"
@@ -645,7 +645,7 @@
#: Src/wptClipVerifyDlg.cpp:207 Src/wptClipVerifyDlg.cpp:225
#: Src/wptClipVerifyDlg.cpp:237 Src/wptFileManager.cpp:1636
#: Src/wptFileManager.cpp:1689 Src/wptFileManagerDlg.cpp:591
-#: Src/wptFileVerifyDlg.cpp:82 Src/wptFileVerifyDlg.cpp:149
+#: Src/wptFileVerifyDlg.cpp:83 Src/wptFileVerifyDlg.cpp:150
#: Src/wptMainProc.cpp:179 Src/wptMainProc.cpp:239 Src/wptMainProc.cpp:253
#: Src/wptMainProc.cpp:261 Src/wptMainProc.cpp:413
msgid "Verify"
@@ -842,12 +842,12 @@
#: Src/wptClipEncryptDlg.cpp:157 Src/wptClipSignEncDlg.cpp:112
#: Src/wptCommonDlg.cpp:76 Src/wptCommonDlg.cpp:253
#: Src/wptFileManagerDlg.cpp:97 Src/wptFileManagerDlg.cpp:231
-#: Src/wptFileManagerDlg.cpp:293 Src/wptFileSaveDlg.cpp:58
+#: Src/wptFileManagerDlg.cpp:293 Src/wptFileSaveDlg.cpp:59
#: Src/wptFirstRunDlg.cpp:47 Src/wptGPGPrefsDlg.cpp:166
#: Src/wptKeyEditDlgs.cpp:359 Src/wptKeyEditDlgs.cpp:440
#: Src/wptKeyEditDlgs.cpp:506 Src/wptKeyEditDlgs.cpp:641
#: Src/wptKeyEditOwnertrustDlg.cpp:67 Src/wptKeygenDlg.cpp:382
-#: Src/wptKeygenDlg.cpp:538 Src/wptKeyRevokeDlg.cpp:81
+#: Src/wptKeygenDlg.cpp:538 Src/wptKeyRevokeDlg.cpp:79
#: Src/wptKeyserverDlg.cpp:518 Src/wptKeyserverSearchDlg.cpp:66
#: Src/wptKeysignDlg.cpp:336 Src/wptPassphraseCB.cpp:93
#: Src/wptPassphraseDlg.cpp:104 Src/wptPINDlg.cpp:54
@@ -990,10 +990,11 @@
# c:\oss\winpt\src\wptFileSaveDlg.cpp:92
# c:\oss\winpt\src\wptFileSaveDlg.cpp:97
# c:\oss\winpt\src\wptFileSaveDlg.cpp:103
-#: Src/wptClipVerifyDlg.cpp:272 Src/wptFileSaveDlg.cpp:57
-#: Src/wptFileSaveDlg.cpp:84 Src/wptFileSaveDlg.cpp:89
-#: Src/wptFileSaveDlg.cpp:95 Src/wptFileSaveDlg.cpp:99
-#: Src/wptFileSaveDlg.cpp:104 Src/wptFileSaveDlg.cpp:110
+#: Src/wptClipVerifyDlg.cpp:272 Src/wptFileSaveDlg.cpp:58
+#: Src/wptFileSaveDlg.cpp:81 Src/wptFileSaveDlg.cpp:86
+#: Src/wptFileSaveDlg.cpp:92 Src/wptFileSaveDlg.cpp:98
+#: Src/wptFileSaveDlg.cpp:100 Src/wptFileSaveDlg.cpp:108
+#: Src/wptFileSaveDlg.cpp:114 Src/wptFileSaveDlg.cpp:120
msgid "Save Plaintext"
msgstr "v[eLXgðÛ¶·é"
@@ -1356,7 +1357,7 @@
#: Src/wptFileManager.cpp:1591 Src/wptFileManager.cpp:1841
#: Src/wptFileManager.cpp:1903 Src/wptFileManagerDlg.cpp:535
#: Src/wptFileManagerDlg.cpp:638 Src/wptFileStatDlg.cpp:149
-#: Src/wptMainProc.cpp:400 Src/wptMDSumDlg.cpp:273
+#: Src/wptMainProc.cpp:400 Src/wptMDSumDlg.cpp:276 Src/wptMDSumDlg.cpp:281
msgid "File Manager"
msgstr "t@C}l[W["
@@ -1580,8 +1581,8 @@
# c:\oss\winpt\src\wptKeyserverDlg.cpp:150
#: Src/wptFileManager.cpp:1734 Src/wptFileManager.cpp:1745
#: Src/wptFileManagerDlg.cpp:250 Src/wptImportList.cpp:404
-#: Src/wptImportList.cpp:410 Src/wptImportList.cpp:420
-#: Src/wptImportList.cpp:428 Src/wptImportList.cpp:437
+#: Src/wptImportList.cpp:411 Src/wptImportList.cpp:421
+#: Src/wptImportList.cpp:429 Src/wptImportList.cpp:438
#: Src/wptKeyManager.cpp:478 Src/wptKeyManager.cpp:489
#: Src/wptKeyManager.cpp:617 Src/wptKeyserverDlg.cpp:221
msgid "Import"
@@ -1989,33 +1990,37 @@
"ó«ÌæÍ : %12skÅ·B"
# c:\oss\winpt\src\wptClipVerifyDlg.cpp:136
-#: Src/wptFileSaveDlg.cpp:59
+#: Src/wptFileSaveDlg.cpp:60
msgid "&Save additional information"
msgstr "ÇÁÌîñðÛ¶·é(&S)"
-#: Src/wptFileSaveDlg.cpp:60
+#: Src/wptFileSaveDlg.cpp:61
msgid "Save to &file"
msgstr "t@CÉÛ¶·é(&F)"
# c:\oss\winpt\src\wptMainProc.cpp:398
-#: Src/wptFileSaveDlg.cpp:61
+#: Src/wptFileSaveDlg.cpp:62
msgid "Send to &clipboard"
msgstr "Nbv{[hÉ]·é(&C)"
# c:\oss\winpt\src\wptFileSaveDlg.cpp:67
-#: Src/wptFileSaveDlg.cpp:74
+#: Src/wptFileSaveDlg.cpp:71
msgid "Destination for Plaintext"
msgstr "½¶Ì Äæ"
# c:\oss\winpt\src\wptFileSaveDlg.cpp:77
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:111
-#: Src/wptFileSaveDlg.cpp:84
+#: Src/wptFileSaveDlg.cpp:81
msgid "Please enter a filename."
msgstr "t@C¼ðü͵ľ³¢B"
+#: Src/wptFileSaveDlg.cpp:85 Src/wptKeyRevokeDlg.cpp:171
+msgid "The file name contains one or more illegal characters."
+msgstr ""
+
# c:\oss\winpt\src\wptFileSaveDlg.cpp:88
# c:\oss\winpt\src\wptFileSaveDlg.cpp:103
-#: Src/wptFileSaveDlg.cpp:95 Src/wptFileSaveDlg.cpp:110
+#: Src/wptFileSaveDlg.cpp:98 Src/wptFileSaveDlg.cpp:120
msgid "Finished"
msgstr "I¹µÜµ½B"
@@ -2025,7 +2030,7 @@
msgstr "t@CÌmF"
# c:\oss\winpt\src\wptKeyRevokersDlg.cpp:123
-#: Src/wptFileVerifyDlg.cpp:81
+#: Src/wptFileVerifyDlg.cpp:82
msgid "Do you want to retrieve the key?"
msgstr "L[ðæèoµ½¢Å·©H"
@@ -2674,7 +2679,7 @@
msgstr "íÞ"
# c:\oss\winpt\src\wptImportList.cpp:216
-#: Src/wptImportList.cpp:418
+#: Src/wptImportList.cpp:419
msgid ""
"It is possible that the ASCII-Armor is damaged\n"
"and thus a CRC error occurs."
@@ -2795,7 +2800,7 @@
msgstr "Ìt@C'%s'ªLøÈJPEGÅÍ èܹñB"
# c:\oss\winpt\src\wptKeyEditDlgs.cpp:248
-#: Src/wptKeyEditDlgs.cpp:381 Src/wptKeyRevokeDlg.cpp:168
+#: Src/wptKeyEditDlgs.cpp:381 Src/wptKeyRevokeDlg.cpp:166
msgid "Please enter a file name."
msgstr "t@C¼ðü͵ľ³¢B"
@@ -3612,7 +3617,7 @@
# c:\oss\winpt\src\wptKeyEditDlgs.cpp:342
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:118
# c:\oss\winpt\src\wptKeygenDlg.cpp:222
-#: Src/wptKeygenDlg.cpp:465 Src/wptKeyRevokeDlg.cpp:176
+#: Src/wptKeygenDlg.cpp:465 Src/wptKeyRevokeDlg.cpp:180
msgid "Please enter the passphrase."
msgstr "pXt[Yðü͵ľ³¢B"
@@ -4021,22 +4026,22 @@
msgstr "̶p^[ª\"%s\" ©Â©èܹñŵ½B"
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:74
-#: Src/wptKeyManager.cpp:1063 Src/wptKeyRevokeDlg.cpp:87
+#: Src/wptKeyManager.cpp:1063 Src/wptKeyRevokeDlg.cpp:85
msgid "0. No reason specified"
msgstr "0. R;¦³êĢܹñB"
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:75
-#: Src/wptKeyManager.cpp:1064 Src/wptKeyRevokeDlg.cpp:88
+#: Src/wptKeyManager.cpp:1064 Src/wptKeyRevokeDlg.cpp:86
msgid "1. Key has been compromised"
msgstr "1. L[ÍMpÅ«ÈÈÁĢܷB"
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:76
-#: Src/wptKeyManager.cpp:1065 Src/wptKeyRevokeDlg.cpp:89
+#: Src/wptKeyManager.cpp:1065 Src/wptKeyRevokeDlg.cpp:87
msgid "2. Key is superseded"
msgstr "2. L[Íp~³êĢܷB"
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:77
-#: Src/wptKeyManager.cpp:1066 Src/wptKeyRevokeDlg.cpp:90
+#: Src/wptKeyManager.cpp:1066 Src/wptKeyRevokeDlg.cpp:88
msgid "3. Key is no longer used"
msgstr "3. L[ÍàÍâgíêĢܹñ "
@@ -4401,10 +4406,11 @@
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:118
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:140
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:151
-#: Src/wptKeyManagerDlg.cpp:1704 Src/wptKeyRevokeDlg.cpp:70
-#: Src/wptKeyRevokeDlg.cpp:80 Src/wptKeyRevokeDlg.cpp:164
-#: Src/wptKeyRevokeDlg.cpp:169 Src/wptKeyRevokeDlg.cpp:177
-#: Src/wptKeyRevokeDlg.cpp:187 Src/wptKeyRevokeDlg.cpp:193
+#: Src/wptKeyManagerDlg.cpp:1704 Src/wptKeyRevokeDlg.cpp:68
+#: Src/wptKeyRevokeDlg.cpp:78 Src/wptKeyRevokeDlg.cpp:162
+#: Src/wptKeyRevokeDlg.cpp:167 Src/wptKeyRevokeDlg.cpp:172
+#: Src/wptKeyRevokeDlg.cpp:181 Src/wptKeyRevokeDlg.cpp:191
+#: Src/wptKeyRevokeDlg.cpp:197
msgid "Key Revocation Cert"
msgstr "L[̳ø»Ø¾"
@@ -4585,25 +4591,25 @@
msgstr "L[ð³ø»«Ì¤"
# c:\oss\winpt\src\wptImportList.cpp:187
-#: Src/wptKeyRevokeDlg.cpp:82
+#: Src/wptKeyRevokeDlg.cpp:80
msgid "Reason for revocation"
msgstr "³ø»·éR"
-#: Src/wptKeyRevokeDlg.cpp:83
+#: Src/wptKeyRevokeDlg.cpp:81
msgid "Optional description text"
msgstr "Ú×ð çí·IvVeLXg"
# c:\oss\winpt\src\wptKeygenDlg.cpp:151
-#: Src/wptKeyRevokeDlg.cpp:84
+#: Src/wptKeyRevokeDlg.cpp:82
msgid "&Passphrase"
msgstr "pXt[Y(&P)"
-#: Src/wptKeyRevokeDlg.cpp:85
+#: Src/wptKeyRevokeDlg.cpp:83
msgid "Output file"
msgstr "oÍt@C"
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:69
-#: Src/wptKeyRevokeDlg.cpp:136
+#: Src/wptKeyRevokeDlg.cpp:134
msgid ""
"Please move this certificate to a medium where it can bestored in a safe "
"place (floppy, CDR, etc..).\n"
@@ -4615,17 +4621,17 @@
"ªÅ«Ü·I"
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:98
-#: Src/wptKeyRevokeDlg.cpp:154
+#: Src/wptKeyRevokeDlg.cpp:152
msgid "Choose File to save the Certificate"
msgstr "ؾðÛ¶·ét@CðIð·é"
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:107
-#: Src/wptKeyRevokeDlg.cpp:163
+#: Src/wptKeyRevokeDlg.cpp:161
msgid "Please select a reason."
msgstr "RðIñž³¢B"
# c:\oss\winpt\src\wptKeyRevokeDlg.cpp:148
-#: Src/wptKeyRevokeDlg.cpp:192
+#: Src/wptKeyRevokeDlg.cpp:196
msgid "Revocation certificate generated."
msgstr "³ø»Ø¾ªì¬³êܵ½B"
@@ -5376,7 +5382,7 @@
msgstr "`FbNTðÛ¶·é½ßÌt@CðIð·é"
# c:\oss\winpt\src\wptKeyManager.cpp:360
-#: Src/wptMDSumDlg.cpp:274
+#: Src/wptMDSumDlg.cpp:277
#, c-format
msgid "Checksums successfully saved in '%s'"
msgstr "`FbNTð³µ'%s'ÉÛ¶·é±Æªoܵ½B"
Modified: trunk/Po/pt_BR.po
===================================================================
--- trunk/Po/pt_BR.po 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Po/pt_BR.po 2006-07-21 08:19:24 UTC (rev 247)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: WinPT 1.0.0\n"
"Report-Msgid-Bugs-To: winpt at freakmail.de\n"
-"POT-Creation-Date: 2006-07-06 22:49+0200\n"
+"POT-Creation-Date: 2006-07-13 09:48+0200\n"
"PO-Revision-Date: 2006-06-14 22:00-0300\n"
"Last-Translator: Eduardo S. Dobay <edudobay at gmail.com>\n"
"Language-Team: Brazilian Portuguese <ldp-br at bazar.conectiva.com.br>\n"
@@ -496,7 +496,7 @@
#: Src/wptClipVerifyDlg.cpp:207 Src/wptClipVerifyDlg.cpp:225
#: Src/wptClipVerifyDlg.cpp:237 Src/wptFileManager.cpp:1636
#: Src/wptFileManager.cpp:1689 Src/wptFileManagerDlg.cpp:591
-#: Src/wptFileVerifyDlg.cpp:82 Src/wptFileVerifyDlg.cpp:149
+#: Src/wptFileVerifyDlg.cpp:83 Src/wptFileVerifyDlg.cpp:150
#: Src/wptMainProc.cpp:179 Src/wptMainProc.cpp:239 Src/wptMainProc.cpp:253
#: Src/wptMainProc.cpp:261 Src/wptMainProc.cpp:413
msgid "Verify"
@@ -644,12 +644,12 @@
#: Src/wptClipEncryptDlg.cpp:157 Src/wptClipSignEncDlg.cpp:112
#: Src/wptCommonDlg.cpp:76 Src/wptCommonDlg.cpp:253
#: Src/wptFileManagerDlg.cpp:97 Src/wptFileManagerDlg.cpp:231
-#: Src/wptFileManagerDlg.cpp:293 Src/wptFileSaveDlg.cpp:58
+#: Src/wptFileManagerDlg.cpp:293 Src/wptFileSaveDlg.cpp:59
#: Src/wptFirstRunDlg.cpp:47 Src/wptGPGPrefsDlg.cpp:166
#: Src/wptKeyEditDlgs.cpp:359 Src/wptKeyEditDlgs.cpp:440
#: Src/wptKeyEditDlgs.cpp:506 Src/wptKeyEditDlgs.cpp:641
#: Src/wptKeyEditOwnertrustDlg.cpp:67 Src/wptKeygenDlg.cpp:382
-#: Src/wptKeygenDlg.cpp:538 Src/wptKeyRevokeDlg.cpp:81
+#: Src/wptKeygenDlg.cpp:538 Src/wptKeyRevokeDlg.cpp:79
#: Src/wptKeyserverDlg.cpp:518 Src/wptKeyserverSearchDlg.cpp:66
#: Src/wptKeysignDlg.cpp:336 Src/wptPassphraseCB.cpp:93
#: Src/wptPassphraseDlg.cpp:104 Src/wptPINDlg.cpp:54
@@ -747,10 +747,11 @@
msgid "Could not extract key or signature information."
msgstr "Não foi possível extrair as informações da chave ou da assinatura."
-#: Src/wptClipVerifyDlg.cpp:272 Src/wptFileSaveDlg.cpp:57
-#: Src/wptFileSaveDlg.cpp:84 Src/wptFileSaveDlg.cpp:89
-#: Src/wptFileSaveDlg.cpp:95 Src/wptFileSaveDlg.cpp:99
-#: Src/wptFileSaveDlg.cpp:104 Src/wptFileSaveDlg.cpp:110
+#: Src/wptClipVerifyDlg.cpp:272 Src/wptFileSaveDlg.cpp:58
+#: Src/wptFileSaveDlg.cpp:81 Src/wptFileSaveDlg.cpp:86
+#: Src/wptFileSaveDlg.cpp:92 Src/wptFileSaveDlg.cpp:98
+#: Src/wptFileSaveDlg.cpp:100 Src/wptFileSaveDlg.cpp:108
+#: Src/wptFileSaveDlg.cpp:114 Src/wptFileSaveDlg.cpp:120
msgid "Save Plaintext"
msgstr "Salvar texto puro"
@@ -1010,7 +1011,7 @@
#: Src/wptFileManager.cpp:1591 Src/wptFileManager.cpp:1841
#: Src/wptFileManager.cpp:1903 Src/wptFileManagerDlg.cpp:535
#: Src/wptFileManagerDlg.cpp:638 Src/wptFileStatDlg.cpp:149
-#: Src/wptMainProc.cpp:400 Src/wptMDSumDlg.cpp:273
+#: Src/wptMainProc.cpp:400 Src/wptMDSumDlg.cpp:276 Src/wptMDSumDlg.cpp:281
msgid "File Manager"
msgstr "Gerenciador de arquivos"
@@ -1180,8 +1181,8 @@
#: Src/wptFileManager.cpp:1734 Src/wptFileManager.cpp:1745
#: Src/wptFileManagerDlg.cpp:250 Src/wptImportList.cpp:404
-#: Src/wptImportList.cpp:410 Src/wptImportList.cpp:420
-#: Src/wptImportList.cpp:428 Src/wptImportList.cpp:437
+#: Src/wptImportList.cpp:411 Src/wptImportList.cpp:421
+#: Src/wptImportList.cpp:429 Src/wptImportList.cpp:438
#: Src/wptKeyManager.cpp:478 Src/wptKeyManager.cpp:489
#: Src/wptKeyManager.cpp:617 Src/wptKeyserverDlg.cpp:221
msgid "Import"
@@ -1476,27 +1477,31 @@
"Capacidade total: %12sk\n"
"Espaço livre : %12sk"
-#: Src/wptFileSaveDlg.cpp:59
+#: Src/wptFileSaveDlg.cpp:60
msgid "&Save additional information"
msgstr "&Salvar informação adicional"
-#: Src/wptFileSaveDlg.cpp:60
+#: Src/wptFileSaveDlg.cpp:61
msgid "Save to &file"
msgstr "Salvar em &arquivo"
-#: Src/wptFileSaveDlg.cpp:61
+#: Src/wptFileSaveDlg.cpp:62
msgid "Send to &clipboard"
msgstr "Enviar para área de &transferência"
-#: Src/wptFileSaveDlg.cpp:74
+#: Src/wptFileSaveDlg.cpp:71
msgid "Destination for Plaintext"
msgstr "Destino para texto puro"
-#: Src/wptFileSaveDlg.cpp:84
+#: Src/wptFileSaveDlg.cpp:81
msgid "Please enter a filename."
msgstr "Por favor insira um nome de arquivo."
-#: Src/wptFileSaveDlg.cpp:95 Src/wptFileSaveDlg.cpp:110
+#: Src/wptFileSaveDlg.cpp:85 Src/wptKeyRevokeDlg.cpp:171
+msgid "The file name contains one or more illegal characters."
+msgstr ""
+
+#: Src/wptFileSaveDlg.cpp:98 Src/wptFileSaveDlg.cpp:120
msgid "Finished"
msgstr "Concluído"
@@ -1504,7 +1509,7 @@
msgid "File Verify"
msgstr "Verificar arquivo"
-#: Src/wptFileVerifyDlg.cpp:81
+#: Src/wptFileVerifyDlg.cpp:82
msgid "Do you want to retrieve the key?"
msgstr "Você deseja recuperar a chave?"
@@ -1958,7 +1963,7 @@
msgid "Type"
msgstr "Tipo"
-#: Src/wptImportList.cpp:418
+#: Src/wptImportList.cpp:419
msgid ""
"It is possible that the ASCII-Armor is damaged\n"
"and thus a CRC error occurs."
@@ -2050,7 +2055,7 @@
msgid "'%s' is not a valid JPEG file."
msgstr "'%s' não é um arquivo JPEG válido."
-#: Src/wptKeyEditDlgs.cpp:381 Src/wptKeyRevokeDlg.cpp:168
+#: Src/wptKeyEditDlgs.cpp:381 Src/wptKeyRevokeDlg.cpp:166
msgid "Please enter a file name."
msgstr "Por favor insira um nome de arquivo."
@@ -2686,7 +2691,7 @@
msgid "Please do NOT enter the email address in the comment field."
msgstr "Por favor NÃO insira o e-mail no campo comentário."
-#: Src/wptKeygenDlg.cpp:465 Src/wptKeyRevokeDlg.cpp:176
+#: Src/wptKeygenDlg.cpp:465 Src/wptKeyRevokeDlg.cpp:180
msgid "Please enter the passphrase."
msgstr "Por favor insira a frase secreta."
@@ -3025,19 +3030,19 @@
msgid "String pattern \"%s\" not found."
msgstr "Padrão \"%s\" não encontrado."
-#: Src/wptKeyManager.cpp:1063 Src/wptKeyRevokeDlg.cpp:87
+#: Src/wptKeyManager.cpp:1063 Src/wptKeyRevokeDlg.cpp:85
msgid "0. No reason specified"
msgstr "0. Nenhuma razão especificada"
-#: Src/wptKeyManager.cpp:1064 Src/wptKeyRevokeDlg.cpp:88
+#: Src/wptKeyManager.cpp:1064 Src/wptKeyRevokeDlg.cpp:86
msgid "1. Key has been compromised"
msgstr "1. Chave foi comprometida"
-#: Src/wptKeyManager.cpp:1065 Src/wptKeyRevokeDlg.cpp:89
+#: Src/wptKeyManager.cpp:1065 Src/wptKeyRevokeDlg.cpp:87
msgid "2. Key is superseded"
msgstr "2. Chave foi substituída"
-#: Src/wptKeyManager.cpp:1066 Src/wptKeyRevokeDlg.cpp:90
+#: Src/wptKeyManager.cpp:1066 Src/wptKeyRevokeDlg.cpp:88
msgid "3. Key is no longer used"
msgstr "3. Chave não é mais usada"
@@ -3309,10 +3314,11 @@
msgid "Key already revoked!"
msgstr "Chave já revogada!"
-#: Src/wptKeyManagerDlg.cpp:1704 Src/wptKeyRevokeDlg.cpp:70
-#: Src/wptKeyRevokeDlg.cpp:80 Src/wptKeyRevokeDlg.cpp:164
-#: Src/wptKeyRevokeDlg.cpp:169 Src/wptKeyRevokeDlg.cpp:177
-#: Src/wptKeyRevokeDlg.cpp:187 Src/wptKeyRevokeDlg.cpp:193
+#: Src/wptKeyManagerDlg.cpp:1704 Src/wptKeyRevokeDlg.cpp:68
+#: Src/wptKeyRevokeDlg.cpp:78 Src/wptKeyRevokeDlg.cpp:162
+#: Src/wptKeyRevokeDlg.cpp:167 Src/wptKeyRevokeDlg.cpp:172
+#: Src/wptKeyRevokeDlg.cpp:181 Src/wptKeyRevokeDlg.cpp:191
+#: Src/wptKeyRevokeDlg.cpp:197
msgid "Key Revocation Cert"
msgstr "Certificado de revogação da chave"
@@ -3470,23 +3476,23 @@
msgid "Key Revokers"
msgstr "Revogadores de chave"
-#: Src/wptKeyRevokeDlg.cpp:82
+#: Src/wptKeyRevokeDlg.cpp:80
msgid "Reason for revocation"
msgstr "Razão para revogação"
-#: Src/wptKeyRevokeDlg.cpp:83
+#: Src/wptKeyRevokeDlg.cpp:81
msgid "Optional description text"
msgstr "Texto descritivo opcional"
-#: Src/wptKeyRevokeDlg.cpp:84
+#: Src/wptKeyRevokeDlg.cpp:82
msgid "&Passphrase"
msgstr "&Frase secreta"
-#: Src/wptKeyRevokeDlg.cpp:85
+#: Src/wptKeyRevokeDlg.cpp:83
msgid "Output file"
msgstr "Arquivo de saída"
-#: Src/wptKeyRevokeDlg.cpp:136
+#: Src/wptKeyRevokeDlg.cpp:134
msgid ""
"Please move this certificate to a medium where it can bestored in a safe "
"place (floppy, CDR, etc..).\n"
@@ -3498,15 +3504,15 @@
"Se uma pessoa mal-intencionada tiver acesso a esse certificado, ela pode usá-"
"lo para tornar sua chave inutilizável!"
-#: Src/wptKeyRevokeDlg.cpp:154
+#: Src/wptKeyRevokeDlg.cpp:152
msgid "Choose File to save the Certificate"
msgstr "Escolha o arquivo para salvar o certificado"
-#: Src/wptKeyRevokeDlg.cpp:163
+#: Src/wptKeyRevokeDlg.cpp:161
msgid "Please select a reason."
msgstr "Por favor selecione uma razão."
-#: Src/wptKeyRevokeDlg.cpp:192
+#: Src/wptKeyRevokeDlg.cpp:196
msgid "Revocation certificate generated."
msgstr "Certificado de revogação gerado."
@@ -4079,7 +4085,7 @@
msgid "Select File to Save Checksums"
msgstr "Selecione o arquivo para salvar as somas de verificação"
-#: Src/wptMDSumDlg.cpp:274
+#: Src/wptMDSumDlg.cpp:277
#, c-format
msgid "Checksums successfully saved in '%s'"
msgstr "Somas de verificação salvas com sucesso em '%s'"
Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/ChangeLog 2006-07-21 08:19:24 UTC (rev 247)
@@ -1,3 +1,13 @@
+2006-07-10 Timo Schulz <ts at g10code.de>
+
+ * wptUtil.cpp (check_file_name): New.
+ * wptKeyRevokeDlg.cpp (mk_cert_name): Avoid illegal chars.
+ (key_revoke_dlg_proc): Likewise.
+ * wptMDSumDlg.cpp (mdsum_dlg_proc): Corrected file handling.
+ * wptImportList.cpp (implist_load): Likewise.
+ * wptFileSaveDlg.cpp (file_save_dlg_proc): Likewise.
+ * wptFileVerifyDlg.cpp (file_verify_dlg_proc): Hide dialog item.
+
2006-07-05 Timo Schulz <ts at g10code.de>
* wptMainProc.cpp (winpt_main_proc): Change menu texts.
Modified: trunk/Src/wptFileSaveDlg.cpp
===================================================================
--- trunk/Src/wptFileSaveDlg.cpp 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/wptFileSaveDlg.cpp 2006-07-21 08:19:24 UTC (rev 247)
@@ -1,5 +1,5 @@
-/* wptFileSaveDlg.cpp - Save a file
- * Copyright (C) 2002, 2003, 2005 Timo Schulz
+/* wptFileSaveDlg.cpp - Extract plaintext and save it to a file
+ * Copyright (C) 2002, 2003, 2005, 2006 Timo Schulz
*
* This file is part of WinPT.
*
@@ -30,6 +30,7 @@
#include "wptW32API.h"
#include "wptErrors.h"
+
static void
switch_buttons (HWND dlg, int file)
{
@@ -50,7 +51,7 @@
gpgme_error_t err;
const char *filename;
int has_data;
- char file[768];
+ char file[MAX_PATH+128];
switch (msg) {
case WM_INITDIALOG:
@@ -59,61 +60,70 @@
SetDlgItemText (dlg, IDC_FILE_SAVE, _("&Save additional information"));
SetDlgItemText (dlg, IDC_FILE_SAVE_TOFILE, _("Save to &file"));
SetDlgItemText (dlg, IDC_FILE_SAVE_CLIP, _("Send to &clipboard"));
- switch_buttons (dlg, 0);
+ switch_buttons (dlg, 1);
+ center_window (dlg, NULL);
SetForegroundWindow (dlg);
return TRUE;
- case WM_SYSCOMMAND:
- if (LOWORD (wparam) == SC_CLOSE)
- EndDialog (dlg, TRUE);
- return FALSE;
-
case WM_COMMAND:
- switch ( LOWORD(wparam) ) {
+ switch (LOWORD (wparam)) {
case IDC_FILE_SAVE_SELECT:
- filename = get_filesave_dlg( dlg, _("Destination for Plaintext"), NULL, NULL );
- if( filename ) {
- SetDlgItemText( dlg, IDC_FILE_SAVE_FILE, filename );
- switch_buttons( dlg, 1 );
+ filename = get_filesave_dlg (dlg, _("Destination for Plaintext"), NULL, NULL);
+ if (filename) {
+ SetDlgItemText (dlg, IDC_FILE_SAVE_FILE, filename);
+ switch_buttons (dlg, 1);
}
return TRUE;
case IDOK:
- if( IsDlgButtonChecked( dlg, IDC_FILE_SAVE_TOFILE ) ) {
- if( !GetDlgItemText( dlg, IDC_FILE_SAVE_FILE, file, sizeof file - 1 ) ) {
- msg_box( dlg, _("Please enter a filename."), _("Save Plaintext"), MB_INFO );
- return FALSE;
+ if (IsDlgButtonChecked (dlg, IDC_FILE_SAVE_TOFILE)) {
+ if (!GetDlgItemText (dlg, IDC_FILE_SAVE_FILE, file, sizeof (file) - 1)) {
+ msg_box (dlg, _("Please enter a filename."), _("Save Plaintext"), MB_INFO);
+ return TRUE;
}
+ if (check_file_name (file, IS_PATH)) {
+ msg_box (dlg, _("The file name contains one or more illegal characters."),
+ _("Save Plaintext"), MB_ERR);
+ return TRUE;
+ }
err = gpg_data_new_from_clipboard (&sig, 0);
- if( err ) {
- msg_box( dlg, winpt_strerror( WPTERR_CLIP_GET ), _("Save Plaintext"), MB_ERR );
- return FALSE;
+ if (err) {
+ msg_box (dlg, winpt_strerror (WPTERR_CLIP_GET),
+ _("Save Plaintext"), MB_ERR);
+ return TRUE;
}
- gpg_data_extract_plaintext( sig, &plain );
- gpg_data_release_and_set_file( plain, file );
- gpgme_data_release( sig );
- msg_box( dlg, _("Finished"), _("Save Plaintext"), MB_OK );
+ gpg_data_extract_plaintext (sig, &plain);
+ err = gpg_data_release_and_set_file (plain, file);
+ if (!err)
+ msg_box (dlg, _("Finished"), _("Save Plaintext"), MB_OK);
+ else {
+ msg_box (dlg, gpgme_strerror (err), _("Save Plaintext"), MB_ERR);
+ gpgme_data_release (plain);
+ }
+ gpgme_data_release (sig);
}
- else if( IsDlgButtonChecked( dlg, IDC_FILE_SAVE_CLIP ) ) {
- if( !gpg_clip_istext_avail( &has_data ) && !has_data ) {
- msg_box( dlg, winpt_strerror( WPTERR_CLIP_ISEMPTY ), _("Save Plaintext"), MB_ERR );
+ else if (IsDlgButtonChecked (dlg, IDC_FILE_SAVE_CLIP)) {
+ if (!gpg_clip_istext_avail (&has_data) && !has_data) {
+ msg_box (dlg, winpt_strerror (WPTERR_CLIP_ISEMPTY),
+ _("Save Plaintext"), MB_ERR);
return FALSE;
}
err = gpg_data_new_from_clipboard (&sig, 0);
- if( err ) {
- msg_box( dlg, winpt_strerror( WPTERR_CLIP_GET ), _("Save Plaintext"), MB_ERR );
+ if (err) {
+ msg_box (dlg, winpt_strerror (WPTERR_CLIP_GET),
+ _("Save Plaintext"), MB_ERR);
return FALSE;
}
- gpg_data_extract_plaintext( sig, &plain );
- gpg_data_release_and_set_clipboard( plain, 0 );
- gpgme_data_release( sig );
- msg_box( dlg, _("Finished"), _("Save Plaintext"), MB_OK );
+ gpg_data_extract_plaintext (sig, &plain);
+ gpg_data_release_and_set_clipboard (plain, 0);
+ gpgme_data_release (sig);
+ msg_box (dlg, _("Finished"), _("Save Plaintext"), MB_OK);
}
- EndDialog( dlg, TRUE );
+ EndDialog (dlg, TRUE);
return TRUE;
case IDCANCEL:
- EndDialog( dlg, FALSE );
+ EndDialog (dlg, FALSE);
return FALSE;
}
break;
Modified: trunk/Src/wptFileVerifyDlg.cpp
===================================================================
--- trunk/Src/wptFileVerifyDlg.cpp 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/wptFileVerifyDlg.cpp 2006-07-21 08:19:24 UTC (rev 247)
@@ -52,6 +52,7 @@
verlist_build (&vlv, GetDlgItem (dlg, IDC_VERIFY_SIGLIST), 1);
verlist_set_info_control (vlv, GetDlgItem (dlg, IDC_VERIFY_INFO));
EnableWindow (GetDlgItem (dlg, IDC_VERIFY_SAVE), FALSE);
+ ShowWindow (GetDlgItem (dlg, IDC_VERIFY_SIGNOT), SW_HIDE);
SetForegroundWindow (dlg);
dlg_vlv = vlv;
dlg_wnd = dlg;
Modified: trunk/Src/wptGPGMEData.cpp
===================================================================
--- trunk/Src/wptGPGMEData.cpp 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/wptGPGMEData.cpp 2006-07-21 08:19:24 UTC (rev 247)
@@ -165,7 +165,6 @@
}
-
/* Extract the plaintext data from the escaped data object @sig.
The plaintxt is stored in @r_plain.
Return value: 0 on success. */
@@ -193,7 +192,7 @@
/* We just support 1 nesting level. */
while (gpg_data_readline (sig, line, 128) > 0 ) {
- if (!strncmp( line, "-----BEGIN PGP SIGNATURE", 24))
+ if (!strncmp (line, "-----BEGIN PGP SIGNATURE", 24))
break; /* end of plaintext */
if (!strncmp (line, "- -", 3))
pos = 2;
Modified: trunk/Src/wptGPGMEWrapper.cpp
===================================================================
--- trunk/Src/wptGPGMEWrapper.cpp 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/wptGPGMEWrapper.cpp 2006-07-21 08:19:24 UTC (rev 247)
@@ -85,6 +85,8 @@
return err;
}
err = gpg_data_release_and_set_file (dat, outfile);
+ if (err)
+ gpgme_data_release (dat);
return err;
}
Modified: trunk/Src/wptImportList.cpp
===================================================================
--- trunk/Src/wptImportList.cpp 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/wptImportList.cpp 2006-07-21 08:19:24 UTC (rev 247)
@@ -1,4 +1,4 @@
-/* wptImportList.cpp
+/* wptImportList.cpp - Key import list
* Copyright (C) 2001-2006 Timo Schulz
* Copyright (C) 2005 g10 Code GmbH
*
@@ -401,12 +401,13 @@
if (!file) {
err = gpg_data_new_from_clipboard (&list, 0);
if (err) {
- msg_box (NULL, gpgme_strerror( err ), _("Import"), MB_ERR);
+ msg_box (NULL, gpgme_strerror (err), _("Import"), MB_ERR);
return WPTERR_CLIP_OPEN;
}
- get_temp_name (fname, 299, "in_gpg_keys");
+ get_temp_name (fname, sizeof (fname)-1, "in_gpg_keys");
err = gpg_data_release_and_set_file (list, fname);
if (err) {
+ gpgme_data_release (list);
msg_box (NULL, gpgme_strerror (err), _("Import"), MB_ERR);
return WPTERR_FILE_CREAT;
}
Modified: trunk/Src/wptKeyManager.cpp
===================================================================
--- trunk/Src/wptKeyManager.cpp 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/wptKeyManager.cpp 2006-07-21 08:19:24 UTC (rev 247)
@@ -54,7 +54,7 @@
/* Remove all kind of invalid characters which would
result in an illegal file name. */
-static void
+void
secure_filename (char *file, size_t len)
{
char *p = file;
Modified: trunk/Src/wptKeyRevokeDlg.cpp
===================================================================
--- trunk/Src/wptKeyRevokeDlg.cpp 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/wptKeyRevokeDlg.cpp 2006-07-21 08:19:24 UTC (rev 247)
@@ -36,23 +36,21 @@
#include "wptNLS.h"
#include "wptUTF8.h"
+void secure_filename (char *file, size_t len);
+
/* Generate a file template for the cert based on the key
with the keyid @keyid. */
static void
mk_cert_fname (const char *keyid, char *fname, size_t flen)
{
winpt_key_s k;
- size_t i;
memset (&k, 0, sizeof (k));
if (winpt_get_pubkey (keyid, &k))
BUG (NULL);
_snprintf (fname, flen-1, "%s_RevocationCert.asc", k.ext->uids->name);
- for (i=0; i < strlen (fname); i++) {
- if (fname[i] == ' ')
- fname[i] = '_';
- }
+ secure_filename (fname, strlen (fname));
}
@@ -65,8 +63,8 @@
err = gpgme_data_new_from_mem (&rev, revcert, strlen (revcert), 1);
if (!err)
- gpg_data_release_and_set_file (rev, fname);
- else
+ err = gpg_data_release_and_set_file (rev, fname);
+ if (err)
msg_box (NULL, gpgme_strerror (err), _("Key Revocation Cert"), MB_ERR);
safe_free (revcert);
}
@@ -169,6 +167,12 @@
_("Key Revocation Cert"), MB_ERR);
return TRUE;
}
+ if (check_file_name (file, IS_PATH)) {
+ msg_box (dlg, _("The file name contains one or more illegal characters."),
+ _("Key Revocation Cert"), MB_ERR);
+ return TRUE;
+ }
+
use_desc = 1;
if (!GetDlgItemText_utf8 (dlg, IDC_KEYREVOKE_TEXT, &desc))
use_desc = 0;
Modified: trunk/Src/wptMDSumDlg.cpp
===================================================================
--- trunk/Src/wptMDSumDlg.cpp 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/wptMDSumDlg.cpp 2006-07-21 08:19:24 UTC (rev 247)
@@ -190,7 +190,7 @@
{1, 160, (char *)_("Name")},
{0, 0, 0}
};
- gpgme_data_t sumlist;
+ gpgme_data_t sumlist = NULL;
const char *name, *algname;
char fname[MAX_PATH+64], mdasc[MAX_HASHSIZE*4];
int i;
@@ -269,11 +269,18 @@
name = get_filesave_dlg (dlg, _("Select File to Save Checksums"),
NULL, fname);
if (name && *name) {
- gpg_data_release_and_set_file (sumlist, name);
- log_box (_("File Manager"), MB_OK,
- _("Checksums successfully saved in '%s'"), name);
+ gpgme_error_t err;
+
+ err = gpg_data_release_and_set_file (sumlist, name);
+ if (!err) {
+ log_box (_("File Manager"), MB_OK,
+ _("Checksums successfully saved in '%s'"), name);
+ sumlist = NULL;
+ }
+ else
+ msg_box (dlg, gpgme_strerror (err), _("File Manager"), MB_ERR);
}
- else
+ if (sumlist)
gpgme_data_release (sumlist);
break;
}
Modified: trunk/Src/wptUtil.cpp
===================================================================
--- trunk/Src/wptUtil.cpp 2006-07-11 08:55:57 UTC (rev 246)
+++ trunk/Src/wptUtil.cpp 2006-07-21 08:19:24 UTC (rev 247)
@@ -90,6 +90,29 @@
}
+/* Check if @fname is a valid file name on a Window file system.
+ If is_path = 1, @fname is treated as a file name without any separators. */
+int
+check_file_name (const char *fname, int is_path)
+{
+ const char *not_allowed = "/*?\"<>|";
+ size_t i;
+
+ /* If we are not in path mode (@is_path = 1) we also consider
+ path separators as illegal chars. */
+ if (!is_path) {
+ if (strchr (fname, ':') || strchr (fname, '\\'))
+ return -1;
+ }
+
+ for (i=0; i < strlen (fname); i++) {
+ if (strchr (not_allowed, fname[i]))
+ return -1;
+ }
+ return 0;
+}
+
+
/* Check if the email address @email only contain valid characters.
Return 0 on success. */
int
More information about the Winpt-commits
mailing list