[Winpt-commits] r105 - in trunk: . Include Po Src
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Wed Nov 30 11:22:15 CET 2005
Author: twoaday
Date: 2005-11-30 11:22:00 +0100 (Wed, 30 Nov 2005)
New Revision: 105
Modified:
trunk/Include/ChangeLog
trunk/Include/wptFileManager.h
trunk/NEWS
trunk/Po/ChangeLog
trunk/Po/de.po
trunk/Src/ChangeLog
trunk/Src/WinPT-en.rc
trunk/Src/resource.h
trunk/Src/wptClipEditDlg.cpp
trunk/Src/wptClipEncryptDlg.cpp
trunk/Src/wptClipSignEncDlg.cpp
trunk/Src/wptCommonDlg.cpp
trunk/Src/wptFileManager.cpp
trunk/Src/wptFileManagerDlg.cpp
trunk/Src/wptFileSaveDlg.cpp
trunk/Src/wptFirstRunDlg.cpp
trunk/Src/wptKeyEditDlgs.cpp
trunk/Src/wptKeyEditOwnertrustDlg.cpp
trunk/Src/wptKeyRevokeDlg.cpp
trunk/Src/wptKeygenDlg.cpp
trunk/Src/wptKeylist.cpp
trunk/Src/wptKeyserverSearchDlg.cpp
trunk/Src/wptMainProc.cpp
trunk/Src/wptPINDlg.cpp
trunk/Src/wptPassphraseCB.cpp
trunk/Src/wptPreferencesDlg.cpp
trunk/Src/wptW32API.cpp
Log:
Several cleanups and improved translation.
Modified: trunk/Include/ChangeLog
===================================================================
--- trunk/Include/ChangeLog 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Include/ChangeLog 2005-11-30 10:22:00 UTC (rev 105)
@@ -1,3 +1,7 @@
+2005-11-30 Timo Schulz <ts at g10code.com>
+
+ * wptFileManager.h: Add data constants.
+
2005-11-16 Timo Schulz <ts at g10code.com>
* wptVersion.h: Define WIN32_LEAN_AND_MEAN.
Modified: trunk/Include/wptFileManager.h
===================================================================
--- trunk/Include/wptFileManager.h 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Include/wptFileManager.h 2005-11-30 10:22:00 UTC (rev 105)
@@ -68,6 +68,12 @@
};
typedef struct fm_state_s * fm_state_t;
+enum file_data_flag_t {
+ F_DATA_WRITE = 0,
+ F_DATA_READ = 1,
+ F_DATA_NOMAP = 2
+};
+
/* Gpg file handle. */
struct file_data_s {
struct gpgme_data_cbs cbs;
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/NEWS 2005-11-30 10:22:00 UTC (rev 105)
@@ -674,3 +674,6 @@
(0.11.2)
* Modify --keymanager so there is just one instance.
+* Detect 'gpg --sign' output in the file manager and
+ do not assume 'ENCRYPTED'.
+
\ No newline at end of file
Modified: trunk/Po/ChangeLog
===================================================================
--- trunk/Po/ChangeLog 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Po/ChangeLog 2005-11-30 10:22:00 UTC (rev 105)
@@ -1,139 +1,143 @@
-2001-01-10 Timo Schulz <twoaday at freakmail.de>
-
- * winpt-de.mo: Add translation for German.
-
-2001-02-01 Timo Schulz <twoaday at freakmail.de>
-
- * winpt-it.mo: Add translation for Italy.
-
-2001-02-20 Timo Schulz <ts at winpt.org>
-
- * winpt-fr.mo: Add translation for French.
-
-2001-02-21 Timo Schulz <ts at winpt.org>
-
- * Mo/: New. Directory to store the precompiled message catalogues.
- * build-mo.bat: New. Batch to create the .mo files.
-
-2001-02-25 Timo Schulz <ts at winpt.org>
-
- * winpt-fr.mo: Update French translation file.
-
-2001-03-17 Timo Schulz <ts at winpt.org>
-
- * build-pot:bat: New. Batch to create winpt.pot.
- * potfiles: New. All files with NLS strings.
-
-2001-03-27 Timo Schulz <ts at winpt.org>
-
- * winpt-es.mo: Add translation for Espanol
-
-2001-04-13 Timo Schulz <ts at winpt.org>
-
- * build-diff.bat: New. Create diffs between the new pot file
- and any existing translation file.
-
-2001-04-23 Timo Schulz <ts at winpt.org>
-
- * winpt-it.mo: Updated.
-
-2001-04-24 Timo Schulz <ts at winpt.org>
-
- * winpt-fr.mo: Updated.
-
-2001-04-29 Timo Schulz <ts at winpt.org>
-
- * potfiles: Updated.
-
-2001-05-18 Timo Schulz <ts at winpt.org>
-
- * winpt-ru.mo: New. Russian translation.
- * potfiles: Updated.
-
-2001-05-22 Timo Schulz <ts at winpt.org>
-
- * build-mo.bat, build-diff.bat: Add Russian translation.
-
-2001-06-07 Timo Schulz <ts at winpt.org>
-
- * winpt-de.mo: Updated.
-
-2001-07-16 Timo Schulz <ts at winpt.org>
-
- * winpt-pt_BR.po: New. Brazilian (Portuguese) translation.
-
-2001-07-25 Timo Schulz <ts at winpt.org>
-
- * winpt-fr.po: Updated.
-
-2001-08-08 Timo Schulz <ts at winpt.org>
-
- * winpt-pt_PT.po. New. Pure Portuguese translation.
- * build-pot.bat, build-mo.bat, build-diff.bat: Insert GPL notice
- and add the newest language.
-
-2001-08-09 Timo Schulz <ts at winpt.org>
-
- * winpt-fr, winpt-ru.po: Updated.
-
-2001-08-25 Timo Schulz <ts at winpt.org>
-
- * winpt-it.mo: Updated.
-
-2001-08-28 Timo Schulz <ts at winpt.org>
-
- * winpt-es.mo: Updated.
-
-2001-09-23 Timo Schulz <ts at winpt.org>
-
- * winpt-de.mo: Updated.
-
-2001-10-10 Timo Schulz <ts at winpt.org>
-
- * winpt-de.po: Updated.
-
-2001-11-01 Timo Schulz <ts at winpt.org>
-
- * winpt-es.po: Updated.
- * winpt-ru.po: Updated.
-
-2001-11-10 Timo Schulz <ts at winpt.org>
-
- * winpt-hu.po: New.
-
-2001-11-12 Timo Schulz <ts at winpt.org>
-
- * winpt-hu.po: Updated.
-
-2001-11-17 Timo Schulz <ts at winpt.org>
-
- * winpt-it.po: Updated.
- * winpt-zh-CN.po: New.
-
-2002-02-07 Timo Schulz <ts at winpt.org>
-
- * winpt-de.po: A lot of updates.
-
- * We don't use fuzzy translations any longer. I'm not sure
- if this is a W32 problem, but now it works so there is no
- need to change this.
-
-2002-02-23 Timo Schulz <ts at winpt.org>
-
- * Renamed all files. We only use the winpt-xx names for the
- mo files.
-
- * de.po: Some fixes.
-
-2002-03-29 Timo Schulz <ts at winpt.org>
-
- * de.po: Some more fixes.
-
-2003-09-01 Timo Schulz <ts at winpt.org>
-
- * es.po: Updated by Pedro José <pedrojgm at hotmail.com>.
-
-2004-02-04 Timo Schulz <twoaday at freakmail.de>
-
- * Updated a lot of stuff.
-
+2001-01-10 Timo Schulz <twoaday at freakmail.de>
+
+ * winpt-de.mo: Add translation for German.
+
+2001-02-01 Timo Schulz <twoaday at freakmail.de>
+
+ * winpt-it.mo: Add translation for Italy.
+
+2001-02-20 Timo Schulz <ts at winpt.org>
+
+ * winpt-fr.mo: Add translation for French.
+
+2001-02-21 Timo Schulz <ts at winpt.org>
+
+ * Mo/: New. Directory to store the precompiled message catalogues.
+ * build-mo.bat: New. Batch to create the .mo files.
+
+2001-02-25 Timo Schulz <ts at winpt.org>
+
+ * winpt-fr.mo: Update French translation file.
+
+2001-03-17 Timo Schulz <ts at winpt.org>
+
+ * build-pot:bat: New. Batch to create winpt.pot.
+ * potfiles: New. All files with NLS strings.
+
+2001-03-27 Timo Schulz <ts at winpt.org>
+
+ * winpt-es.mo: Add translation for Espanol
+
+2001-04-13 Timo Schulz <ts at winpt.org>
+
+ * build-diff.bat: New. Create diffs between the new pot file
+ and any existing translation file.
+
+2001-04-23 Timo Schulz <ts at winpt.org>
+
+ * winpt-it.mo: Updated.
+
+2001-04-24 Timo Schulz <ts at winpt.org>
+
+ * winpt-fr.mo: Updated.
+
+2001-04-29 Timo Schulz <ts at winpt.org>
+
+ * potfiles: Updated.
+
+2001-05-18 Timo Schulz <ts at winpt.org>
+
+ * winpt-ru.mo: New. Russian translation.
+ * potfiles: Updated.
+
+2001-05-22 Timo Schulz <ts at winpt.org>
+
+ * build-mo.bat, build-diff.bat: Add Russian translation.
+
+2001-06-07 Timo Schulz <ts at winpt.org>
+
+ * winpt-de.mo: Updated.
+
+2001-07-16 Timo Schulz <ts at winpt.org>
+
+ * winpt-pt_BR.po: New. Brazilian (Portuguese) translation.
+
+2001-07-25 Timo Schulz <ts at winpt.org>
+
+ * winpt-fr.po: Updated.
+
+2001-08-08 Timo Schulz <ts at winpt.org>
+
+ * winpt-pt_PT.po. New. Pure Portuguese translation.
+ * build-pot.bat, build-mo.bat, build-diff.bat: Insert GPL notice
+ and add the newest language.
+
+2001-08-09 Timo Schulz <ts at winpt.org>
+
+ * winpt-fr, winpt-ru.po: Updated.
+
+2001-08-25 Timo Schulz <ts at winpt.org>
+
+ * winpt-it.mo: Updated.
+
+2001-08-28 Timo Schulz <ts at winpt.org>
+
+ * winpt-es.mo: Updated.
+
+2001-09-23 Timo Schulz <ts at winpt.org>
+
+ * winpt-de.mo: Updated.
+
+2001-10-10 Timo Schulz <ts at winpt.org>
+
+ * winpt-de.po: Updated.
+
+2001-11-01 Timo Schulz <ts at winpt.org>
+
+ * winpt-es.po: Updated.
+ * winpt-ru.po: Updated.
+
+2001-11-10 Timo Schulz <ts at winpt.org>
+
+ * winpt-hu.po: New.
+
+2001-11-12 Timo Schulz <ts at winpt.org>
+
+ * winpt-hu.po: Updated.
+
+2001-11-17 Timo Schulz <ts at winpt.org>
+
+ * winpt-it.po: Updated.
+ * winpt-zh-CN.po: New.
+
+2002-02-07 Timo Schulz <ts at winpt.org>
+
+ * winpt-de.po: A lot of updates.
+
+ * We don't use fuzzy translations any longer. I'm not sure
+ if this is a W32 problem, but now it works so there is no
+ need to change this.
+
+2002-02-23 Timo Schulz <ts at winpt.org>
+
+ * Renamed all files. We only use the winpt-xx names for the
+ mo files.
+
+ * de.po: Some fixes.
+
+2002-03-29 Timo Schulz <ts at winpt.org>
+
+ * de.po: Some more fixes.
+
+2003-09-01 Timo Schulz <ts at winpt.org>
+
+ * es.po: Updated by Pedro José <pedrojgm at hotmail.com>.
+
+2004-02-04 Timo Schulz <twoaday at freakmail.de>
+
+ * Updated a lot of stuff.
+
+2005-11-30 Timo Schulz <ts at g10code.com>
+
+ * de.po: A lot of updates.
+
\ No newline at end of file
Modified: trunk/Po/de.po
===================================================================
--- trunk/Po/de.po 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Po/de.po 2005-11-30 10:22:00 UTC (rev 105)
@@ -10,6 +10,7 @@
# immer Passwort benutzen.
#
# BUG: GetOpenFileName needs \0\0. gettext does not support it.
+# XXX: Plural von Schlüsselbund???
msgid ""
msgstr ""
"Project-Id-Version: WinPT 0.10.2\n"
@@ -408,7 +409,7 @@
# c:\oss\winpt-gpgme\src\wptKeyEditDlgs.cpp:350
msgid "Appointing a key as designated revoker cannot be undone."
msgstr ""
-"Hinzufügen eines \"Revokers\" kann nicht mehr rückgängig gemacht werden."
+"Hinzufügen eines \"Revokers\" kann nicht mehr\nrückgängig gemacht werden."
#, c-format
msgid ""
@@ -430,7 +431,7 @@
#, c-format
msgid "Backup keyring \"%s\" failed"
-msgstr "Schlüsselringsicherung \"%s\" fehlgeschlagen"
+msgstr "Schlüsselbundsicherung \"%s\" fehlgeschlagen"
# c:\oss\winpt-gpgme\src\wptPassphraseCB.cpp:124
msgid "Bad passphrase; Enter passphrase again"
@@ -456,7 +457,7 @@
msgstr "Ä&ndern"
msgid "Caching keyrings, please wait..."
-msgstr "Lade Schlüsselringe, bitte warten..."
+msgstr "Lade Schlüssebund, bitte warten..."
msgid ""
"Cannot change passphrase because the key\n"
@@ -566,15 +567,15 @@
"Fortfahren damit WinPT mehr Möglichkeiten anbietet.\n"
msgid "Could not access public keyring"
-msgstr "Konnte nicht auf öffentlichen Schlüsselring zugreifen"
+msgstr "Konnte nicht auf öffentlichen Schlüsselbund zugreifen"
msgid "Could not access public keyring, exit WinPT?"
msgstr ""
-"Auf den öffentlichen Schlüsselring kann nicht zugegriffen werden. WinPT "
+"Auf den öffentlichen Schlüsselbund kann nicht zugegriffen werden. WinPT "
"beenden?"
msgid "Could not access secret keyring."
-msgstr "Auf denn geheimen Schlüsselring konnte nicht zugegriffen werden"
+msgstr "Auf denn geheimen Schlüsselbund konnte nicht zugegriffen werden"
msgid "Could not close Clipboard"
msgstr "Konnte Zwischenablage nicht schließen"
@@ -656,7 +657,7 @@
"Could not find keyring entries into the options file in %s or the file does "
"NOT exist."
msgstr ""
-"Keine Schlüsselring-Eintragungen in der Optionendatei in %s gefunden oder "
+"Keine Schlüsselbund-Eintragungen in der Optionendatei in %s gefunden oder "
"Datei existiert nicht."
msgid ""
@@ -927,7 +928,7 @@
# c:\oss\winpt-gpgme\src\wptKeyManagerDlg.cpp:842
msgid "Delete key from keyring"
-msgstr "Schlüssel aus Keyring löschen"
+msgstr "Schlüssel aus Keyring löschen"
msgid "Delete user ID"
msgstr "Benutzerkennung löschen"
@@ -1011,7 +1012,7 @@
" \"%s\""
msgid "Do you really want to refresh all keys in the keyring?"
-msgstr "Wirklich alle Schlüssel im Schlüsselring neu laden?"
+msgstr "Wirklich alle Schlüssel im Schlüsselbund neu laden?"
#, c-format
msgid "Do you really want to send '%s' to keyserver %s?"
@@ -1407,13 +1408,13 @@
"\n"
"Backup your keyrings now?"
msgstr ""
-"Es ist sehr empfehlenswert, ein Backup der Schlüsselringe zu erstellen, weil "
+"Es ist sehr empfehlenswert, ein Backup der Schlüsselbünde zu erstellen, weil "
"beide Ringe sehr wichtige Daten enthalten.\n"
"Bitte beachten Sie, dass es möglich wäre, dass die Festplatte beschädigt "
"wird oder die Dateien aus Versehen gelöscht werden. Deshalb ist es ratsam, "
"die Dateien auf einer Diskette oder einem USB-Stick zu sichern!\n"
"\n"
-"Backup der Schlüsselringe erstellen?"
+"Backup der Schlüsselbünde erstellen?"
# c:\oss\winpt-gpgme\src\wptImportList.cpp:424
msgid ""
@@ -1732,7 +1733,7 @@
msgstr "Kein Schlüssel ausgewählt."
msgid "No keyring was chosen. Exit."
-msgstr "Kein Schlüsselring ausgewählt. Abbruch."
+msgstr "Kein Schlüsselbund ausgewählt. Abbruch."
msgid "No keys updated."
msgstr "Kein(e) Schlüssel aktualisiert."
@@ -1826,10 +1827,10 @@
msgstr "Optionen"
msgid "Overwrite old public keyring?"
-msgstr "Alten öffentlichen Schlüsselring überschreiben"
+msgstr "Alten öffentlichen Schlüsselbund überschreiben"
msgid "Overwrite old secret keyring?"
-msgstr "Alten geheimen Schlüsselring überschreiben?"
+msgstr "Alten geheimen Schlüsselbund überschreiben?"
msgid "Ownertrust"
msgstr "Besitzervertrauen"
@@ -1893,10 +1894,10 @@
msgstr "Bitte wählen Sie einen Eintrag."
msgid "Please choose your public keyring"
-msgstr "Bitte wählen Sie Ihren öffentlichen Schlüsselring."
+msgstr "Bitte wählen Sie Ihren öffentlichen Schlüsselbund."
msgid "Please choose your secret keyring"
-msgstr "Bitte wählen Sie Ihren geheimen Schlüsselring."
+msgstr "Bitte wählen Sie Ihren geheimen Schlüsselbund."
# c:\oss\winpt-gpgme\src\wptKeyEditOwnertrustDlg.cpp:62
msgid ""
@@ -2162,7 +2163,7 @@
msgstr "Öffentlicher Schlüssel"
msgid "Public key"
-msgstr "Öffentlicher Schlüssel"
+msgstr "öff. Schlüssel"
msgid "R&everify Signatures"
msgstr "Signaturen erneut prüfen"
@@ -2281,7 +2282,7 @@
msgstr "Bitte Datendatei auswählen"
msgid "Select GPG Public Keyring"
-msgstr "Öffentlichen GPG-Schlüsselring auswählen."
+msgstr "Öffentlichen GPG-Schlüsselbund auswählen."
# c:\oss\winpt-gpgme\src\wptPreferencesDlg.cpp:214
msgid "Select GPG backup path"
@@ -2537,7 +2538,7 @@
"Please check your GPG config (keyrings, pathes...)"
msgstr ""
"Der Schlüsselspeicher wurde nicht initialisiert oder ist leer.\n"
-"Bitte checken Sie die GPG Konfiguration (Schlüsselringe, Pfade)"
+"Bitte checken Sie die GPG Konfiguration (Schlüsselbünde, Pfade)"
# c:\oss\winpt-gpgme\src\wptKeyserver.cpp:548
msgid "The keyserver limit is exceeded"
@@ -2638,7 +2639,7 @@
"This is only useful when the keyring has been modified (sign a key...).\n"
"Do you really want to reload the keycache?"
msgstr ""
-"Dies ist nur notwendig, wenn die Schlüsselringe geändert wurden (durch "
+"Dies ist nur notwendig, wenn die Schlüsselbünde geändert wurden (durch "
"Signierung etc.)\n"
"Möchten Sie den Zwischenspeicher reinitialisieren?"
@@ -2839,11 +2840,11 @@
"The keyrings are in a read-only state which is propably\n"
"caused by another program which already opened the files.\n"
msgstr ""
-"Sie habe keinen Schreibzugriff auf die Schlüsselringe, um \n"
+"Sie habe keinen Schreibzugriff auf die Schlüsselbünde, um \n"
"diese modifizieren zu können.\n"
"\n"
-"Die Schlüsselringe sind im Nur-Lesen-Modus, was meistens der Fall ist, \n"
-"wenn ein anderes Programm auf die Schlüsselringe zugreift.\n"
+"Die Schlüsselbünde sind im Nur-Lesen-Modus, was meistens der Fall ist, \n"
+"wenn ein anderes Programm auf die Schlüsselbünde zugreift.\n"
msgid "You must select at least one key."
msgstr "Sie müssen wenigstens einen Schlüssel auswählen."
@@ -3234,3 +3235,49 @@
msgid "&Save..."
msgstr "&Speichern..."
+msgid "File contain(s) %d key(s)."
+msgstr "Datei enthält %d Schlüssel."
+
+msgid "0 Objects marked"
+msgstr "0 Objekte markiert"
+
+#, c-format
+msgid "%d Object(s) marked"
+msgstr "%d Objekt(e) markiert"
+
+
+msgid "E&xpert"
+msgstr "E&xperte"
+
+msgid "Add Photo ID"
+msgstr "Photo ID hinzufügen"
+
+msgid "&Find"
+msgstr "&Suche"
+
+#, c-format
+msgid ""
+"Signature made %s using %s key ID %s\n"
+"%s from \"%s\""
+msgstr "Signatur erstellt %s mit %s key ID %s\n"
+"%s von \"%s\""
+
+msgid "&Save additional information"
+msgstr "&Sichere zusätzliche Informationen"
+
+msgid "Save to &file"
+msgstr "In &Datei sichern"
+
+msgid "Send to &clipboard"
+msgstr "An &Ablage senden"
+
+
+msgid "Reason for revocation"
+msgstr "Grund der Zurückziehung"
+
+msgid "Optional description text"
+msgstr "Optionale Beschreibung"
+
+
+msgid "Output file"
+msgstr "Ausgabedatei"
Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/ChangeLog 2005-11-30 10:22:00 UTC (rev 105)
@@ -1,3 +1,11 @@
+2005-11-30 Timo Schulz <ts at g10code.com>
+
+ * wptW32API.cpp (dialog_box_param): Removed LANG_DE code.
+ * WinPT-en.rc: Removed string list.
+ * wptFileSaveDlg.cpp (file_save_dlg_proc): Localized
+ * wptKeylist.cpp (keylist_build): Cannot use global
+ arrays for the columns due to gettext.
+
2005-11-29 Timo Schulz <ts at g10code.com>
* WinPT.cpp (WinMain): Modify --keymanager. If an instance
Modified: trunk/Src/WinPT-en.rc
===================================================================
--- trunk/Src/WinPT-en.rc 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/WinPT-en.rc 2005-11-30 10:22:00 UTC (rev 105)
@@ -335,7 +335,7 @@
WS_TABSTOP,7,6,339,180
LTEXT "Find key:",IDC_STATIC,7,189,30,8
EDITTEXT IDC_ENCRYPT_FIND,41,188,61,11,ES_AUTOHSCROLL
- PUSHBUTTON "&Find",IDC_ENCRYPT_FNDCMD,103,189,33,9
+ PUSHBUTTON "&Find",IDC_ENCRYPT_FNDCMD,103,189,39,9
DEFPUSHBUTTON "&OK",IDOK,242,189,50,14
PUSHBUTTON "&Cancel",IDCANCEL,294,189,53,14
END
@@ -586,9 +586,9 @@
BEGIN
CONTROL "List1",IDC_KEYSIG_LIST,"SysListView32",LVS_REPORT |
LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,8,8,335,134
- DEFPUSHBUTTON "&OK",IDOK,8,145,55,14
- PUSHBUTTON "&Receive Key",IDC_KEYSIG_RECVKEY,65,145,75,14
- PUSHBUTTON "&Properties",IDC_KEYSIG_SIGPROPS,143,145,55,14
+ DEFPUSHBUTTON "&OK",IDOK,153,145,55,14
+ PUSHBUTTON "&Receive Key",IDC_KEYSIG_RECVKEY,210,145,75,14
+ PUSHBUTTON "&Properties",IDC_KEYSIG_SIGPROPS,288,145,55,14
END
IDD_WINPT_VERIFY DIALOG DISCARDABLE 0, 0, 394, 87
@@ -741,15 +741,15 @@
LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,5,5,323,81
END
-IDD_WINPT_FILE_SIGN DIALOG DISCARDABLE 0, 0, 336, 186
+IDD_WINPT_FILE_SIGN DIALOG DISCARDABLE 0, 0, 306, 182
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "File Sign"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_FILE_SIG_LIST,"SysListView32",LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER |
- WS_TABSTOP,8,7,318,77
- GROUPBOX "Signature mode",IDC_STATIC,8,87,84,51
+ WS_TABSTOP,8,7,291,77
+ GROUPBOX "Signature mode",IDC_STATIC,8,87,92,51
CONTROL "&Normal Signature",IDC_FILE_SIG_NORMAL,"Button",
BS_AUTORADIOBUTTON,11,99,70,10
CONTROL "&Detached Signature",IDC_FILE_SIG_DETACH,"Button",
@@ -757,9 +757,9 @@
CONTROL "Clear&text Signature",IDC_FILE_SIG_CLEAR,"Button",
BS_AUTORADIOBUTTON,11,123,75,10
CONTROL "&Text Output",IDC_FILE_SIG_ARMOR,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,8,142,53,10
- DEFPUSHBUTTON "&OK",IDOK,8,160,50,14
- PUSHBUTTON "&Cancel",IDCANCEL,62,160,51,14
+ BS_AUTOCHECKBOX | WS_TABSTOP,8,142,63,10
+ DEFPUSHBUTTON "&OK",IDOK,194,160,50,14
+ PUSHBUTTON "&Cancel",IDCANCEL,248,160,51,14
END
IDD_WINPT_FILE_ENCRYPT DIALOG DISCARDABLE 0, 0, 348, 151
@@ -818,25 +818,27 @@
WS_BORDER | WS_TABSTOP,9,6,326,156
END
-IDD_WINPT_KEYREVOKE DIALOG DISCARDABLE 0, 0, 174, 194
+IDD_WINPT_KEYREVOKE DIALOG DISCARDABLE 0, 0, 174, 202
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Key Revocation"
FONT 8, "MS Sans Serif"
BEGIN
- LTEXT "Reason for the revocation",IDC_STATIC,7,6,105,8
+ LTEXT "Reason for the revocation",IDC_KEYREVOKE_REASONINF,7,6,
+ 127,8
LISTBOX IDC_KEYREVOKE_REASON,7,17,150,38,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- LTEXT "Optional description text",IDC_STATIC,7,57,76,8
+ LTEXT "Optional description text",IDC_KEYREVOKE_OPTINF,7,57,
+ 107,8
EDITTEXT IDC_KEYREVOKE_TEXT,7,68,150,12,ES_AUTOHSCROLL
- LTEXT "Passphrase",IDC_STATIC,7,88,38,8
+ LTEXT "&Passphrase",IDC_KEYREVOKE_PWDINF,7,88,38,8
EDITTEXT IDC_KEYREVOKE_PWD,48,87,109,12,ES_PASSWORD |
ES_AUTOHSCROLL
- LTEXT "Output File",IDC_STATIC,7,107,35,8
+ LTEXT "&Output file",IDC_KEYREVOKE_OUTINF,7,107,41,8
EDITTEXT IDC_KEYREVOKE_FILE,48,105,109,12,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_KEYREVOKE_CHOOSE,157,105,11,13
LTEXT "Static",IDC_KEYREVOKE_HINT,7,130,157,39
- DEFPUSHBUTTON "&OK",IDOK,7,175,50,14
- PUSHBUTTON "&Cancel",IDCANCEL,59,175,50,14
+ DEFPUSHBUTTON "&OK",IDOK,67,182,50,14
+ PUSHBUTTON "&Cancel",IDCANCEL,119,182,50,14
END
IDD_WINPT_PASSWD DIALOG DISCARDABLE 0, 0, 221, 58
@@ -846,8 +848,8 @@
BEGIN
LTEXT "Enter passphrase",IDC_PASSWD_INFO,9,7,108,8
EDITTEXT IDC_PASSWD_PWD,9,18,202,12,ES_PASSWORD | ES_AUTOHSCROLL
- DEFPUSHBUTTON "&OK",IDOK,9,34,50,14
- PUSHBUTTON "&Cancel",IDCANCEL,62,34,50,14
+ DEFPUSHBUTTON "&OK",IDOK,107,34,50,14
+ PUSHBUTTON "&Cancel",IDCANCEL,160,34,50,14
CONTROL "&Hide Typing",IDC_PASSWD_HIDE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,136,7,78,10
END
@@ -859,7 +861,7 @@
BEGIN
CONTROL "DateTimePicker2",IDC_DATE_DTP,"SysDateTimePick32",
DTS_RIGHTALIGN | WS_TABSTOP,8,8,64,15
- DEFPUSHBUTTON "&OK",IDOK,8,33,50,14
+ DEFPUSHBUTTON "&OK",IDOK,21,35,50,14
END
IDD_WINPT_KEYPROG DIALOG DISCARDABLE 0, 0, 235, 146
@@ -893,8 +895,8 @@
CAPTION "New Group"
FONT 8, "MS Sans Serif"
BEGIN
- DEFPUSHBUTTON "OK",IDOK,9,42,50,14
- PUSHBUTTON "Cancel",IDCANCEL,64,43,50,14
+ DEFPUSHBUTTON "OK",IDOK,64,43,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,119,43,50,14
LTEXT "Email address for the group",IDC_STATIC,9,8,130,8
EDITTEXT IDC_GROUP_EMAIL,9,20,159,13,ES_AUTOHSCROLL
END
@@ -949,14 +951,14 @@
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "",IDC_STATIC,6,2,182,40
- CONTROL "Save to &File",IDC_FILE_SAVE_TOFILE,"Button",
+ CONTROL "Save to &file",IDC_FILE_SAVE_TOFILE,"Button",
BS_AUTORADIOBUTTON,10,12,54,10
EDITTEXT IDC_FILE_SAVE_FILE,63,11,90,13,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_FILE_SAVE_SELECT,155,11,26,12
- CONTROL "Send to &Clipboard",IDC_FILE_SAVE_CLIP,"Button",
- BS_AUTORADIOBUTTON,10,28,72,10
+ CONTROL "Send to &clipboard",IDC_FILE_SAVE_CLIP,"Button",
+ BS_AUTORADIOBUTTON,10,28,77,10
CONTROL "&Save additional information",IDC_FILE_SAVE,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,6,46,101,10
+ BS_AUTOCHECKBOX | WS_TABSTOP,6,46,119,10
DEFPUSHBUTTON "&OK",IDOK,82,63,50,14
PUSHBUTTON "&Cancel",IDCANCEL,135,63,50,14
END
@@ -1098,27 +1100,26 @@
LTEXT "Decoding data. Please wait...",IDC_STATIC,13,13,107,9
END
-IDD_WINPT_KEYEDIT_ADDREV DIALOG DISCARDABLE 0, 0, 206, 95
+IDD_WINPT_KEYEDIT_ADDREV DIALOG DISCARDABLE 0, 0, 213, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Add Revoker"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Appointing a key as designated revoker cannot be undone.",
IDC_ADDREV_INF,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,7,8,
- 188,8
- LTEXT "Public key",IDC_ADDREV_KEYINF,7,31,34,8
- COMBOBOX IDC_ADDREV_KEYLIST,53,31,142,54,CBS_DROPDOWNLIST |
+ 192,17
+ LTEXT "Public key",IDC_ADDREV_KEYINF,7,33,53,8
+ COMBOBOX IDC_ADDREV_KEYLIST,63,33,145,54,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
- LTEXT "Passphrase",IDC_ADDREV_PWDINF,7,49,38,8
- EDITTEXT IDC_ADDREV_PASS,53,48,100,13,ES_PASSWORD |
- ES_AUTOHSCROLL
- DEFPUSHBUTTON "&OK",IDOK,91,73,50,14
- PUSHBUTTON "&Cancel",IDCANCEL,145,73,50,14
+ LTEXT "Passphrase",IDC_ADDREV_PWDINF,7,51,38,8
+ EDITTEXT IDC_ADDREV_PASS,63,50,90,13,ES_PASSWORD | ES_AUTOHSCROLL
+ DEFPUSHBUTTON "&OK",IDOK,103,73,50,14
+ PUSHBUTTON "&Cancel",IDCANCEL,157,73,50,14
END
IDD_WINPT_KEYEDIT_ADDPHOTO DIALOG DISCARDABLE 0, 0, 170, 138
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Add Photograph"
+CAPTION "Add Photo ID"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Remember that the image is stored within your public key. If you use a very large picture, your key will become very large as well! Keeping the image close to 240x288 is a good size to use.",
@@ -1171,7 +1172,7 @@
LTEXT "/",IDC_STATIC,85,23,8,8
LTEXT "Total",IDC_PROGRESS_TOTAL,99,23,70,9
CONTROL "Progress1",IDC_PROGRESS_BAR,"msctls_progress32",
- WS_BORDER,5,41,173,9
+ PBS_SMOOTH | WS_BORDER,5,41,173,9
END
IDD_WINPT_CARD_EDIT DIALOG DISCARDABLE 0, 0, 224, 267
@@ -1261,7 +1262,7 @@
ES_AUTOHSCROLL
CONTROL "&Hide Typing",IDC_CHPIN_HIDE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,89,98,54,10
- DEFPUSHBUTTON "OK",IDOK,41,121,50,14
+ DEFPUSHBUTTON "&OK",IDOK,41,121,50,14
PUSHBUTTON "&Cancel",IDCANCEL,94,121,50,14
END
@@ -1621,9 +1622,9 @@
IDD_WINPT_FILE_SIGN, DIALOG
BEGIN
LEFTMARGIN, 3
- RIGHTMARGIN, 329
+ RIGHTMARGIN, 299
TOPMARGIN, 3
- BOTTOMMARGIN, 179
+ BOTTOMMARGIN, 175
END
IDD_WINPT_FILE_ENCRYPT, DIALOG
@@ -1655,7 +1656,7 @@
LEFTMARGIN, 2
RIGHTMARGIN, 170
TOPMARGIN, 3
- BOTTOMMARGIN, 188
+ BOTTOMMARGIN, 196
END
IDD_WINPT_PASSWD, DIALOG
@@ -1797,7 +1798,7 @@
IDD_WINPT_KEYEDIT_ADDREV, DIALOG
BEGIN
LEFTMARGIN, 4
- RIGHTMARGIN, 201
+ RIGHTMARGIN, 208
TOPMARGIN, 4
BOTTOMMARGIN, 91
END
@@ -2267,90 +2268,6 @@
"V", ID_KEYCTX_PASTE, VIRTKEY, CONTROL, NOINVERT
END
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_WINPT_ABOUT "About WinPT"
- IDS_WINPT_ABOUTGPG "About the GNU Privacy Guard"
- IDS_WINPT_CLIPEDIT "Clipboard Editor"
- IDS_WINPT_DATE "Universal date dialog"
- IDS_WINPT_DECRYPT "Decryption"
- IDS_WINPT_DECRYPT_SIGN "Signing"
- IDS_WINPT_ENCRYPT "Encryption"
- IDS_WINPT_EXPORT "Key Export"
- IDS_WINPT_FILE "File Manager"
- IDS_WINPT_FILE_ENCRYPT "File Encrypt"
- IDS_WINPT_FILE_EXPORT "File Export"
- IDS_WINPT_FILE_PREFS "File Preferences"
- IDS_WINPT_FILE_SIGN "File Sign"
- IDS_WINPT_GPGOPT "GnuPG Options"
- IDS_WINPT_GPGPREFS "GnuPG Preferences"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_WINPT_GROUP "New Group"
- IDS_WINPT_HKPSEARCH "Keyserver Searching"
- IDS_WINPT_IMPORT "Key Import"
- IDS_WINPT_KEYCACHE "Key Caching"
- IDS_WINPT_KEYEDIT_ADDSUBKEY "Key Edit (Subkey)"
- IDS_WINPT_KEYEDIT_ADDUID "Key Edit (Userid)"
- IDS_WINPT_KEYEDIT_OWNERTRUST "Change Ownertrust"
- IDS_WINPT_KEYGEN "Key Generation"
- IDS_WINPT_KEYMISC "Key Management"
- IDS_WINPT_KEYPROG "Key Generation - Progress Dialog"
- IDS_WINPT_KEYPROPS "Key Properties"
- IDS_WINPT_KEYREVOKE "Key Revocation"
- IDS_WINPT_KEYSERVER "Keyserver Access"
- IDS_WINPT_KEYSIGN "Key Signing"
- IDS_WINPT_KEYSUB "Subkeys"
- IDS_WINPT_KEYTRUST "List Trust Path"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_WINPT_KEYUID "Key UserID's"
- IDS_WINPT_OWNERTRUST "Ownertrust"
- IDS_WINPT_PASSWD "Passphrase Dialog"
- IDS_WINPT_PREFS "WinPT Preferences"
- IDS_WINPT_SIGN "Signing"
- IDS_WINPT_SIGNENC "Sign & Encrypt"
- IDS_WINPT_TEXT "Text Input"
- IDS_WINPT_VERIFY "Verify"
- IDS_WINPT_KEYSIG "Signature List for Key ..."
- IDS_WINPT_KEYSERVER_PROXY "Proxy Settings"
- IDS_WINPT_SECLIST "Secret Key List"
- IDS_WINPT_FILE_STAT "File Status"
- IDS_WINPT_FILE_SAVE "Save Plaintext"
- IDS_WINPT_IMPORT_STAT "Key Import Statistics"
- IDS_WINPT_SIGCLASS "Choose Signature Class"
- IDS_WINPT_KEY_REVOKERS "Key Revokers"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_WINPT_FILES_SECDEL "Are you sure you want to secure delete these files?"
- IDS_WINPT_SPACE_SECDEL "Wipe Free Space"
- IDS_WINPT_CONFDEL_CLIP "Delete Clipboard Contents"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- ID_KEYCTX_ADDKEY "Add a secondary key to the selected key"
- ID_KEYCTX_ADDUID "Add a user IDto the selected key"
- ID_KEYCTX_ADDREV "Add a designated revoker for the selected key"
- IDS_KEYCTX_EDIT "Add a photographic ID to the selected key"
- IDS_WINPT_KEYWIZARD "Key Generation Wizard"
- IDS_WINPT_CARD_EDIT "Card Edit"
- IDS_WINPT_CARD_CONFIG "Smart Card Reader Config"
- IDS_WINPT_CARD_KEYGEN "Card Key Generation"
-END
-
#endif // Englisch (USA) resources
/////////////////////////////////////////////////////////////////////////////
Modified: trunk/Src/resource.h
===================================================================
--- trunk/Src/resource.h 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/resource.h 2005-11-30 10:22:00 UTC (rev 105)
@@ -594,6 +594,10 @@
#define IDC_PREFS_CURRINF 1480
#define IDC_KEYREVOKERS_INF 1481
#define IDC_CONFDELCLIP_INFO 1482
+#define IDC_KEYREVOKE_REASONINF 1483
+#define IDC_KEYREVOKE_OPTINF 1484
+#define IDC_KEYREVOKE_PWDINF 1485
+#define IDC_KEYREVOKE_OUTINF 1486
#define ID_GPG_ENCRYPT 40003
#define ID_GPG_DECRYPT 40004
#define ID_GPG_SIGN 40005
@@ -764,7 +768,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 230
#define _APS_NEXT_COMMAND_VALUE 40176
-#define _APS_NEXT_CONTROL_VALUE 1483
+#define _APS_NEXT_CONTROL_VALUE 1487
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
Modified: trunk/Src/wptClipEditDlg.cpp
===================================================================
--- trunk/Src/wptClipEditDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptClipEditDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -17,7 +17,6 @@
* along with WinPT; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -98,13 +97,15 @@
if (GetOpenFileName (&open)) {
if( (size=get_file_size (file)) > MAX_CLIPTEXT_SIZE) {
id = msg_box (dlg, _("The file you want to add is very large.\n"
- "Still proceed?"), _("Clipboard"), MB_INFO|MB_YESNO);
- if (id == IDNO)
+ "Still proceed?"), _("Clipboard"),
+ MB_INFO|MB_YESNO);
+ if (id == IDNO)
return -1;
}
fp = fopen (file, "rb");
if (!fp) {
- msg_box (dlg, winpt_strerror (WPTERR_FILE_OPEN), _("Clipboard"), MB_ERR);
+ msg_box (dlg, winpt_strerror (WPTERR_FILE_OPEN),
+ _("Clipboard"), MB_ERR);
return FALSE;
}
p = new char[size+1];
@@ -151,17 +152,20 @@
}
fp = fopen (file, "wb");
if (!fp) {
- msg_box (dlg, winpt_strerror (WPTERR_FILE_CREAT), _("Clipboard"), MB_ERR);
+ msg_box (dlg, winpt_strerror (WPTERR_FILE_CREAT),
+ _("Clipboard"), MB_ERR);
return FALSE;
}
/* XXX: there is a NUL-byte at the end. */
- nbytes = SendDlgItemMessage (dlg, IDC_CLIPEDIT_CLIPTEXT2, WM_GETTEXTLENGTH, 0, 0);
+ nbytes = SendDlgItemMessage (dlg, IDC_CLIPEDIT_CLIPTEXT2,
+ WM_GETTEXTLENGTH, 0, 0);
if (nbytes > 0) {
p = new char[nbytes+1];
if (!p)
BUG (NULL);
GetDlgItemText (dlg, IDC_CLIPEDIT_CLIPTEXT2, p, nbytes);
fwrite (p, 1, nbytes, fp);
+
}
fclose (fp);
free_if_alloc (p);
@@ -181,8 +185,9 @@
SetDlgItemText (dlg, IDC_CLIPEDIT_CLEAR, _("Clea&r"));
SetDlgItemText (dlg, IDC_CLIPEDIT_LOAD, _("&Load"));
SetDlgItemText (dlg, IDC_CLIPEDIT_SAVE, _("&Save"));
- SetDlgItemText (dlg, IDC_CLIPEDIT_QUOTE, _("Add quotes"));
-
+ SetDlgItemText (dlg, IDC_CLIPEDIT_QUOTE, _("Add quotes"));
+ SetDlgItemText (dlg, IDOK, _("&Exit"));
+
load_clipboard (dlg);
center_window (dlg, NULL);
SetForegroundWindow (dlg);
@@ -242,4 +247,3 @@
return FALSE;
}
-
Modified: trunk/Src/wptClipEncryptDlg.cpp
===================================================================
--- trunk/Src/wptClipEncryptDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptClipEncryptDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -18,7 +18,6 @@
* along with WinPT; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -138,7 +137,9 @@
switch( msg ) {
case WM_INITDIALOG:
- SetWindowText( dlg, _("Encryption") );
+ SetWindowText (dlg, _("Encryption"));
+ SetDlgItemText (dlg, IDC_ENCRYPT_FNDCMD, _("&Find"));
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
kc = keycache_get_ctx( KEYCACHE_PUB );
if( !kc )
BUG( NULL );
@@ -163,7 +164,7 @@
notify = (NMHDR *)lparam;
if (notify && notify->code == NM_DBLCLK &&
notify->idFrom == IDC_ENCRYPT_KEYLIST)
- PostMessage( dlg, WM_COMMAND, MAKEWPARAM( IDOK, 0 ), 0);
+ PostMessage( dlg, WM_COMMAND, MAKEWPARAM( IDOK, 0 ), 0 );
if (notify && notify->code == LVN_COLUMNCLICK &&
notify->idFrom == IDC_ENCRYPT_KEYLIST ) {
NMLISTVIEW *p = (LPNMLISTVIEW) lparam;
Modified: trunk/Src/wptClipSignEncDlg.cpp
===================================================================
--- trunk/Src/wptClipSignEncDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptClipSignEncDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -17,7 +17,6 @@
* along with WinPT; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -110,13 +109,13 @@
switch( msg ) {
case WM_INITDIALOG:
SetWindowText (dlg, _("Sign & Encrypt"));
-
- kc = keycache_get_ctx( KEYCACHE_PUB );
- if( !kc )
- BUG( NULL );
- lv = keylist_load( GetDlgItem( dlg, IDC_SIGNENC_KEYLIST ),
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
+ kc = keycache_get_ctx (KEYCACHE_PUB);
+ if (!kc)
+ BUG (NULL);
+ lv = keylist_load (GetDlgItem (dlg, IDC_SIGNENC_KEYLIST),
kc, NULL, kmode, KEY_SORT_USERID);
- seclist_init( dlg, IDC_SIGNENC_SECLIST, KEYLIST_FLAG_SHORT, &list );
+ seclist_init (dlg, IDC_SIGNENC_SECLIST, KEYLIST_FLAG_SHORT, &list);
center_window (dlg, NULL);
set_active_window (dlg);
EnableWindow (GetDlgItem (dlg, IDC_SIGNENC_SECLIST), FALSE);
@@ -143,8 +142,8 @@
return TRUE;
case WM_SYSCOMMAND:
- if( LOWORD (wparam) == SC_CLOSE )
- EndDialog( dlg, TRUE );
+ if (LOWORD (wparam) == SC_CLOSE)
+ EndDialog (dlg, TRUE);
return FALSE;
case WM_COMMAND:
@@ -153,11 +152,12 @@
int enable = IsDlgButtonChecked (dlg, IDC_SIGNENC_SELKEY);
EnableWindow (GetDlgItem (dlg, IDC_SIGNENC_SECLIST), enable? TRUE : FALSE);
}
- switch( LOWORD( wparam ) ) {
+ switch (LOWORD (wparam)) {
case IDOK:
- rset = keylist_get_recipients( lv, &force_trust, &n );
+ rset = keylist_get_recipients (lv, &force_trust, &n);
if (!n) {
- msg_box( dlg, _("You must select at least one key."), _("Sign & Encrypt"), MB_ERR );
+ msg_box (dlg, _("You must select at least one key."),
+ _("Sign & Encrypt"), MB_ERR);
return FALSE;
}
if( IsDlgButtonChecked( dlg, IDC_SIGNENC_SELKEY ) ) {
@@ -165,7 +165,7 @@
const char * s;
if( seclist_select_key( dlg, IDC_SIGNENC_SECLIST, &key ) ) {
- msg_box( dlg, _("No key was selected."), _("Signing"), MB_ERR );
+ msg_box (dlg, _("No key was selected."), _("Signing"), MB_ERR);
return FALSE;
}
s = key->subkeys->keyid;
@@ -183,6 +183,7 @@
err = gpgme_new (&ctx);
if (err)
BUG (NULL);
+
set_gpg_passphrase_cb (&pwd, ctx, GPG_CMD_SIGN, dlg, _("Sign & Encrypt"));
err = gpg_clip_sign_encrypt (ctx, signer, rset, force_trust);
release_gpg_passphrase_cb (&pwd);
Modified: trunk/Src/wptCommonDlg.cpp
===================================================================
--- trunk/Src/wptCommonDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptCommonDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -62,6 +62,7 @@
SetWindowText (dlg, ctx->desc);
if (ctx->title != NULL)
SetDlgItemText (dlg, IDC_HTTP_TITLE, ctx->title);
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
SetForegroundWindow (dlg);
break;
Modified: trunk/Src/wptFileManager.cpp
===================================================================
--- trunk/Src/wptFileManager.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptFileManager.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -272,18 +272,16 @@
/* Extract file type from @fname. If @r_type is valid,
it contains the PGP type on success. */
-static const char *
+static const char*
fm_get_file_type (const char *fname, int *r_type)
{
gpg_iobuf_t inp;
armor_filter_context_t afx;
PACKET *pkt;
const char *s = NULL;
+ size_t count = 0, compr = 0;
int rc = 0;
- /* XXX: if the text was created with gpg --sign and armored
- there is no way to differ between an encrypted text
- and a one-pass signature. */
if (r_type)
*r_type = PGP_NONE;
if (!fname) {
@@ -340,9 +338,19 @@
if (r_type) *r_type = PGP_SECKEY;
break;
+ case PKT_COMPRESSED:
+ /* If we only find 1 packet and it is compressed,
+ we assume a compress one-pass signature. */
+ if (count != 0)
+ break;
+ s = "SIGNED"; rc = -2;
+ compr = 1;
+ break;
+
default:
break;
}
+ count++;
gpg_free_packet (pkt);
gpg_init_packet (pkt);
if (rc == -2)
@@ -354,7 +362,7 @@
s = fm_check_armor_type (fname, r_type);
if (!s)
s = "UNKNOWN";
- if (!strcmp (s, "SIGNED")
+ if (!strcmp (s, "SIGNED") && !compr
&& strcmp (fm_check_armor_type (fname, r_type), "SIGNED-CLEAR ")) {
if (r_type) *r_type = PGP_SIG;
s = "SIGNED-DETACH";
@@ -363,39 +371,40 @@
}
+/* Build the File Manager list view control. */
int
fm_build (listview_ctrl_t *lv, HWND ctrl)
{
int i, rc = 0;
listview_ctrl_t c;
- struct listview_column_s col[] =
- {
+ struct listview_column_s col[] = {
{0, 80, (char *)_("Status") },
{1, 256, (char *)_("Name") },
{2, 128, (char *)_("Operation") },
{0, 0, NULL }
};
- rc = listview_new( &c );
- if( rc )
- BUG( NULL );
+ rc = listview_new (&c);
+ if (rc)
+ BUG (NULL);
c->ctrl = ctrl;
- for ( i = 0; col[i].width; i++ )
- listview_add_column( c, &col[i] );
- listview_set_ext_style( c );
- if( lv )
+ for (i = 0; col[i].width; i++)
+ listview_add_column (c, &col[i]);
+ listview_set_ext_style (c);
+ if (lv)
*lv = c;
return 0;
-} /* fm_build */
+}
+/* Release the File Manager listview control. */
void
-fm_delete( listview_ctrl_t lv )
+fm_delete (listview_ctrl_t lv)
{
- if( lv ) {
- listview_release( lv );
+ if (lv) {
+ listview_release(lv);
}
-} /* fm_delete */
+}
int
@@ -424,12 +433,11 @@
{
if (!c)
return;
- if (c->recp)
- free (c->recp);
if (c->ctx) {
gpgme_release (c->ctx);
c->ctx = NULL;
}
+ safe_free (c->recp);
free_if_alloc (c->opaque);
free_if_alloc (c->output);
delete c; c = NULL;
@@ -859,10 +867,10 @@
case FM_SIGNENCRYPT:
if (fm_cmd == FM_SIGNENCRYPT)
ctx->req_signer = 1;
- DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_FILE_ENCRYPT, ctx->dlg,
- file_encrypt_dlg_proc, (LPARAM)ctx);
+ DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_FILE_ENCRYPT,
+ ctx->dlg, file_encrypt_dlg_proc, (LPARAM)ctx);
if (ctx->cancel == 1) {
- rc = WPTERR_GENERAL;
+ rc = WPTERR_GENERAL;
goto leave;
}
break;
@@ -1038,7 +1046,7 @@
BUG (0);
strcpy (ext, file_get_extension (ctx, c->sigmode));
strcpy (c->output, name);
- strcat (c->output, ext);
+ strcat (c->output, ext);
if (!overwrite_file (c->output)) {
rc = ask_filename (c, _("Enter filename for encrypted file"), NULL);
@@ -1046,10 +1054,11 @@
goto leave;
}
- err = gpg_file_data_new (name, 1, &in);
+ err = gpg_file_data_new (name, F_DATA_READ, &in);
if (err)
goto leave;
- err = gpg_file_data_new (c->output, 0, &out);
+ remove_crit_file_attrs (c->output, 0);
+ err = gpg_file_data_new (c->output, F_DATA_WRITE, &out);
if (err)
goto leave;
@@ -1060,7 +1069,7 @@
}
*/
- /* XXX
+ /* XXX: disable compression for multi-media files.
no_compr = is_multi_media (name);
gpgme_control (ctx, GPGME_CTRL_NO_COMPR, no_compr);
*/
@@ -1189,7 +1198,7 @@
gpg_file_data_release (out);
sfree_if_alloc (pass);
return rc;
-} /* fm_sym_encrypt */
+}
/* Show the human readable verify result from @sigres. */
@@ -1207,15 +1216,16 @@
sigok = sig->summary & GPGME_SIGSUM_GREEN;
s = sigok? _("Good signature") : _("BAD signature");
type = sigok? MB_OK: MB_ICONWARNING|MB_OK;
- keyid = sig->fpr;
+ keyid = sig->fpr;
if (!keyid)
return;
keyid = strlen (sig->fpr) == 40? sig->fpr+32 : sig->fpr + 24;
get_pubkey (sig->fpr, &key);
- _snprintf (buf, sizeof (buf)-1, "Signature made %s using %s key ID %s\n"
- "%s from \"%s\"",
- strtimestamp (sig->timestamp), get_key_pubalgo (sig->pubkey_algo),
+ _snprintf (buf, sizeof (buf)-1, _("Signature made %s using %s key ID %s\n"
+ "%s from \"%s\""),
+ strtimestamp (sig->timestamp),
+ get_key_pubalgo (sig->pubkey_algo),
keyid, s, key? key->uids->uid : _("user ID not found"));
msg_box (NULL, buf, _("Decrypt Verify"), type);
}
@@ -1228,7 +1238,7 @@
gpgme_recipient_t r;
gpgme_key_t key;
- for (r=rset; r; r = r->next) {
+ for (r=rset; r; r = r->next) {
if (gpgme_err_code (r->status) == GPG_ERR_NO_SECKEY)
continue;
else {
@@ -1279,14 +1289,13 @@
rc = ask_filename (c, _("Please enter filename for plaintext file"), NULL);
if (rc)
goto leave;
- }
+ }
- remove_crit_file_attrs (c->output, 0);
-
- err = gpg_file_data_new (name, 1, &in);
+ err = gpg_file_data_new (name, F_DATA_READ, &in);
if (err)
goto leave;
- err = gpg_file_data_new (c->output, 0, &out);
+ remove_crit_file_attrs (c->output, 0);
+ err = gpg_file_data_new (c->output, F_DATA_WRITE, &out);
if (err)
goto leave;
@@ -1320,7 +1329,8 @@
goto leave;
}
if (file_exist_check (c->output)) {
- log_box ("Decrypt", MB_ERR, _("Decryption failed.\n%s: does not exist."), c->output);
+ log_box ("Decrypt", MB_ERR,
+ _("Decryption failed.\n%s: does not exist."), c->output);
rc = WPTERR_GENERAL;
}
@@ -1339,22 +1349,22 @@
int
fm_sign (fm_state_t c, const char * name)
-{
- int rc = 0;
+{
gpgme_ctx_t ctx = c->ctx;
gpgme_error_t err;
file_data_t in=NULL, out=NULL;
char ext[5];
+ int rc = 0;
if (!c->init_cb || !c->cache_cb) {
- set_gpg_passphrase_cb (&c->pass_cb, c->ctx, GPG_CMD_SIGN, c->dlg, _("Signing") );
+ set_gpg_passphrase_cb (&c->pass_cb, c->ctx, GPG_CMD_SIGN, c->dlg, _("Signing"));
c->init_cb = 1;
}
free_if_alloc (c->output);
c->output = new char[strlen (name) + 5 + 1];
- if( !c->output)
- BUG( NULL );
+ if (!c->output)
+ BUG (NULL);
strcpy (ext, file_get_extension (ctx, c->sigmode));
strcpy (c->output, name);
strcat (c->output, ext);
@@ -1364,26 +1374,26 @@
if (rc)
goto leave;
}
- remove_crit_file_attrs (c->output, 0);
-
- err = gpg_file_data_new (name, 1, &in);
+
+ err = gpg_file_data_new (name, F_DATA_READ, &in);
if (err)
goto leave;
- err = gpg_file_data_new (c->output, 0, &out);
+ remove_crit_file_attrs (c->output, 0);
+ err = gpg_file_data_new (c->output, F_DATA_WRITE, &out);
if (err)
goto leave;
op_begin ();
err = gpgme_op_sign (ctx, in->dat, out->dat, c->sigmode);
op_end ();
- if( !c->cache_cb )
+ if (!c->cache_cb)
release_gpg_passphrase_cb (&c->pass_cb);
- if( c->pass_cb.cancel ) {
+ if (c->pass_cb.cancel) {
rc = WPTERR_GENERAL;
goto leave;
}
- if( err ) {
- msg_box( c->dlg, gpgme_strerror( err ), _("Sign"), MB_ERR );
+ if (err) {
+ msg_box (c->dlg, gpgme_strerror (err), _("Sign"), MB_ERR);
rc = WPTERR_GENERAL;
goto leave;
}
@@ -1397,7 +1407,7 @@
}
-static int
+static void
fm_add_sig_stat (file_sig_ctx_t log)
{
gpgme_key_t key;
@@ -1417,21 +1427,21 @@
log->use_uid = 1;
}
file_verify_add_state (log);
- return 0;
}
+/* Verify a detached signature from the clipboard. */
static int
-verify_pasted (listview_ctrl_t lv, fm_state_t ctx, const char * dat,
- int i, HWND dlg)
+verify_pasted (listview_ctrl_t lv, fm_state_t ctx,
+ const char *dat, int pos, HWND dlg)
{
- FILE * fp;
+ FILE *fp;
char stat[32];
- char file[256], * fname = NULL;
- int del_end=0;
+ char file[256], *fname = NULL;
+ int del_end = 0;
- listview_get_item_text (lv, i, 0, stat, sizeof (stat)-1);
- listview_get_item_text (lv, i, 1, file, sizeof (file)-1);
+ listview_get_item_text (lv, pos, 0, stat, sizeof (stat)-1);
+ listview_get_item_text (lv, pos, 1, file, sizeof (file)-1);
if (strcmp (stat, "UNKNOWN"))
return 0;
fname = make_filename (NULL, file, "asc");
@@ -1440,8 +1450,8 @@
if (fp == NULL) {
log_box (_("File Manager"), MB_ERR, "could not create '%s'", fname);
free_if_alloc (fname);
- return WPTERR_GENERAL;
- }
+ return WPTERR_GENERAL;
+ }
fwrite (dat, 1, strlen (dat), fp);
fclose (fp);
del_end = 1;
@@ -1454,6 +1464,7 @@
}
+/* Figure out if the clipboard contains a detached signature. */
int
fm_verify_pasted_detsig (listview_ctrl_t lv, HWND dlg)
{
@@ -1471,7 +1482,8 @@
/* XXX find a way to filter out bad signatures or just ignore all in
this case */
fm_state_new (&ctx);
- if ((i=listview_get_curr_pos (lv)) != -1) {
+ i = listview_get_curr_pos (lv);
+ if (i= -1) {
verify_pasted (lv, ctx, dat, i, dlg);
fnd = 1;
}
@@ -1503,7 +1515,9 @@
else
title = _("Selected Output File");
- if (strstr (name, ".sig") || strstr (name, ".asc") || strstr (name, ".gpg")) {
+ if (strstr (name, ".sig")
+ || strstr (name, ".asc")
+ || strstr (name, ".gpg")) {
_snprintf (fname, sizeof (fname) - 1, "%s", name);
fname[strlen (fname) - 4] = '\0';
if (file_exist_check (fname) == 0 && detached)
@@ -1569,10 +1583,11 @@
BUG (NULL);
file_verify_create_dlg ();
- err = gpg_file_data_new (name, 1, &in);
+ err = gpg_file_data_new (name, F_DATA_READ, &in);
if (err)
goto leave;
- err = gpg_file_data_new (c->output, detached? 1 : 0, &out);
+ err = gpg_file_data_new (c->output,
+ detached? F_DATA_READ : F_DATA_WRITE, &out);
if (err)
goto leave;
@@ -1601,12 +1616,13 @@
gpg_file_data_release (in);
if (out)
gpg_file_data_release (out);
- if (log.file)
- delete []log.file;
+ free_if_alloc (log.file);
return rc;
}
+/* Import the keys from the file @name.
+ Return value: 0 on success. */
int
fm_import (fm_state_t c, const char *name)
{
@@ -1621,7 +1637,7 @@
if (!c->output)
BUG (NULL);
- err = gpg_file_data_new (name, 1, &keydata);
+ err = gpg_file_data_new (name, F_DATA_READ, &keydata);
if (err)
goto leave;
@@ -1637,7 +1653,7 @@
res = gpgme_op_import_result (ctx);
print_import_status (res);
if (res->no_user_id > 0) {
- msg_box (c->dlg, _("Key without a self signature was dectected!\n"
+ msg_box (c->dlg, _("Key without a self signature was dectected!\n"
"(This key is NOT usable for encryption, etc)\n"
"\n"
"Cannot import these key(s)!"), _("Import"), MB_INFO);
@@ -1647,9 +1663,28 @@
if (keydata)
gpg_file_data_release (keydata);
return rc;
-} /* fm_import */
+}
+/* Generate a user friendly file name based on the key @k. */
+static char*
+gen_key_outname (gpgme_key_t k)
+{
+ char *p;
+ size_t i;
+
+ p = new char[strlen (k->uids->name)+1+8];
+ if (!p)
+ BUG (NULL);
+ sprintf (p, "%s.asc", k->uids->name);
+ for (i=0; i < strlen (p); i++) {
+ if (p[i] == ' ')
+ p[i] = '_';
+ }
+ return p;
+}
+
+
/* Export the selected keys from the File Manager to a file. */
int
fm_export (fm_state_t c)
@@ -1668,25 +1703,17 @@
goto leave;
}
- if (rset[1] == NULL) { /* count == 1*/
- gpgme_key_t k = rset[0];
- const char *s = k->uids->name;
- p = new char[strlen (s)+1+8];
- if (!p)
- BUG (NULL);
- strcpy (p, s );
- strcat (p, ".asc");
- }
+ if (rset[1] == NULL) /* count == 1*/
+ p = gen_key_outname (rset[0]);
name = get_filesave_dlg (c->dlg, _("Choose Name for Key File"),
NULL, p? p : NULL);
-
if (!name)
name = "keys.gpg";
patt = gpg_keylist_to_pattern (rset, c->n_recp);
- err = gpg_file_data_new (name, 0, &keydata);
+ err = gpg_file_data_new (name, F_DATA_WRITE, &keydata);
if (err)
goto leave;
@@ -1706,7 +1733,6 @@
if (patt)
free (patt);
free_if_alloc (p);
-
return rc;
}
@@ -1781,14 +1807,15 @@
}
+/* Extract the last folder name from @name. */
const char*
default_dirname (const char *name)
{
- char * p = strrchr( name, '\\' );
- if( !p )
+ char *p = strrchr (name, '\\');
+ if (!p)
return NULL;
return p+1;
-} /* default_dirname */
+}
/* Store all selected files from @lv in a zip archive
@@ -1807,13 +1834,13 @@
if (!nitems) {
msg_box (NULL, _("Encrypting into a ZIP archive makes sense with multiple files"),
_("File Manager"), MB_ERR);
- return -1;
+ return WPTERR_GENERAL;
}
- outfile = get_filesave_dlg (NULL, _("Choose File Name for Output"),
- NULL, "encrypted_files.zip");
+ outfile = get_filesave_dlg (ctx->dlg, _("Choose File Name for Output"),
+ NULL, "Encrypted_Files.zip");
if (!outfile)
- return -1;
+ return WPTERR_GENERAL;
for (i=0; i < nitems; i++) {
char name[300];
@@ -1846,7 +1873,7 @@
int
-fm_encrypt_directory( fm_state_t c, const char * name )
+fm_encrypt_directory (fm_state_t c, const char *name)
{
PK_FILE_LIST list = NULL;
WIN32_FIND_DATA findbuf;
@@ -1855,17 +1882,17 @@
char * patt = NULL, * p;
int rc = 0;
- if( !is_directory( name ) )
+ if (!is_directory (name))
return -1;
- patt = new char[strlen( name ) + 4];
- if( !patt )
- BUG( NULL );
- strcpy( patt, name );
- strcat( patt, "\\*" );
- hd = FindFirstFile( patt, &findbuf );
- if( !hd ) {
- free_if_alloc( patt );
- return -1;
+ patt = new char[strlen (name) + 4];
+ if (!patt)
+ BUG (NULL);
+ strcpy (patt, name);
+ strcat (patt, "\\*");
+ hd = FindFirstFile (patt, &findbuf);
+ if (!hd) {
+ free_if_alloc (patt);
+ return WPTERR_GENERAL;
}
if( strcmp( findbuf.cFileName, "." ) && strcmp( findbuf.cFileName, ".." ) ) {
p = make_filename( name, findbuf.cFileName, NULL );
@@ -1879,8 +1906,8 @@
free_if_alloc( p );
}
}
- s = get_filesave_dlg( c->dlg, _("Choose a Name for the Archive"),
- NULL, default_dirname( name ) );
+ s = get_filesave_dlg (c->dlg, _("Choose a Name for the Archive"),
+ NULL, default_dirname (name));
if( !s ) {
msg_box( c->dlg, _("Invalid archive name. Exit."), _("Encrypt Directory"), MB_ERR );
rc = -1;
@@ -1899,13 +1926,14 @@
pk_list_free( list );
free_if_alloc( patt );
return rc;
-} /* fm_encrypt_directory */
+}
static int CALLBACK
-fm_cmp_cb( LPARAM first, LPARAM second, LPARAM sortby )
+fm_cmp_cb (LPARAM first, LPARAM second, LPARAM sortby)
{
- const char * a = 0, * b = 0;
+ const char *a = 0;
+ const char *b = 0;
switch( (int)sortby ) {
case FM_SORT_STAT:
@@ -1915,30 +1943,33 @@
case FM_SORT_OP:
break;
}
- return stricmp( a, b );
-} /* fm_cmp_cb */
+ return stricmp (a, b);
+}
+/* Sort the list items from @lv with the mode given by @sortby. */
int
-fm_sort( listview_ctrl_t lv, int sortby )
+fm_sort (listview_ctrl_t lv, int sortby)
{
return listview_sort_items( lv, sortby, fm_cmp_cb );
-} /* fm_sort */
+}
+/* Start the 'print md' dialog. Pass over the listview control
+ @lv and the digest algo @mdalgo. */
void
-fm_print_md( listview_ctrl_t lv, HWND dlg, int mdalgo )
+fm_print_md (listview_ctrl_t lv, HWND dlg, int mdalgo)
{
struct md_file_s mdctx;
- if( listview_count_items( lv, 0 ) == 0 )
+ if (listview_count_items (lv, 0) == 0)
return;
memset (&mdctx, 0, sizeof (mdctx));
mdctx.lv = lv;
mdctx.mdalgo = mdalgo;
- DialogBoxParam( glob_hinst, (LPCTSTR)IDD_WINPT_FILE_MDSUM, dlg,
- mdsum_dlg_proc, (LPARAM)&mdctx );
-} /* fm_print_md */
+ DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_FILE_MDSUM, dlg,
+ mdsum_dlg_proc, (LPARAM)&mdctx);
+}
/* Send the selected file in @lv via MAPI to a mail recipient. */
Modified: trunk/Src/wptFileManagerDlg.cpp
===================================================================
--- trunk/Src/wptFileManagerDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptFileManagerDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -124,7 +124,7 @@
case WM_SYSCOMMAND:
if (LOWORD (wparam) == SC_CLOSE) {
c->cancel = 1;
- EndDialog( dlg, TRUE );
+ EndDialog (dlg, TRUE);
}
return FALSE;
@@ -138,13 +138,12 @@
switch( LOWORD( wparam ) ) {
case IDOK:
ctx = c->ctx;
- if (c->recp)
- free (c->recp);
+ safe_free (c->recp);
c->recp = keylist_get_recipients (lv, &force_trust, &c->n_recp);
if (!c->n_recp) {
msg_box (dlg, _("Please select at least one recipient."),
_("File Encrypt"), MB_ERR);
- free (c->recp);
+ safe_free (c->recp);
c->recp = NULL;
c->cancel = 1;
return TRUE;
@@ -179,9 +178,10 @@
}
return FALSE;
-} /* file_encrypt_dlg_proc */
+}
+/* Dialog box procedure for importing keys. */
BOOL CALLBACK
file_import_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
@@ -189,16 +189,14 @@
static fm_state_t c;
static int is_revcert = 0, has_seckeys = 0;
- switch( msg ) {
+ switch (msg) {
case WM_INITDIALOG:
c = (fm_state_s *)lparam;
if (!c)
dlg_fatal_error( dlg, "Could not get dialog param!" );
- #ifndef LANG_DE
SetWindowText (dlg, _("Key Import"));
- #endif
- ShowWindow( GetDlgItem( dlg, IDC_IMPORT_KEYMNGT ), WS_DISABLED );
- /* XXX: use the new code */
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
+ ShowWindow (GetDlgItem( dlg, IDC_IMPORT_KEYMNGT ), WS_DISABLED);
implist_build (&lv, GetDlgItem (dlg, IDC_IMPORT_KEYLIST));
implist_load (lv, c->opaque, &is_revcert, &has_seckeys);
if (!listview_count_items (lv, 0)) {
@@ -207,10 +205,10 @@
EndDialog (dlg, FALSE);
}
else {
- const char *s = "File contain(s) %d key(s).";
+ const char *s = _("File contain(s) %d key(s).");
char *p = new char[strlen (s) + 32];
if (!p)
- BUG (0);
+ BUG (NULL);
sprintf (p, s, listview_count_items (lv, 0));
SetDlgItemText (dlg, IDC_IMPORT_INFO, p);
free_if_alloc (p);
@@ -250,11 +248,12 @@
}
return FALSE;
-} /* file_import_dlg_proc */
+}
+/* Dialog box procedure for file signing. */
BOOL CALLBACK
-file_sign_dlg_proc( HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam )
+file_sign_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
static fm_state_t c;
static listview_ctrl_t lv;
@@ -263,50 +262,51 @@
int lv_idx;
char signer[32];
- switch( msg ) {
+ switch (msg) {
case WM_INITDIALOG:
c = (fm_state_s *)lparam;
- if( c == NULL )
- dlg_fatal_error( dlg, "Could not get dialog state!" );
+ if (c == NULL)
+ dlg_fatal_error (dlg, "Could not get dialog state!");
SetWindowText (dlg, _("File Sign"));
SetDlgItemText (dlg, IDC_FILE_SIG_ARMOR, _("&Text Output") );
SetDlgItemText (dlg, IDC_FILE_SIG_NORMAL, _("&Normal Signature"));
SetDlgItemText (dlg, IDC_FILE_SIG_DETACH, _("&Detached Signature"));
SetDlgItemText (dlg, IDC_FILE_SIG_CLEAR, _("&Cleartext Signature"));
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
CheckDlgButton (dlg, IDC_FILE_SIG_DETACH, BST_CHECKED);
kc = keycache_get_ctx (KEYCACHE_PUB);
if (!kc)
BUG (dlg);
sec_kc = keycache_get_ctx (KEYCACHE_PRV);
if (!sec_kc)
- BUG( dlg );
- lv = keylist_load( GetDlgItem(dlg, IDC_FILE_SIG_LIST), kc, sec_kc,
- KEYLIST_SIGN, KEY_SORT_USERID );
- SetForegroundWindow( dlg );
+ BUG (dlg);
+ lv = keylist_load (GetDlgItem (dlg, IDC_FILE_SIG_LIST), kc, sec_kc,
+ KEYLIST_SIGN, KEY_SORT_USERID);
+ SetForegroundWindow (dlg);
return TRUE;
case WM_DESTROY:
- if( lv ) {
- listview_release( lv );
+ if (lv) {
+ listview_release (lv);
lv = NULL;
}
return FALSE;
case WM_SYSCOMMAND:
- if( LOWORD (wparam) == SC_CLOSE )
- EndDialog( dlg, TRUE );
+ if (LOWORD (wparam) == SC_CLOSE)
+ EndDialog (dlg, TRUE);
return FALSE;
case WM_COMMAND:
- switch( LOWORD( wparam ) ) {
+ switch (LOWORD (wparam)) {
case IDOK:
- if( IsDlgButtonChecked( dlg, IDC_FILE_SIG_ARMOR ) )
+ if (IsDlgButtonChecked (dlg, IDC_FILE_SIG_ARMOR))
gpgme_set_armor (c->ctx, 1);
- if( IsDlgButtonChecked( dlg, IDC_FILE_SIG_NORMAL ) )
+ if (IsDlgButtonChecked (dlg, IDC_FILE_SIG_NORMAL))
c->sigmode = GPGME_SIG_MODE_NORMAL;
- else if( IsDlgButtonChecked( dlg, IDC_FILE_SIG_DETACH ) )
+ else if (IsDlgButtonChecked (dlg, IDC_FILE_SIG_DETACH))
c->sigmode = GPGME_SIG_MODE_DETACH;
- else if( IsDlgButtonChecked( dlg, IDC_FILE_SIG_CLEAR ) )
+ else if (IsDlgButtonChecked( dlg, IDC_FILE_SIG_CLEAR))
c->sigmode = GPGME_SIG_MODE_CLEAR;
else {
/* default is to produce detached signatures */
@@ -317,7 +317,7 @@
if (listview_count_items (lv, 0) == 1)
lv_idx = 0;
else {
- msg_box (dlg, _("Please select a key."), _("Sign"), MB_ERR);
+ msg_box (dlg, _("Please select a key."), _("File Sign"), MB_ERR);
return FALSE;
}
}
@@ -343,7 +343,7 @@
}
return FALSE;
-} /* file_sign_dlg_proc */
+}
@@ -378,11 +378,11 @@
if (!lv) { /* flush */
SendMessage (statbar, SB_SETTEXT, 1, (LPARAM)"0 KB");
- SendMessage (statbar, SB_SETTEXT, 0, (LPARAM)"0 Objects marked");
+ SendMessage (statbar, SB_SETTEXT, 0, (LPARAM)_("0 Objects marked"));
return;
}
n = listview_count_items (lv, 1);
- _snprintf (buf, sizeof (buf)-1, "%d Object(s) marked", n);
+ _snprintf (buf, sizeof (buf)-1, _("%d Object(s) marked"), n);
SendMessage (statbar, SB_SETTEXT, 0, (LPARAM)buf);
listview_get_item_text (lv, listview_get_curr_pos (lv), 1, buf, 127);
if (stat (buf, &st) == 0) {
@@ -394,6 +394,7 @@
}
+/* Subclass procedure to detect common hotkeys. */
static BOOL CALLBACK
filelist_subclass_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
@@ -436,6 +437,7 @@
}
+/* Dialog box procedure for the File Manager. */
BOOL CALLBACK
file_manager_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
@@ -482,7 +484,8 @@
filelist_proc.old = (WNDPROC)GetWindowLong (fl, GWL_WNDPROC);
if (filelist_proc.old) {
if (!SetWindowLong (fl, GWL_WNDPROC, (LONG)filelist_proc.current)) {
- msg_box (dlg, _("Could not set filelist window procedure."), _("Key Manager"), MB_ERR);
+ msg_box (dlg, _("Could not set filelist window procedure."),
+ _("File Manager"), MB_ERR);
BUG (NULL);
}
}
@@ -593,8 +596,8 @@
return TRUE;
case ID_FILEMISC_WIPE_FREES:
- DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_SPACE_SECDEL, dlg,
- space_wipefrees_dlg_proc, 0);
+ DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_SPACE_SECDEL,
+ dlg, space_wipefrees_dlg_proc, 0);
break;
case ID_FILEMISC_SELALL:
@@ -609,7 +612,8 @@
always_ontop ^= 1;
set_menu_state (menu, ID_FILEMISC_ONTOP,
always_ontop == 0? MFS_UNCHECKED : MFS_CHECKED);
- center_window2 (dlg, NULL, always_ontop == 0? HWND_NOTOPMOST : HWND_TOPMOST);
+ center_window2 (dlg, NULL,
+ always_ontop == 0? HWND_NOTOPMOST : HWND_TOPMOST);
break;
case ID_FILEMISC_SEND:
@@ -641,11 +645,11 @@
int algo;
switch (LOWORD (wparam)) {
- case ID_FILEMISC_MD_MD5: algo = GPGME_MD_MD5; break;
- case ID_FILEMISC_MD_SHA1: algo = GPGME_MD_SHA1; break;
+ case ID_FILEMISC_MD_MD5: algo = GPGME_MD_MD5; break;
+ case ID_FILEMISC_MD_SHA1: algo = GPGME_MD_SHA1; break;
case ID_FILEMISC_MD_RMD160: algo = GPGME_MD_RMD160; break;
- case ID_FILEMISC_MD_SHA256:algo = GPGME_MD_SHA256; break;
- default: algo = GPGME_MD_SHA1; break;
+ case ID_FILEMISC_MD_SHA256: algo = GPGME_MD_SHA256; break;
+ default: algo = GPGME_MD_SHA1; break;
}
fm_print_md (lv, dlg, algo);
SetForegroundWindow (dlg);
@@ -660,29 +664,31 @@
return TRUE;
/* context menu entries */
- case ID_FILECTX_ENCRYPT: send_cmd_id( dlg, ID_FILEMISC_ENCRYPT); break;
- case ID_FILECTX_DECRYPT: send_cmd_id( dlg, ID_FILEMISC_DECRYPT );break;
- case ID_FILECTX_SIGN: send_cmd_id( dlg, ID_FILEMISC_SIGN ); break;
- case ID_FILECTX_SIGNENC: send_cmd_id( dlg, ID_FILEMISC_SIGNENC );break;
- case ID_FILECTX_VERIFY: send_cmd_id( dlg, ID_FILEMISC_VERIFY ); break;
- case ID_FILECTX_WIPE: send_cmd_id( dlg, ID_FILEMISC_WIPE ); break;
- case ID_FILECTX_LIST: send_cmd_id( dlg, ID_FILEMISC_LIST ); break;
- case ID_FILECTX_SEND: send_cmd_id( dlg, ID_FILEMISC_SEND ); break;
+ case ID_FILECTX_ENCRYPT: send_cmd_id (dlg, ID_FILEMISC_ENCRYPT); break;
+ case ID_FILECTX_DECRYPT: send_cmd_id (dlg, ID_FILEMISC_DECRYPT);break;
+ case ID_FILECTX_SIGN: send_cmd_id (dlg, ID_FILEMISC_SIGN); break;
+ case ID_FILECTX_SIGNENC: send_cmd_id (dlg, ID_FILEMISC_SIGNENC);break;
+ case ID_FILECTX_VERIFY: send_cmd_id (dlg, ID_FILEMISC_VERIFY); break;
+ case ID_FILECTX_WIPE: send_cmd_id (dlg, ID_FILEMISC_WIPE); break;
+ case ID_FILECTX_LIST: send_cmd_id (dlg, ID_FILEMISC_LIST); break;
+ case ID_FILECTX_SEND: send_cmd_id (dlg, ID_FILEMISC_SEND); break;
case ID_FILECTX_ENCRYPT_ZIP:send_cmd_id (dlg, ID_FILEMISC_ENCRYPT_ZIP); break;
}
break;
}
return FALSE;
-} /* file_manager_dlg_proc */
+}
+/* Dialog box procedure for the FM preferences. */
BOOL CALLBACK
file_preferences_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch (msg) {
case WM_INITDIALOG:
- CheckDlgButton (dlg, IDC_FPREFS_PROGRESS, reg_prefs.fm.progress? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton (dlg, IDC_FPREFS_PROGRESS,
+ reg_prefs.fm.progress? BST_CHECKED : BST_UNCHECKED);
SetForegroundWindow (dlg);
center_window (dlg, NULL);
break;
@@ -703,9 +709,10 @@
}
return FALSE;
-} /* file_preferences_dlg_proc */
+}
+/* Add the selected items from @lv into the combo box. */
static void
add_files_from_lv (HWND dlg, listview_ctrl_t lv)
{
Modified: trunk/Src/wptFileSaveDlg.cpp
===================================================================
--- trunk/Src/wptFileSaveDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptFileSaveDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -1,5 +1,5 @@
/* wptFileSaveDlg.cpp - Save a file
- * Copyright (C) 2002, 2003 Timo Schulz
+ * Copyright (C) 2002, 2003, 2005 Timo Schulz
*
* This file is part of WinPT.
*
@@ -17,7 +17,6 @@
* along with WinPT; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -32,18 +31,20 @@
#include "wptErrors.h"
static void
-switch_buttons( HWND dlg, int file )
+switch_buttons (HWND dlg, int file)
{
int check1 = file? BST_CHECKED : BST_UNCHECKED;
int check2 = file? BST_UNCHECKED: BST_CHECKED;
- CheckDlgButton( dlg, IDC_FILE_SAVE_TOFILE, check1 );
- CheckDlgButton( dlg, IDC_FILE_SAVE_CLIP, check2 );
-} /* switch_buttons */
+ CheckDlgButton (dlg, IDC_FILE_SAVE_TOFILE, check1);
+ CheckDlgButton (dlg, IDC_FILE_SAVE_CLIP, check2);
+}
+/* Dialog box procedure to save the plaintext of a signature
+ plus some additional information. */
BOOL CALLBACK
-file_save_dlg_proc( HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam )
+file_save_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
gpgme_data_t sig, plain;
gpgme_error_t err;
@@ -51,18 +52,20 @@
int has_data;
char file[768];
- switch ( msg ) {
+ switch (msg) {
case WM_INITDIALOG:
- #ifndef LANG_DE
- SetWindowText( dlg, _("Save Plaintext") );
- #endif
- switch_buttons( dlg, 0 );
- SetForegroundWindow( dlg );
+ SetWindowText (dlg, _("Save Plaintext"));
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
+ 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);
+ SetForegroundWindow (dlg);
return TRUE;
case WM_SYSCOMMAND:
- if( LOWORD( wparam ) == SC_CLOSE )
- EndDialog( dlg, TRUE );
+ if (LOWORD (wparam) == SC_CLOSE)
+ EndDialog (dlg, TRUE);
return FALSE;
case WM_COMMAND:
@@ -117,4 +120,4 @@
}
return FALSE;
-} /* file_save_dlg_proc */
+}
Modified: trunk/Src/wptFirstRunDlg.cpp
===================================================================
--- trunk/Src/wptFirstRunDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptFirstRunDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -17,7 +17,6 @@
* along with WinPT; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -32,6 +31,8 @@
#include "wptContext.h"
+/* Dialog box procedure which is executed on the first time WinPT
+ is started. */
BOOL CALLBACK
first_run_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
@@ -46,6 +47,7 @@
SetDlgItemText (dlg, IDC_FIRST_KEYGEN, _("&Generate a GnuPG key pair"));
SetDlgItemText (dlg, IDC_FIRST_IMPORT, _("&Copy GnuPG keyrings from another location"));
SetDlgItemText (dlg, IDC_FIRST_SETUP, _("&Specify a new GnuPG home directory"));
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
SetForegroundWindow (dlg);
center_window (dlg, NULL);
return TRUE;
@@ -71,4 +73,5 @@
}
return FALSE;
-} /* first_run_dlg_proc */
+}
+
Modified: trunk/Src/wptKeyEditDlgs.cpp
===================================================================
--- trunk/Src/wptKeyEditDlgs.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptKeyEditDlgs.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -269,7 +269,9 @@
SetDlgItemText (dlg, IDC_ADDPHOTO_INF, _("Remember that the image is stored within your public key. If you use a very large picture, your key will become very large as well! Keeping the image close to 240x288 is a good size to use."));
SetDlgItemText (dlg, IDC_ADDPHOTO_FILEINF, _("Pick an image to use for your photo ID.\nThe image must be a JPEG file."));
SetDlgItemText (dlg, IDC_ADDPHOTO_PWDINF, _("Passphrase"));
- SetForegroundWindow( dlg );
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
+ SetWindowText (dlg, _("Add Photo ID"));
+ SetForegroundWindow (dlg);
break;
case WM_DESTROY:
@@ -361,7 +363,9 @@
SetDlgItemText (dlg, IDC_ADDREV_INF, _("Appointing a key as designated revoker cannot be undone."));
SetDlgItemText (dlg, IDC_ADDREV_KEYINF, _("Public key"));
SetDlgItemText (dlg, IDC_ADDREV_PWDINF, _("Passphrase"));
- SetForegroundWindow( dlg );
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
+ SetWindowText (dlg, _("Add Revoker"));
+ SetForegroundWindow (dlg);
break;
case WM_DESTROY:
@@ -434,7 +438,7 @@
SetDlgItemText (dlg, IDC_ADDUID_INFNAME, _("&Name"));
SetDlgItemText (dlg, IDC_ADDUID_INFEMAIL, _("&Email"));
SetDlgItemText (dlg, IDC_ADDUID_INFCOMMENT, _("&Comment"));
-
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
SetForegroundWindow (dlg);
return FALSE;
@@ -569,6 +573,7 @@
SetDlgItemText (dlg, IDC_ADDSUBKEY_INFSIZE, _("Size in bits"));
SetDlgItemText (dlg, IDC_ADDSUBKEY_INFVALID, _("Key expiration"));
SetDlgItemText (dlg, IDC_ADDSUBKEY_EXPIRE, _("&Never"));
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
lb = GetDlgItem (dlg, IDC_ADDSUBKEY_ALGO);
listbox_add_string (lb, "DSA (sign only)");
@@ -578,7 +583,7 @@
CheckDlgButton (dlg, IDC_ADDSUBKEY_EXPIRE, BST_CHECKED);
EnableWindow (GetDlgItem (dlg, IDC_ADDSUBKEY_EXPDATE), FALSE);
init_keysize_box (dlg, IDC_ADDSUBKEY_SIZE);
- SetForegroundWindow( dlg );
+ SetForegroundWindow (dlg);
return FALSE;
case WM_SYSCOMMAND:
Modified: trunk/Src/wptKeyEditOwnertrustDlg.cpp
===================================================================
--- trunk/Src/wptKeyEditOwnertrustDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptKeyEditOwnertrustDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -17,7 +17,6 @@
* along with WinPT; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -53,9 +52,7 @@
k = (winpt_key_t)lparam;
if (k == NULL)
dlg_fatal_error( dlg, "Could not get dialog param!" );
- #ifndef LANG_DE
- SetWindowText( dlg, _("Change Ownertrust") );
- #endif
+ SetWindowText (dlg, _("Change Ownertrust"));
lb = GetDlgItem( dlg, IDC_KEYTRUST_TRUST );
listbox_add_string( lb, _("Don't know") );
listbox_add_string( lb, _("I do NOT trust") );
@@ -67,6 +64,7 @@
"correctly verify other users' keys (by looking "
"at passports, checking fingerprint from "
"different source...)?"));
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
center_window (dlg, NULL);
SetForegroundWindow (dlg);
return TRUE;
Modified: trunk/Src/wptKeyRevokeDlg.cpp
===================================================================
--- trunk/Src/wptKeyRevokeDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptKeyRevokeDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -86,9 +86,12 @@
if( !lparam )
dlg_fatal_error(dlg, "Could not get dialog param!");
k = (winpt_key_t )lparam;
- #ifndef LANG_DE
SetWindowText (dlg, _("Key Revocation"));
- #endif
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
+ SetDlgItemText (dlg, IDC_KEYREVOKE_REASONINF, _("Reason for revocation"));
+ SetDlgItemText (dlg, IDC_KEYREVOKE_OPTINF, _("Optional description text"));
+ SetDlgItemText (dlg, IDC_KEYREVOKE_PWDINF, _("&Passphrase"));
+ SetDlgItemText (dlg, IDC_KEYREVOKE_OUTINF, _("Output file"));
SetDlgItemText (dlg, IDC_KEYREVOKE_HINT,
_("Please move this certificate to a medium where it can be "
"stored in a safe place (floppy, CDR, etc..). "
Modified: trunk/Src/wptKeygenDlg.cpp
===================================================================
--- trunk/Src/wptKeygenDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptKeygenDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -595,6 +595,9 @@
SetDlgItemText (dlg, IDC_KEYWIZARD_TEXT1INF, _("Every key pair must have a name associated with it. The name and\nemail address let your correspondents that your public key they are\nusing belongs to us."));
SetDlgItemText (dlg, IDC_KEYWIZARD_TEXT2INF, _("By accosiating an email address with your key pair, you will enable WinPT to assist your correspondents in selecting the correct public\nkey when communicating with you."));
SetWindowText (dlg, _("Key Generation Wizard"));
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
+ SetDlgItemText (dlg, IDC_KEYWIZARD_EXPERT, _("E&xpert"));
+
SetForegroundWindow (dlg);
center_window (dlg, NULL);
break;
Modified: trunk/Src/wptKeylist.cpp
===================================================================
--- trunk/Src/wptKeylist.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptKeylist.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -41,29 +41,6 @@
#define key_is_useable(key) (!(key)->revoked && !(key)->expired && !(key)->disabled)
-static struct listview_column_s klist_enc[] = {
- {0, 242, (char *)_("User ID")},
- {1, 80, (char *)_("Key ID")},
- {3, 46, (char *)_("Size")},
- {4, 50, (char *)_("Cipher")},
- {5, 70, (char *)_("Validity")},
- {0, 0, NULL}
-};
-#define KLIST_ENC_ITEMS (DIM(klist_enc) -1)
-
-static struct listview_column_s klist[] = {
- {0, 242, (char *)_("User ID")},
- {1, 78, (char *)_("Key ID")},
- {2, 52, (char *)_("Type")},
- {3, 68, (char *)_("Size")},
- {4, 66, (char *)_("Cipher")},
- {5, 70, (char *)_("Validity")},
- {6, 40, (char *)_("Trust")},
- {7, 72, (char *)_("Creation")},
- {0, 0, NULL}
-};
-#define KLIST_ITEMS (DIM(klist) - 1)
-
struct key_array_s {
char keyid[32];
int checked;
@@ -380,17 +357,17 @@
if (uididx < 0 || count_userids (key) > uididx)
uididx = 0;
if (listmode) {
- const char *s;
-
+ const char *s;
+
if (key->revoked)
s = _("Revoked");
else if (key->expired)
s = _("Expired");
else if (key->disabled)
s = _("Disabled");
- else
- s = "";
-
+ else
+ s = "";
+
/* if the key has a special status, we don't continue to figure out
what any user-id validities. */
if (*s)
@@ -545,27 +522,49 @@
static int
keylist_build (listview_ctrl_t *r_lv, HWND ctrl, int mode)
{
+ struct listview_column_s klist_enc[] = {
+ {0, 242, (char *)_("User ID")},
+ {1, 80, (char *)_("Key ID")},
+ {3, 46, (char *)_("Size")},
+ {4, 50, (char *)_("Cipher")},
+ {5, 70, (char *)_("Validity")},
+ {0, 0, NULL}
+ };
+
+ struct listview_column_s klist[] = {
+ {0, 242, (char *)_("User ID")},
+ {1, 78, (char *)_("Key ID")},
+ {2, 52, (char *)_("Type")},
+ {3, 68, (char *)_("Size")},
+ {4, 66, (char *)_("Cipher")},
+ {5, 70, (char *)_("Validity")},
+ {6, 40, (char *)_("Trust")},
+ {7, 72, (char *)_("Creation")},
+ {0, 0, NULL}
+ };
+
listview_ctrl_t lv;
listview_column_t col;
int j, n = 0;
+ int kl_nolist = 0;
int rc = 0;
rc = listview_new (&lv);
- if( rc )
+ if (rc)
return rc;
lv->ctrl = ctrl;
if ((mode & KEYLIST_ENCRYPT) || (mode & KEYLIST_ENCRYPT_MIN)) {
col = klist_enc;
- n = KLIST_ENC_ITEMS;
+ n = (DIM(klist_enc) -1);
}
else if ((mode & KEYLIST_SIGN)) {
col = klist_enc;
- n = KLIST_ENC_ITEMS - 1;
+ n = (DIM(klist_enc) - 1) - 1;
}
else {
col = klist;
- n = KLIST_ITEMS;
+ n = (DIM(klist) - 1);
}
for( j = 0; j < n; j++ )
@@ -703,7 +702,6 @@
if (!u || u->revoked || uididx < 0)
uididx = 0; /* fixme: this happen sometimes but it's illegal! (<0) */
u = get_nth_userid (key, uididx);
- /*attr = key->uids->uid; XXX*/
attr = u->uid;
}
if (attr == NULL || strlen (attr) < 5) { /* normal userids are >= 5 chars */
Modified: trunk/Src/wptKeyserverSearchDlg.cpp
===================================================================
--- trunk/Src/wptKeyserverSearchDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptKeyserverSearchDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -17,7 +17,6 @@
* along with WinPT; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -59,10 +58,9 @@
ksc = (keyserver_ctx *)lparam;
if (!ksc)
dlg_fatal_error (dlg, "Could not get dialog param.");
- #ifndef LANG_DE
SetWindowText (dlg, _("Keyserver Searching"));
- #endif
SetDlgItemText (dlg, IDC_HKPSEARCH_RECV, _("&Receive"));
+ SetDlgItemText (dlg, IDOK, _("&Cancel"));
_snprintf (info, sizeof (info) - 1,
_("Connect to '%s' to search for \"%s\""),
ksc->name, ksc->pattern);
Modified: trunk/Src/wptMainProc.cpp
===================================================================
--- trunk/Src/wptMainProc.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptMainProc.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -121,6 +121,8 @@
SetWindowText (dlg, _("Delete Clipboard Contents"));
SetDlgItemText (dlg, IDC_CONFDELCLIP_BRAIN, _("&Remember the answer"));
SetDlgItemText (dlg, IDC_CONFDELCLIP_INFO, _("Do you want to delete the contents from the clipboard?"));
+ SetDlgItemText (dlg, IDYES, _("&Yes"));
+ SetDlgItemText (dlg, IDNO, _("&No"));
center_window (dlg, NULL);
SetForegroundWindow (dlg);
break;
Modified: trunk/Src/wptPINDlg.cpp
===================================================================
--- trunk/Src/wptPINDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptPINDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -52,10 +52,11 @@
else
s = _("Please enter the PIN");
SetDlgItemText (dlg, IDC_PIN_HIDE, _("&Hide Typing"));
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
CheckDlgButton (dlg, IDC_PIN_HIDE, BST_CHECKED);
SetDlgItemText (dlg, IDC_PIN_INFO, s);
center_window (dlg, NULL);
- SetFocus( GetDlgItem (dlg, IDC_PIN_VALUE ));
+ SetFocus (GetDlgItem (dlg, IDC_PIN_VALUE ));
SetForegroundWindow (dlg);
return FALSE;
Modified: trunk/Src/wptPassphraseCB.cpp
===================================================================
--- trunk/Src/wptPassphraseCB.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptPassphraseCB.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -80,6 +80,7 @@
c = (passphrase_cb_s *)lparam;
if (!c)
BUG (0);
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
SetDlgItemText (dlg, IDC_DECRYPT_HIDE, _("&Hide Typing"));
SetWindowText (dlg, c->title);
if (c->gpg_cmd == GPG_CMD_DECRYPT) {
Modified: trunk/Src/wptPreferencesDlg.cpp
===================================================================
--- trunk/Src/wptPreferencesDlg.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptPreferencesDlg.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -146,6 +146,7 @@
SetDlgItemText (dlg, IDC_PREFS_ALLOPTINF, _("General options"));
SetDlgItemText (dlg, IDC_PREFS_CLIPINF, _("Clipboard hotkeys"));
SetDlgItemText (dlg, IDC_PREFS_CURRINF, _("Current window hotkeys"));
+ SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
SetDlgItemInt( dlg, IDC_PREFS_CACHETIME, reg_prefs.cache_time, TRUE );
SetDlgItemInt( dlg, IDC_PREFS_WORDWRAP, reg_prefs.word_wrap, TRUE );
Modified: trunk/Src/wptW32API.cpp
===================================================================
--- trunk/Src/wptW32API.cpp 2005-11-29 09:48:43 UTC (rev 104)
+++ trunk/Src/wptW32API.cpp 2005-11-30 10:22:00 UTC (rev 105)
@@ -17,7 +17,6 @@
* along with WinPT; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -310,9 +309,9 @@
{
struct stat statbuf;
- if( stat( dir, &statbuf ) == -1 )
+ if (stat (dir, &statbuf) == -1)
return WPTERR_GENERAL;
- if( statbuf.st_mode & _S_IFDIR )
+ if (statbuf.st_mode & _S_IFDIR)
return 0;
return WPTERR_GENERAL;
}
@@ -371,21 +370,13 @@
/* Start a dialog with the exception that before it is checked that the
dialog is not already openened. */
int
-dialog_box_param( HINSTANCE hinst, LPCTSTR name, HWND parent, DLGPROC fnc,
- LPARAM param, LPCTSTR title, int title_id )
+dialog_box_param (HINSTANCE hinst, LPCTSTR name, HWND parent, DLGPROC fnc,
+ LPARAM param, LPCTSTR title, int title_id)
{
- #ifndef LANG_DE
- if( FindWindowEx( GetDesktopWindow(), NULL, NULL, title ) )
- return -1;
- #else
- char strdesc[256];
- LoadString( glob_hinst, title_id, strdesc, sizeof (strdesc) -1 );
- if( FindWindowEx( GetDesktopWindow(), NULL, NULL, strdesc ) )
+ if (FindWindowEx (GetDesktopWindow (), NULL, NULL, title))
return -1;
- #endif
-
- return DialogBoxParam( hinst, name, parent, fnc, param );
-} /* dialog_box_param */
+ return DialogBoxParam (hinst, name, parent, fnc, param);
+}
/* Wrapper for message box which forces the message box into the
More information about the Winpt-commits
mailing list