[Winpt-commits] r170 - in trunk: . Include Po Src

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Mon Jan 30 13:42:59 CET 2006


Author: twoaday
Date: 2006-01-30 13:42:57 +0100 (Mon, 30 Jan 2006)
New Revision: 170

Modified:
   trunk/Include/wptKeyEdit.h
   trunk/NEWS
   trunk/Po/ChangeLog
   trunk/Po/de.po
   trunk/Src/ChangeLog
   trunk/Src/WinPT-en.rc
   trunk/Src/wptKeyEdit.cpp
   trunk/Src/wptKeyEditCB.cpp
   trunk/Src/wptKeyEditDlgs.cpp
   trunk/Src/wptKeyPropsDlg.cpp
   trunk/Src/wptKeysignDlg.cpp
   trunk/Src/wptPassphraseDlg.cpp
   trunk/TODO
   trunk/configure.ac
Log:
2006-01-29  Timo Schulz  <ts at g10code.de>
 
        * wptKeyPropsDlg.cpp (keyprops_dlg_proc): Allow to use ESC
        to quit dialog.
        * wptKeysignDlg.cpp (sig_class_dlg_proc): More space for
        translations. Directly return sig class.
        (keysign_dlg_proc): Change msgbox title.
        * wptKeyEdit.cpp (signUserid): New.
        (getUseridIndex): New.
        (getKeyIndex): New.
        (getSigIndex): New.
        (clear): New.
        * wptKeyEditCB.cpp (cmd_sign_handler): Allow to select
        user-id first.
        * wptKeyEditDlgs.cpp (lookup_cmd): New.
        (do_editkey_sign_userid): New.
        (do_init_cmdlist): Differ between key pairs and public keys
        and allowed actions.
        (keyedit_change_ownertrust): Show msgbox on success.
        (get_default_key): New.
        * wptPassphraseDlg.cpp (request_passphrase): Reset @cancel.
         



Modified: trunk/Include/wptKeyEdit.h
===================================================================
--- trunk/Include/wptKeyEdit.h	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Include/wptKeyEdit.h	2006-01-30 12:42:57 UTC (rev 170)
@@ -91,14 +91,15 @@
     int resval;
     int type;
 
+    int sig_index;
+    int key_index;
+    int uid_index;
+
 public:
     int cnt;
     int cmd_sent;
     const char *pass;
     const char *new_pass;
-    int sig_index;
-    int key_index;
-    int uid_index;
     const char *url;
     int trust_id;
     char *name, *cmt, *email;
@@ -116,18 +117,25 @@
     ~GpgKeyEdit (void);
 
     bool isValid (void);
-    gpgme_key_t getKey (void);
     void reset (void);
+    void clear (void);
 
     void setPassphrase (const char *pass);
     void setKey (gpgme_key_t key);
     void setKeyID (const char *keyid);
     void setLocalUser (gpgme_key_t locusr);
-    void setCallback (gpgme_progress_cb_t cb, void *cb_value);
-    int  getType (void);
+    void setCallback (gpgme_progress_cb_t cb, void *cb_value);    
     void setResult (int val);
     int  getResult (void);
 
+    gpgme_key_t getKey (void);
+    int getType (void);
+    int getUseridIndex (void);
+    int getKeyIndex (void);
+    int getSigIndex (void);
+
+    gpgme_error_t signUserid (int uid_idx, int mode, int sig_class, 
+			      const char *exp_date);
     gpgme_error_t signKey (int mode, int sig_class, const char *exp_date);
     gpgme_error_t setTrust (gpgme_validity_t trust);
     gpgme_error_t addUserid (const char *name, const char *cmt, 

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/NEWS	2006-01-30 12:42:57 UTC (rev 170)
@@ -738,4 +738,7 @@
 * Automatically select the default key in secret key boxes.
 * Fix the mysterious crash on startup. This was related to
   a problem with special v3 keys.
-  
\ No newline at end of file
+
+(0.11.8)
+* Improved key edit system. It now always also to edit public keys.
+* Allow to sign a single user-id (new key edit dialog).

Modified: trunk/Po/ChangeLog
===================================================================
--- trunk/Po/ChangeLog	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Po/ChangeLog	2006-01-30 12:42:57 UTC (rev 170)
@@ -1,3 +1,7 @@
+2006-01-29  Timo Schulz  <ts at g10code.de>
+
+	* de.po: Updated.
+	
 2006-01-25  Timo Schulz  <ts at g10code.com>
 
 	* de.po: Updated.

Modified: trunk/Po/de.po
===================================================================
--- trunk/Po/de.po	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Po/de.po	2006-01-30 12:42:57 UTC (rev 170)
@@ -15,7 +15,7 @@
 msgstr ""
 "Project-Id-Version: WinPT 0.11.6\n"
 "Report-Msgid-Bugs-To: winpt at freakmail.de\n"
-"POT-Creation-Date: 2006-01-27 10:02+0100\n"
+"POT-Creation-Date: 2006-01-29 18:26+0100\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"
@@ -232,7 +232,7 @@
 msgstr "Über &GPG"
 
 # c:\oss\winpt-gpgme\src\wptKeyManagerDlg.cpp:700
-#: Src/wptAboutDlgs.cpp:116 Src/wptKeyEditDlgs.cpp:1859
+#: Src/wptAboutDlgs.cpp:116 Src/wptKeyEditDlgs.cpp:1935
 #: Src/wptKeyManagerDlg.cpp:963
 msgid "&Help"
 msgstr "&Hilfe"
@@ -318,7 +318,7 @@
 "Diese Operation wird die Schlüssel auf der Karte überschreiben.\n"
 "Trotzdem fortfahren?"
 
-#: Src/wptCardDlg.cpp:600 Src/wptKeyEditDlgs.cpp:482
+#: Src/wptCardDlg.cpp:600 Src/wptKeyEditDlgs.cpp:503
 msgid "&Name"
 msgstr "&Name"
 
@@ -334,7 +334,7 @@
 msgid "Off-card passphrase"
 msgstr "\"Off-card\" Passwort"
 
-#: Src/wptCardDlg.cpp:604 Src/wptKeyEditDlgs.cpp:620 Src/wptKeygenDlg.cpp:382
+#: Src/wptCardDlg.cpp:604 Src/wptKeyEditDlgs.cpp:641 Src/wptKeygenDlg.cpp:382
 msgid "&Never"
 msgstr "&Niemals"
 
@@ -379,7 +379,7 @@
 msgid "Please use plain ASCII charset for the fields."
 msgstr "Bitte nur den 7-bit ASCII Zeichensatz verwenden."
 
-#: Src/wptCardDlg.cpp:683 Src/wptKeyEditDlgs.cpp:1336
+#: Src/wptCardDlg.cpp:683 Src/wptKeyEditDlgs.cpp:1334
 msgid "The date you have chosen lies in the past."
 msgstr "Das gewählte Datum ist in der Vergangenheit."
 
@@ -417,7 +417,7 @@
 msgid "Change Card PIN"
 msgstr "Karten PIN Ändern"
 
-#: Src/wptCardDlg.cpp:819 Src/wptPassphraseDlg.cpp:167
+#: Src/wptCardDlg.cpp:819 Src/wptPassphraseDlg.cpp:168
 msgid "Passphrases do not match. Please try again."
 msgstr "Passwörter nicht identisch. Versuchen Sie es nochmal."
 
@@ -577,7 +577,7 @@
 msgid "Add quotes"
 msgstr "'>' hinzufügen"
 
-#: Src/wptClipEditDlg.cpp:202 Src/wptKeyEditDlgs.cpp:1858
+#: Src/wptClipEditDlg.cpp:202 Src/wptKeyEditDlgs.cpp:1934
 #: Src/wptKeyserverDlg.cpp:610 Src/wptMDSumDlg.cpp:104
 #: Src/wptOwnertrustDlg.cpp:103
 msgid "&Close"
@@ -603,12 +603,12 @@
 #: Src/wptCommonDlg.cpp:68 Src/wptFileManagerDlg.cpp:84
 #: Src/wptFileManagerDlg.cpp:217 Src/wptFileManagerDlg.cpp:285
 #: Src/wptFileSaveDlg.cpp:58 Src/wptFirstRunDlg.cpp:47
-#: Src/wptKeyEditDlgs.cpp:310 Src/wptKeyEditDlgs.cpp:410
-#: Src/wptKeyEditDlgs.cpp:485 Src/wptKeyEditDlgs.cpp:621
+#: Src/wptKeyEditDlgs.cpp:331 Src/wptKeyEditDlgs.cpp:431
+#: Src/wptKeyEditDlgs.cpp:506 Src/wptKeyEditDlgs.cpp:642
 #: Src/wptKeyEditOwnertrustDlg.cpp:67 Src/wptKeygenDlg.cpp:383
 #: Src/wptKeygenDlg.cpp:546 Src/wptKeyRevokeDlg.cpp:101
 #: Src/wptKeyserverDlg.cpp:542 Src/wptKeyserverSearchDlg.cpp:68
-#: Src/wptKeysignDlg.cpp:264 Src/wptPassphraseCB.cpp:83
+#: Src/wptKeysignDlg.cpp:268 Src/wptPassphraseCB.cpp:83
 #: Src/wptPassphraseDlg.cpp:68 Src/wptPINDlg.cpp:55
 #: Src/wptPreferencesDlg.cpp:151 Src/wptTextInputDlg.cpp:84
 msgid "&Cancel"
@@ -730,29 +730,32 @@
 msgid "Please enter a valid URL."
 msgstr "Bitte eine gültige URL eingeben."
 
-#: Src/wptCommonDlg.cpp:124 Src/wptKeyEditDlgs.cpp:732
-#: Src/wptKeyEditDlgs.cpp:790 Src/wptKeyEditDlgs.cpp:828
-#: Src/wptKeyEditDlgs.cpp:840 Src/wptKeyEditDlgs.cpp:927
-#: Src/wptKeyEditDlgs.cpp:934 Src/wptKeyEditDlgs.cpp:952
-#: Src/wptKeyEditDlgs.cpp:1001 Src/wptKeyEditDlgs.cpp:1008
-#: Src/wptKeyEditDlgs.cpp:1099 Src/wptKeyEditDlgs.cpp:1105
-#: Src/wptKeyEditDlgs.cpp:1259 Src/wptKeyEditDlgs.cpp:1263
-#: Src/wptKeyEditDlgs.cpp:1267 Src/wptKeyEditDlgs.cpp:1272
-#: Src/wptKeyEditDlgs.cpp:1308 Src/wptKeyEditDlgs.cpp:1312
-#: Src/wptKeyEditDlgs.cpp:1322 Src/wptKeyEditDlgs.cpp:1337
-#: Src/wptKeyEditDlgs.cpp:1341 Src/wptKeyEditDlgs.cpp:1381
-#: Src/wptKeyEditDlgs.cpp:1386 Src/wptKeyEditDlgs.cpp:1393
-#: Src/wptKeyEditDlgs.cpp:1399 Src/wptKeyEditDlgs.cpp:1404
-#: Src/wptKeyEditDlgs.cpp:1447 Src/wptKeyEditDlgs.cpp:1452
-#: Src/wptKeyEditDlgs.cpp:1459 Src/wptKeyEditDlgs.cpp:1466
-#: Src/wptKeyEditDlgs.cpp:1469 Src/wptKeyEditDlgs.cpp:1507
-#: Src/wptKeyEditDlgs.cpp:1515 Src/wptKeyEditDlgs.cpp:1549
-#: Src/wptKeyEditDlgs.cpp:1557 Src/wptKeyEditDlgs.cpp:1656
-#: Src/wptKeyEditDlgs.cpp:1689 Src/wptKeyEditDlgs.cpp:1716
-#: Src/wptKeyEditDlgs.cpp:1720 Src/wptKeyEditDlgs.cpp:1729
-#: Src/wptKeyEditDlgs.cpp:1839 Src/wptKeyEditDlgs.cpp:1849
-#: Src/wptKeyEditDlgs.cpp:1860 Src/wptKeyEditDlgs.cpp:1889
-#: Src/wptKeyEditDlgs.cpp:1894 Src/wptKeyManagerDlg.cpp:991
+#: Src/wptCommonDlg.cpp:124 Src/wptKeyEditDlgs.cpp:753
+#: Src/wptKeyEditDlgs.cpp:811 Src/wptKeyEditDlgs.cpp:849
+#: Src/wptKeyEditDlgs.cpp:861 Src/wptKeyEditDlgs.cpp:911
+#: Src/wptKeyEditDlgs.cpp:950 Src/wptKeyEditDlgs.cpp:957
+#: Src/wptKeyEditDlgs.cpp:975 Src/wptKeyEditDlgs.cpp:1024
+#: Src/wptKeyEditDlgs.cpp:1031 Src/wptKeyEditDlgs.cpp:1122
+#: Src/wptKeyEditDlgs.cpp:1128 Src/wptKeyEditDlgs.cpp:1257
+#: Src/wptKeyEditDlgs.cpp:1261 Src/wptKeyEditDlgs.cpp:1265
+#: Src/wptKeyEditDlgs.cpp:1270 Src/wptKeyEditDlgs.cpp:1306
+#: Src/wptKeyEditDlgs.cpp:1310 Src/wptKeyEditDlgs.cpp:1320
+#: Src/wptKeyEditDlgs.cpp:1335 Src/wptKeyEditDlgs.cpp:1339
+#: Src/wptKeyEditDlgs.cpp:1379 Src/wptKeyEditDlgs.cpp:1384
+#: Src/wptKeyEditDlgs.cpp:1391 Src/wptKeyEditDlgs.cpp:1397
+#: Src/wptKeyEditDlgs.cpp:1402 Src/wptKeyEditDlgs.cpp:1445
+#: Src/wptKeyEditDlgs.cpp:1450 Src/wptKeyEditDlgs.cpp:1457
+#: Src/wptKeyEditDlgs.cpp:1464 Src/wptKeyEditDlgs.cpp:1467
+#: Src/wptKeyEditDlgs.cpp:1505 Src/wptKeyEditDlgs.cpp:1513
+#: Src/wptKeyEditDlgs.cpp:1547 Src/wptKeyEditDlgs.cpp:1555
+#: Src/wptKeyEditDlgs.cpp:1654 Src/wptKeyEditDlgs.cpp:1687
+#: Src/wptKeyEditDlgs.cpp:1714 Src/wptKeyEditDlgs.cpp:1718
+#: Src/wptKeyEditDlgs.cpp:1727 Src/wptKeyEditDlgs.cpp:1835
+#: Src/wptKeyEditDlgs.cpp:1840 Src/wptKeyEditDlgs.cpp:1849
+#: Src/wptKeyEditDlgs.cpp:1860 Src/wptKeyEditDlgs.cpp:1864
+#: Src/wptKeyEditDlgs.cpp:1915 Src/wptKeyEditDlgs.cpp:1925
+#: Src/wptKeyEditDlgs.cpp:1936 Src/wptKeyEditDlgs.cpp:1965
+#: Src/wptKeyEditDlgs.cpp:1970 Src/wptKeyManagerDlg.cpp:991
 #: Src/wptKeyManagerDlg.cpp:1786
 msgid "Key Edit"
 msgstr "Schlüssel bearbeiten"
@@ -770,8 +773,8 @@
 msgid "No"
 msgstr "&Nein"
 
-#: Src/wptCommonDlg.cpp:215 Src/wptKeyEditDlgs.cpp:210
-#: Src/wptKeyEditDlgs.cpp:1065
+#: Src/wptCommonDlg.cpp:215 Src/wptKeyEditDlgs.cpp:231
+#: Src/wptKeyEditDlgs.cpp:1088
 msgid "OK"
 msgstr "OK"
 
@@ -1088,12 +1091,12 @@
 "\n"
 "Möchten Sie die Kompression ausschalten?"
 
-#: Src/wptFileManager.cpp:383 Src/wptKeyEditDlgs.cpp:988
+#: Src/wptFileManager.cpp:383 Src/wptKeyEditDlgs.cpp:1011
 #: Src/wptVerifyList.cpp:98 Src/wptVerifyList.cpp:106
 msgid "Status"
 msgstr "Status"
 
-#: Src/wptFileManager.cpp:384 Src/wptKeyEditDlgs.cpp:1091
+#: Src/wptFileManager.cpp:384 Src/wptKeyEditDlgs.cpp:1114
 #: Src/wptKeyRevokersDlg.cpp:57 Src/wptMDSumDlg.cpp:73
 #: Src/wptVerifyList.cpp:97
 msgid "Name"
@@ -1257,8 +1260,8 @@
 msgid "Choose Name for Key File"
 msgstr "Den Namen der Schlüsseldatei wählen"
 
-#: Src/wptFileManager.cpp:1715 Src/wptKeyEditDlgs.cpp:967
-#: Src/wptKeyEditDlgs.cpp:1289 Src/wptKeyEditDlgs.cpp:1360
+#: Src/wptFileManager.cpp:1715 Src/wptKeyEditDlgs.cpp:990
+#: Src/wptKeyEditDlgs.cpp:1287 Src/wptKeyEditDlgs.cpp:1358
 #: Src/wptKeyserverDlg.cpp:106
 msgid "GnuPG status"
 msgstr "GnuPG Status"
@@ -1377,8 +1380,8 @@
 msgid "Options"
 msgstr "Optionen"
 
-#: Src/wptFileManagerDlg.cpp:330 Src/wptKeyEditDlgs.cpp:1263
-#: Src/wptKeyEditDlgs.cpp:1312 Src/wptKeyEditDlgs.cpp:1386
+#: Src/wptFileManagerDlg.cpp:330 Src/wptKeyEditDlgs.cpp:1261
+#: Src/wptKeyEditDlgs.cpp:1310 Src/wptKeyEditDlgs.cpp:1384
 #: Src/wptKeyManager.cpp:716 Src/wptKeyManager.cpp:817
 #: Src/wptKeyManager.cpp:854 Src/wptKeyManagerDlg.cpp:1490
 #: Src/wptKeyManagerDlg.cpp:1510 Src/wptKeyManagerDlg.cpp:1544
@@ -1630,7 +1633,7 @@
 #: Src/wptGPGPrefsDlg.cpp:222 Src/wptGPGPrefsDlg.cpp:228
 #: Src/wptGPGPrefsDlg.cpp:233 Src/wptGPGPrefsDlg.cpp:238
 #: Src/wptGPGPrefsDlg.cpp:244 Src/wptGPGPrefsDlg.cpp:258
-#: Src/wptKeyEditDlgs.cpp:1663 Src/wptKeyManagerDlg.cpp:956
+#: Src/wptKeyEditDlgs.cpp:1661 Src/wptKeyManagerDlg.cpp:956
 #: Src/wptMainProc.cpp:430 Src/wptPreferencesDlg.cpp:209
 #: Src/wptPreferencesDlg.cpp:252 Src/wptPreferencesDlg.cpp:263
 #: Src/wptPreferencesDlg.cpp:275 Src/wptPreferencesDlg.cpp:308
@@ -1929,17 +1932,17 @@
 msgid "Key Manager"
 msgstr "Schlüsselverwaltung"
 
-#: Src/wptImportList.cpp:264 Src/wptKeyEditDlgs.cpp:206
-#: Src/wptKeyEditDlgs.cpp:1063 Src/wptKeyEditDlgs.cpp:1124
-#: Src/wptKeyEditDlgs.cpp:1398 Src/wptKeyEditDlgs.cpp:1418
-#: Src/wptKeyEditDlgs.cpp:1457 Src/wptKeyEditDlgs.cpp:1488
+#: Src/wptImportList.cpp:264 Src/wptKeyEditDlgs.cpp:227
+#: Src/wptKeyEditDlgs.cpp:1086 Src/wptKeyEditDlgs.cpp:1147
+#: Src/wptKeyEditDlgs.cpp:1396 Src/wptKeyEditDlgs.cpp:1416
+#: Src/wptKeyEditDlgs.cpp:1455 Src/wptKeyEditDlgs.cpp:1486
 #: Src/wptKeylist.cpp:392 Src/wptKeylist.cpp:426 Src/wptKeyPropsDlg.cpp:161
 #: Src/wptKeysigDlg.cpp:143 Src/wptKeysigDlg.cpp:208
 msgid "Revoked"
 msgstr "Widerrufen"
 
-#: Src/wptImportList.cpp:266 Src/wptKeyEditDlgs.cpp:208
-#: Src/wptKeyEditDlgs.cpp:1061 Src/wptKeyEditDlgs.cpp:1319
+#: Src/wptImportList.cpp:266 Src/wptKeyEditDlgs.cpp:229
+#: Src/wptKeyEditDlgs.cpp:1084 Src/wptKeyEditDlgs.cpp:1317
 #: Src/wptKeylist.cpp:394 Src/wptKeylist.cpp:424 Src/wptKeyPropsDlg.cpp:158
 #: Src/wptKeysigDlg.cpp:142 Src/wptKeysigDlg.cpp:209
 msgid "Expired"
@@ -1953,7 +1956,7 @@
 msgid "public key"
 msgstr "öffentlicher Schlüssel"
 
-#: Src/wptImportList.cpp:303 Src/wptKeyEditDlgs.cpp:1141
+#: Src/wptImportList.cpp:303 Src/wptKeyEditDlgs.cpp:1164
 msgid "Invalid user ID"
 msgstr "Ungültige Benutzerkennung"
 
@@ -1969,16 +1972,16 @@
 msgid "Size"
 msgstr "Größe"
 
-#: Src/wptImportList.cpp:354 Src/wptKeyEditDlgs.cpp:985 Src/wptKeylist.cpp:545
-#: Src/wptKeylist.cpp:553 Src/wptKeyManagerDlg.cpp:874
+#: Src/wptImportList.cpp:354 Src/wptKeyEditDlgs.cpp:1008
+#: Src/wptKeylist.cpp:545 Src/wptKeylist.cpp:553 Src/wptKeyManagerDlg.cpp:874
 #: Src/wptKeyManagerDlg.cpp:965 Src/wptKeyRevokersDlg.cpp:58
 #: Src/wptKeyserverSearchDlg.cpp:52 Src/wptSigList.cpp:55
 #: Src/wptVerifyList.cpp:109
 msgid "Key ID"
 msgstr "Schlüssel-ID"
 
-#: Src/wptImportList.cpp:355 Src/wptKeyEditDlgs.cpp:986
-#: Src/wptKeyEditDlgs.cpp:1093 Src/wptKeylist.cpp:559
+#: Src/wptImportList.cpp:355 Src/wptKeyEditDlgs.cpp:1009
+#: Src/wptKeyEditDlgs.cpp:1116 Src/wptKeylist.cpp:559
 #: Src/wptKeyManagerDlg.cpp:880 Src/wptKeyManagerDlg.cpp:968
 #: Src/wptKeyserverSearchDlg.cpp:53 Src/wptSigList.cpp:54
 msgid "Creation"
@@ -2015,20 +2018,20 @@
 msgid "Key Cache"
 msgstr "Schlüssel Cache"
 
-#: Src/wptKeyEditDlgs.cpp:179
+#: Src/wptKeyEditDlgs.cpp:200
 msgid "Ultimate"
 msgstr "Absolut"
 
-#: Src/wptKeyEditDlgs.cpp:194 Src/wptKeyEditDlgs.cpp:1058
+#: Src/wptKeyEditDlgs.cpp:215 Src/wptKeyEditDlgs.cpp:1081
 #: Src/wptKeylist.cpp:235 Src/wptKeylist.cpp:354
 msgid "Never"
 msgstr "Niemals"
 
-#: Src/wptKeyEditDlgs.cpp:234
+#: Src/wptKeyEditDlgs.cpp:255
 msgid "user ID"
 msgstr "Benutzerkennung"
 
-#: Src/wptKeyEditDlgs.cpp:235
+#: Src/wptKeyEditDlgs.cpp:256
 #, c-format
 msgid ""
 "Could not get key information for: \"%s\":\n"
@@ -2038,7 +2041,7 @@
 "%s"
 
 # c:\oss\winpt-gpgme\src\wptKeyEditDlgs.cpp:258
-#: Src/wptKeyEditDlgs.cpp:307
+#: Src/wptKeyEditDlgs.cpp:328
 msgid ""
 "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 "
@@ -2049,7 +2052,7 @@
 "240x288 grosses Bild ist eine gute Größe."
 
 # c:\oss\winpt-gpgme\src\wptKeyEditDlgs.cpp:259
-#: Src/wptKeyEditDlgs.cpp:308
+#: Src/wptKeyEditDlgs.cpp:329
 msgid ""
 "Pick an image to use for your photo ID.\n"
 "The image must be a JPEG file."
@@ -2057,35 +2060,39 @@
 "Bitte ein Bild auswaehlen fuer die photo ID.\n"
 "Das Bild muss eine JPEG Datei sein."
 
-#: Src/wptKeyEditDlgs.cpp:309 Src/wptKeyEditDlgs.cpp:409
-#: Src/wptKeysignDlg.cpp:263
+#: Src/wptKeyEditDlgs.cpp:330 Src/wptKeyEditDlgs.cpp:430
+#: Src/wptKeysignDlg.cpp:267
 msgid "Passphrase"
 msgstr "Passwort"
 
-#: Src/wptKeyEditDlgs.cpp:311
+#: Src/wptKeyEditDlgs.cpp:332
 msgid "Add Photo ID"
 msgstr "Photo ID hinzufügen"
 
-#: Src/wptKeyEditDlgs.cpp:327
+#: Src/wptKeyEditDlgs.cpp:348
 msgid "Select Image File"
 msgstr "Bilddatei auswählen"
 
-#: Src/wptKeyEditDlgs.cpp:331 Src/wptKeyEditDlgs.cpp:341
-#: Src/wptKeyEditDlgs.cpp:347 Src/wptKeyEditDlgs.cpp:353
-#: Src/wptKeyEditDlgs.cpp:365 Src/wptKeyEditDlgs.cpp:855
+#: Src/wptKeyEditDlgs.cpp:349
+msgid "JPEG Files (*.jpg, *.jpeg)"
+msgstr ""
+
+#: Src/wptKeyEditDlgs.cpp:352 Src/wptKeyEditDlgs.cpp:362
+#: Src/wptKeyEditDlgs.cpp:368 Src/wptKeyEditDlgs.cpp:374
+#: Src/wptKeyEditDlgs.cpp:386 Src/wptKeyEditDlgs.cpp:876
 msgid "Add Photo"
 msgstr "Foto hinzufügen"
 
-#: Src/wptKeyEditDlgs.cpp:332
+#: Src/wptKeyEditDlgs.cpp:353
 #, c-format
 msgid "'%s' is not a valid JPEG file."
 msgstr "'%s' is keine gültige JPEG Datei."
 
-#: Src/wptKeyEditDlgs.cpp:341 Src/wptKeyRevokeDlg.cpp:142
+#: Src/wptKeyEditDlgs.cpp:362 Src/wptKeyRevokeDlg.cpp:142
 msgid "Please enter a file name."
 msgstr "Bitte Dateinamen eingeben."
 
-#: Src/wptKeyEditDlgs.cpp:345
+#: Src/wptKeyEditDlgs.cpp:366
 msgid ""
 "The JPEG is really large.\n"
 "Are you sure you want to use it?"
@@ -2093,151 +2100,156 @@
 "Das JPEG ist sehr groß.\n"
 "Sind Sie sicher, dass Sie es benutzen wollen?"
 
-#: Src/wptKeyEditDlgs.cpp:353
+#: Src/wptKeyEditDlgs.cpp:374
 msgid "Please enter a passphrase."
 msgstr "Bitte ein Passwort eingeben."
 
-#: Src/wptKeyEditDlgs.cpp:370
+#: Src/wptKeyEditDlgs.cpp:391
 msgid "Photo successfully added."
 msgstr "Foto erfolgreich hinzugefügt."
 
-#: Src/wptKeyEditDlgs.cpp:371 Src/wptKeyEditDlgs.cpp:450
-#: Src/wptKeyEditDlgs.cpp:532 Src/wptKeyEditDlgs.cpp:699
-#: Src/wptKeyEditDlgs.cpp:1420 Src/wptKeyEditDlgs.cpp:1490
-#: Src/wptKeyEditDlgs.cpp:1570 Src/wptKeyEditDlgs.cpp:1748
+#: Src/wptKeyEditDlgs.cpp:392 Src/wptKeyEditDlgs.cpp:471
+#: Src/wptKeyEditDlgs.cpp:553 Src/wptKeyEditDlgs.cpp:720
+#: Src/wptKeyEditDlgs.cpp:1418 Src/wptKeyEditDlgs.cpp:1488
+#: Src/wptKeyEditDlgs.cpp:1568 Src/wptKeyEditDlgs.cpp:1746
 #: Src/wptKeygenDlg.cpp:496 Src/wptKeygenDlg.cpp:612
-#: Src/wptKeyPropsDlg.cpp:355 Src/wptOwnertrustDlg.cpp:124
+#: Src/wptKeyPropsDlg.cpp:359 Src/wptOwnertrustDlg.cpp:124
 #: Src/wptOwnertrustDlg.cpp:136
 msgid "GnuPG Status"
 msgstr "GnuPG-Status"
 
 # c:\oss\winpt-gpgme\src\wptKeyEditDlgs.cpp:350
-#: Src/wptKeyEditDlgs.cpp:407
+#: Src/wptKeyEditDlgs.cpp:428
 msgid "Appointing a key as designated revoker cannot be undone."
 msgstr ""
 "Hinzufügen eines \"Revokers\" kann nicht mehr\n"
 "rückgängig gemacht werden."
 
-#: Src/wptKeyEditDlgs.cpp:408
+#: Src/wptKeyEditDlgs.cpp:429
 msgid "Public key"
 msgstr "öff. Schlüssel"
 
-#: Src/wptKeyEditDlgs.cpp:411 Src/wptKeyEditDlgs.cpp:427
-#: Src/wptKeyEditDlgs.cpp:433 Src/wptKeyEditDlgs.cpp:444
-#: Src/wptKeyEditDlgs.cpp:868
+#: Src/wptKeyEditDlgs.cpp:432 Src/wptKeyEditDlgs.cpp:448
+#: Src/wptKeyEditDlgs.cpp:454 Src/wptKeyEditDlgs.cpp:465
+#: Src/wptKeyEditDlgs.cpp:889
 msgid "Add Revoker"
 msgstr "\"Revoker\" hinzufügen"
 
-#: Src/wptKeyEditDlgs.cpp:427 Src/wptKeyEditDlgs.cpp:1452
-#: Src/wptKeyEditDlgs.cpp:1507 Src/wptKeyEditDlgs.cpp:1549
-#: Src/wptKeyEditDlgs.cpp:1689 Src/wptKeyEditDlgs.cpp:1720
+#: Src/wptKeyEditDlgs.cpp:448 Src/wptKeyEditDlgs.cpp:1450
+#: Src/wptKeyEditDlgs.cpp:1505 Src/wptKeyEditDlgs.cpp:1547
+#: Src/wptKeyEditDlgs.cpp:1687 Src/wptKeyEditDlgs.cpp:1718
+#: Src/wptKeyEditDlgs.cpp:1835
 msgid "Please select a user ID."
 msgstr "Bitte eine Benutzerkennung wählen."
 
-#: Src/wptKeyEditDlgs.cpp:433 Src/wptKeygenDlg.cpp:457
+#: Src/wptKeyEditDlgs.cpp:454 Src/wptKeygenDlg.cpp:457
 #: Src/wptKeyRevokeDlg.cpp:150
 msgid "Please enter the passphrase."
 msgstr "Bitte das Passwort eingeben."
 
-#: Src/wptKeyEditDlgs.cpp:449
+#: Src/wptKeyEditDlgs.cpp:470
 msgid "Revoker successfully addded."
 msgstr "Widerrufer erfolgreich hinzugefügt."
 
-#: Src/wptKeyEditDlgs.cpp:481
+#: Src/wptKeyEditDlgs.cpp:502
 msgid "Add new User ID"
 msgstr "Neue Benutzerkennung hinzufügen"
 
-#: Src/wptKeyEditDlgs.cpp:483
+#: Src/wptKeyEditDlgs.cpp:504
 msgid "&Email"
 msgstr "&E-Mail"
 
-#: Src/wptKeyEditDlgs.cpp:484
+#: Src/wptKeyEditDlgs.cpp:505
 msgid "&Comment"
 msgstr "&Kommentar"
 
-#: Src/wptKeyEditDlgs.cpp:500
+#: Src/wptKeyEditDlgs.cpp:521
 msgid "Please enter a name (min. 5 chars.)"
 msgstr "Bitte Namen eingeben (mindestens 5 Zeichen)"
 
-#: Src/wptKeyEditDlgs.cpp:500 Src/wptKeyEditDlgs.cpp:504
-#: Src/wptKeyEditDlgs.cpp:509 Src/wptKeyEditDlgs.cpp:513
-#: Src/wptKeyEditDlgs.cpp:530
+#: Src/wptKeyEditDlgs.cpp:521 Src/wptKeyEditDlgs.cpp:525
+#: Src/wptKeyEditDlgs.cpp:530 Src/wptKeyEditDlgs.cpp:534
+#: Src/wptKeyEditDlgs.cpp:551
 msgid "UserID"
 msgstr "Benutzerkennung"
 
-#: Src/wptKeyEditDlgs.cpp:504
+#: Src/wptKeyEditDlgs.cpp:525
 msgid ""
 "Please enter the email address in the email field and not in the name field"
 msgstr ""
 "Bitte E-Mail-Adresse in das E-Mail-Feld und nicht in das Namensfeld eingeben"
 
-#: Src/wptKeyEditDlgs.cpp:509
+#: Src/wptKeyEditDlgs.cpp:530
 msgid "Please enter an email address."
 msgstr "Bitte eine E-Mail-Adresse eingeben."
 
-#: Src/wptKeyEditDlgs.cpp:513
+#: Src/wptKeyEditDlgs.cpp:534
 msgid "Invalid email address."
 msgstr "Ungültige E-Mail-Adresse"
 
-#: Src/wptKeyEditDlgs.cpp:532
+#: Src/wptKeyEditDlgs.cpp:553
 msgid "user ID successfully added."
 msgstr "Benutzerkennung erfolgreich hinzugefügt"
 
-#: Src/wptKeyEditDlgs.cpp:616 Src/wptKeyEditDlgs.cpp:803
+#: Src/wptKeyEditDlgs.cpp:637 Src/wptKeyEditDlgs.cpp:824
 msgid "Add new Subkey"
 msgstr "Neuen Unterschlüssel hinzufügen"
 
-#: Src/wptKeyEditDlgs.cpp:617
+#: Src/wptKeyEditDlgs.cpp:638
 msgid "Key type"
 msgstr "Schlüssel Typ"
 
-#: Src/wptKeyEditDlgs.cpp:618
+#: Src/wptKeyEditDlgs.cpp:639
 msgid "Size in bits"
 msgstr "Größe in Bits"
 
-#: Src/wptKeyEditDlgs.cpp:619
+#: Src/wptKeyEditDlgs.cpp:640
 msgid "Key expiration"
 msgstr "Key Ablaufdatum"
 
-#: Src/wptKeyEditDlgs.cpp:664
+#: Src/wptKeyEditDlgs.cpp:685
 msgid "Please select one entry."
 msgstr "Bitte einen Eintrag wählen."
 
-#: Src/wptKeyEditDlgs.cpp:664 Src/wptKeyEditDlgs.cpp:670
-#: Src/wptKeyEditDlgs.cpp:697 Src/wptKeyEditDlgs.cpp:786
+#: Src/wptKeyEditDlgs.cpp:685 Src/wptKeyEditDlgs.cpp:691
+#: Src/wptKeyEditDlgs.cpp:718 Src/wptKeyEditDlgs.cpp:807
 msgid "Add Subkey"
 msgstr "Unterschlüssel hinzufügen"
 
-#: Src/wptKeyEditDlgs.cpp:669
+#: Src/wptKeyEditDlgs.cpp:690
 msgid "DSS uses a fixed keysize of 1024. Size changed."
 msgstr "DSS benötigt feste Schlüssellänge von 1024. Größe geändert."
 
-#: Src/wptKeyEditDlgs.cpp:699
+#: Src/wptKeyEditDlgs.cpp:720
 msgid "Subkey successfully added."
 msgstr "Unterschlüssel erfolgreich hinzugefügt."
 
-#: Src/wptKeyEditDlgs.cpp:727 Src/wptKeyEditDlgs.cpp:786
-#: Src/wptKeyEditDlgs.cpp:855 Src/wptKeyEditDlgs.cpp:868
-#: Src/wptKeyEditDlgs.cpp:927 Src/wptKeyEditDlgs.cpp:1308
-#: Src/wptKeyEditDlgs.cpp:1381 Src/wptKeyEditDlgs.cpp:1441
+#: Src/wptKeyEditDlgs.cpp:748 Src/wptKeyEditDlgs.cpp:807
+#: Src/wptKeyEditDlgs.cpp:876 Src/wptKeyEditDlgs.cpp:889
+#: Src/wptKeyEditDlgs.cpp:950 Src/wptKeyEditDlgs.cpp:1306
+#: Src/wptKeyEditDlgs.cpp:1379 Src/wptKeyEditDlgs.cpp:1439
 #: Src/wptKeyManagerDlg.cpp:1517
 msgid "There is no secret key available!"
 msgstr "Kein geheimer Schlüssel vorhanden!"
 
-#: Src/wptKeyEditDlgs.cpp:727 Src/wptKeyEditDlgs.cpp:743
+#: Src/wptKeyEditDlgs.cpp:748 Src/wptKeyEditDlgs.cpp:764
 msgid "Add user ID"
 msgstr "Benutzerkennung hinzufügen"
 
-#: Src/wptKeyEditDlgs.cpp:840
+#: Src/wptKeyEditDlgs.cpp:861
 msgid "Preferred keyserver successfully set."
 msgstr "Bevorzugter Keyserver wurde erfolgreich gesetzt."
 
-#: Src/wptKeyEditDlgs.cpp:887 Src/wptKeyEditOwnertrustDlg.cpp:55
-#: Src/wptKeyPropsDlg.cpp:347
+#: Src/wptKeyEditDlgs.cpp:908 Src/wptKeyEditOwnertrustDlg.cpp:55
+#: Src/wptKeyPropsDlg.cpp:351
 msgid "Change Ownertrust"
 msgstr "Besitzervertrauen ändern"
 
-#: Src/wptKeyEditDlgs.cpp:932
+#: Src/wptKeyEditDlgs.cpp:911 Src/wptKeyManager.cpp:232
+msgid "Key status changed."
+msgstr "Schlüsselstatus geändert"
+
+#: Src/wptKeyEditDlgs.cpp:955
 msgid ""
 "Cannot change passphrase because the key\n"
 "is protected with the IDEA encryption algorithm."
@@ -2245,15 +2257,15 @@
 "Kann das Passwort das Schlüssels nicht ändern, da der \n"
 "Schlüssel mit dem IDEA Verschlüsselungs-Algorithmus gesichert ist."
 
-#: Src/wptKeyEditDlgs.cpp:939
+#: Src/wptKeyEditDlgs.cpp:962
 msgid "Current (old) Passphrase"
 msgstr "Aktuelles (altes) Passwort"
 
-#: Src/wptKeyEditDlgs.cpp:943
+#: Src/wptKeyEditDlgs.cpp:966
 msgid "New Passphrase"
 msgstr "Neues Passwort"
 
-#: Src/wptKeyEditDlgs.cpp:950 Src/wptPassphraseDlg.cpp:174
+#: Src/wptKeyEditDlgs.cpp:973 Src/wptPassphraseDlg.cpp:175
 msgid ""
 "The passphrase contains 8-bit characters.\n"
 "It is not suggested to use charset specific characters."
@@ -2261,40 +2273,40 @@
 "Das Passwort enthält 8-bit Zeichen.\n"
 "Es ist nicht zu empfehlen zeichensatzspezifische Zeichen zu benutzen."
 
-#: Src/wptKeyEditDlgs.cpp:965
+#: Src/wptKeyEditDlgs.cpp:988
 msgid "Change Passwd"
 msgstr "Passwort ändern"
 
-#: Src/wptKeyEditDlgs.cpp:967
+#: Src/wptKeyEditDlgs.cpp:990
 msgid "Passphrase successfully changed."
 msgstr "Passwort erfolgreich geändert."
 
-#: Src/wptKeyEditDlgs.cpp:984 Src/wptKeyManagerDlg.cpp:881
+#: Src/wptKeyEditDlgs.cpp:1007 Src/wptKeyManagerDlg.cpp:881
 msgid "Description"
 msgstr "Beschreibung"
 
-#: Src/wptKeyEditDlgs.cpp:987
+#: Src/wptKeyEditDlgs.cpp:1010
 msgid "Expires"
 msgstr "Verfällt"
 
-#: Src/wptKeyEditDlgs.cpp:1001 Src/wptKeyEditDlgs.cpp:1099
+#: Src/wptKeyEditDlgs.cpp:1024 Src/wptKeyEditDlgs.cpp:1122
 msgid "Could not find key."
 msgstr "Konnte Schlüssel nicht finden"
 
-#: Src/wptKeyEditDlgs.cpp:1008
+#: Src/wptKeyEditDlgs.cpp:1031
 msgid "No subkey(s) found."
 msgstr "Kein(e) Unterschlüssel gefunden."
 
-#: Src/wptKeyEditDlgs.cpp:1090 Src/wptKeylist.cpp:548 Src/wptKeylist.cpp:557
+#: Src/wptKeyEditDlgs.cpp:1113 Src/wptKeylist.cpp:548 Src/wptKeylist.cpp:557
 #: Src/wptKeyManagerDlg.cpp:878
 msgid "Validity"
 msgstr "Gültigkeit"
 
-#: Src/wptKeyEditDlgs.cpp:1092
+#: Src/wptKeyEditDlgs.cpp:1115
 msgid "Email"
 msgstr "Email"
 
-#: Src/wptKeyEditDlgs.cpp:1105
+#: Src/wptKeyEditDlgs.cpp:1128
 msgid "No user ID(s) found."
 msgstr "Keine Benutzerkennung(en) gefunden."
 
@@ -2307,6 +2319,8 @@
 "DELKEY    \t\tdelete a secondary key\r\n"
 "ADDREVOKER\t\tadd a revocation key\r\n"
 "EXPIRE    \t\tchange the expire date\r\n"
+"SHOWPREF  \t\tlist preferences (verbose)\r\n"
+"SETPREF   \t\tset preference list\r\n"
 "UPDPREF   \t\tupdated preferences\r\n"
 "PASSWD    \t\tchange the passphrase\r\n"
 "PRIMARY   \t\tflag user ID as primary\r\n"
@@ -2315,6 +2329,8 @@
 "REVKEY    \t\trevoke a secondary key\r\n"
 "DISABLE   \t\tdisable a key\r\n"
 "ENABLE    \t\tenable a key\r\n"
+"SIGN\t    \t\tsign a user-id (exportable)\r\n"
+"LSIGN\t    \t\tsign a user-id (non-exportable)\r\n"
 msgstr ""
 "ADDUID\t\t\tBenutzerkennung hinzufügen\r\n"
 "ADDPHOTO  \t\tFoto ID hinzufügen\r\n"
@@ -2331,21 +2347,23 @@
 "REVKEY    \t\tSekundären Schlüsssel widerrufen\r\n"
 "DISABLE   \t\tSchlüssel deaktivieren\r\n"
 "ENABLE    \t\tSchlüssel aktivieren\r\n"
-"SHOWPHOTO \t\tFoto ID anzeigen\r\n"
+"SIGN\t    \t\tBenutzerkennung signieren (exportierbar)\r\n"
+"LSIGN\t    \t\tBenutzerkennung signieren (nicht-exportierbar)\r\n"
 
-#: Src/wptKeyEditDlgs.cpp:1243
+
+#: Src/wptKeyEditDlgs.cpp:1241
 msgid "Key Edit Help"
 msgstr "Hilfe zum Schlüssel bearbeiten"
 
-#: Src/wptKeyEditDlgs.cpp:1259
+#: Src/wptKeyEditDlgs.cpp:1257
 msgid "Primary key can not be deleted!"
 msgstr "Primärer Schlüssel kann nicht gelöscht werden!"
 
-#: Src/wptKeyEditDlgs.cpp:1267
+#: Src/wptKeyEditDlgs.cpp:1265
 msgid "Primary subkey can not be deleted!"
 msgstr "Primärer Unterschlüssel kann nicht gelöscht werden!"
 
-#: Src/wptKeyEditDlgs.cpp:1273
+#: Src/wptKeyEditDlgs.cpp:1271
 #, c-format
 msgid ""
 "\"Subkey %s.\"\n"
@@ -2362,15 +2380,15 @@
 "\n"
 "Möchten Sie diesen Unterschlüssel wirklich löschen?"
 
-#: Src/wptKeyEditDlgs.cpp:1285
+#: Src/wptKeyEditDlgs.cpp:1283
 msgid "Delete Subkey"
 msgstr "Unterschlüssel löschen"
 
-#: Src/wptKeyEditDlgs.cpp:1289
+#: Src/wptKeyEditDlgs.cpp:1287
 msgid "Subkey successfully deleted."
 msgstr "Unterschlüssel erfolgreich gelöscht."
 
-#: Src/wptKeyEditDlgs.cpp:1320
+#: Src/wptKeyEditDlgs.cpp:1318
 msgid ""
 "Key already expired.\n"
 "\n"
@@ -2380,19 +2398,19 @@
 "\n"
 "Wollen Sie das Ablaufdatum ändern?"
 
-#: Src/wptKeyEditDlgs.cpp:1329 Src/wptKeyEditDlgs.cpp:1332
+#: Src/wptKeyEditDlgs.cpp:1327 Src/wptKeyEditDlgs.cpp:1330
 msgid "Key Expiration Date"
 msgstr "Ablaufdatum"
 
-#: Src/wptKeyEditDlgs.cpp:1353
+#: Src/wptKeyEditDlgs.cpp:1351
 msgid "Expire Subkey"
 msgstr "Untschlüssel Ablauf"
 
-#: Src/wptKeyEditDlgs.cpp:1359
+#: Src/wptKeyEditDlgs.cpp:1357
 msgid "Subkey expire date successfully set."
 msgstr "Unterschlüsselablaufdatum erfolgreich hinzugefügt."
 
-#: Src/wptKeyEditDlgs.cpp:1390
+#: Src/wptKeyEditDlgs.cpp:1388
 msgid ""
 "No subkeys were found, if you want to revoke the\n"
 "whole key, please use the Key Manager command directly.\n"
@@ -2404,31 +2422,31 @@
 "\n"
 "Diese Funktion ist nur für das Widerrufen einzelner Unterschlüssel gedacht."
 
-#: Src/wptKeyEditDlgs.cpp:1399
+#: Src/wptKeyEditDlgs.cpp:1397
 msgid "Key already revoked."
 msgstr "Der Schlüssel ist bereits widerrufen."
 
-#: Src/wptKeyEditDlgs.cpp:1416
+#: Src/wptKeyEditDlgs.cpp:1414
 msgid "Revoke Subkey"
 msgstr "Unterschlüssel widerrufen"
 
-#: Src/wptKeyEditDlgs.cpp:1420
+#: Src/wptKeyEditDlgs.cpp:1418
 msgid "Subkey successfully revoked."
 msgstr "Unterschlüssel erfolgreich widerrufen."
 
-#: Src/wptKeyEditDlgs.cpp:1442
+#: Src/wptKeyEditDlgs.cpp:1440
 msgid "Revoke user ID"
 msgstr "Benutzerkennung widerrufen"
 
-#: Src/wptKeyEditDlgs.cpp:1447
+#: Src/wptKeyEditDlgs.cpp:1445
 msgid "Key has only one user ID."
 msgstr "Schlüssel hat nur eine Benutzerkennung."
 
-#: Src/wptKeyEditDlgs.cpp:1458
+#: Src/wptKeyEditDlgs.cpp:1456
 msgid "This user ID has been already revoked."
 msgstr "Diese Benutzerkennung wurde bereits widerrufen."
 
-#: Src/wptKeyEditDlgs.cpp:1464
+#: Src/wptKeyEditDlgs.cpp:1462
 #, c-format
 msgid ""
 "user ID \"%s\".\n"
@@ -2438,39 +2456,39 @@
 "Benutzerkennung %s.\r\n"
 "Diese Benutzerkennung wirklich widerrufen?"
 
-#: Src/wptKeyEditDlgs.cpp:1486
+#: Src/wptKeyEditDlgs.cpp:1484
 msgid "Revoke User ID"
 msgstr "Benutzerkennung widerrufen"
 
-#: Src/wptKeyEditDlgs.cpp:1490
+#: Src/wptKeyEditDlgs.cpp:1488
 msgid "User ID successfully revoked"
 msgstr "Benutzerkennung erfolgreich widerrufen"
 
-#: Src/wptKeyEditDlgs.cpp:1567
+#: Src/wptKeyEditDlgs.cpp:1565
 msgid "Primary"
 msgstr "Primär"
 
-#: Src/wptKeyEditDlgs.cpp:1570
+#: Src/wptKeyEditDlgs.cpp:1568
 msgid "User ID successfully flagged"
 msgstr "Benutzerkennung erfolgreich gekennzeichnet"
 
-#: Src/wptKeyEditDlgs.cpp:1656
+#: Src/wptKeyEditDlgs.cpp:1654
 msgid "No preferences available."
 msgstr "Keine Präferenzen verfübar."
 
-#: Src/wptKeyEditDlgs.cpp:1662
+#: Src/wptKeyEditDlgs.cpp:1660
 msgid "MDC feature"
 msgstr "Unterstützt MDC"
 
-#: Src/wptKeyEditDlgs.cpp:1664 Src/wptKeyeditSetPrefDlg.cpp:116
+#: Src/wptKeyEditDlgs.cpp:1662 Src/wptKeyeditSetPrefDlg.cpp:116
 msgid "Key Preferences"
 msgstr "Schlüsseleinstellungen"
 
-#: Src/wptKeyEditDlgs.cpp:1715
+#: Src/wptKeyEditDlgs.cpp:1713
 msgid "Primary user ID can not be deleted!"
 msgstr "Primäre Benutzerkennung kann nicht gelöscht werden!"
 
-#: Src/wptKeyEditDlgs.cpp:1726
+#: Src/wptKeyEditDlgs.cpp:1724
 #, c-format
 msgid ""
 "user ID \"%s\".\n"
@@ -2480,32 +2498,40 @@
 "Benutzerkennung %s.\r\n"
 "Diese Benutzerkennung wirklich löschen?"
 
-#: Src/wptKeyEditDlgs.cpp:1744
+#: Src/wptKeyEditDlgs.cpp:1742
 msgid "Delete user ID"
 msgstr "Benutzerkennung löschen"
 
-#: Src/wptKeyEditDlgs.cpp:1748
+#: Src/wptKeyEditDlgs.cpp:1746
 msgid "User ID successfully deleted"
 msgstr "Benutzerkennung erfolgreich gelöscht"
 
 #: Src/wptKeyEditDlgs.cpp:1839
+msgid "Do you really want to make this sig exportable?"
+msgstr "Wollen Sie diese Signatur wirklich exportierbar machen?"
+
+#: Src/wptKeyEditDlgs.cpp:1860 Src/wptKeysignDlg.cpp:358
+msgid "Key successfully signed."
+msgstr "Schlüssel erfolgreich signiert."
+
+#: Src/wptKeyEditDlgs.cpp:1915
 msgid "Could not set subkey window procedure."
 msgstr "Konnte \"subkey window procedure\" nicht setzen."
 
-#: Src/wptKeyEditDlgs.cpp:1849
+#: Src/wptKeyEditDlgs.cpp:1925
 msgid "Could not set user ID window procedure."
 msgstr "Konnte \"userID window procedure\" nicht setzen."
 
 # c:\oss\winpt-gpgme\src\wptKeyEditDlgs.cpp:1739
-#: Src/wptKeyEditDlgs.cpp:1857
+#: Src/wptKeyEditDlgs.cpp:1933
 msgid "Command>"
 msgstr "Kommando>"
 
-#: Src/wptKeyEditDlgs.cpp:1889
+#: Src/wptKeyEditDlgs.cpp:1965
 msgid "Please select a command."
 msgstr "Bitte einen Befehl auswählen."
 
-#: Src/wptKeyEditDlgs.cpp:1893
+#: Src/wptKeyEditDlgs.cpp:1969
 msgid "This command cannot be used with PGP 2 (v3) keys.\n"
 msgstr "Dieser Befehl kann mit PGP2 (v3) Schlüsseln nicht verwendet werden.\n"
 
@@ -2878,10 +2904,6 @@
 "Dieser Schlüssel wurde vom Besitzer widerrufen!Schlüsselüberprüfung "
 "fehlgeschlagen."
 
-#: Src/wptKeyManager.cpp:232
-msgid "Key status changed."
-msgstr "Schlüsselstatus geändert"
-
 #: Src/wptKeyManager.cpp:353
 msgid "Only one secret key can be exported."
 msgstr "Nur der geheime Schlüssel kann exportiert werden."
@@ -3285,9 +3307,10 @@
 msgid "Could not access public keyring"
 msgstr "Konnte nicht auf öffentlichen Schlüsselbund zugreifen"
 
-#: Src/wptKeyManagerDlg.cpp:1503 Src/wptKeysignDlg.cpp:236
-#: Src/wptKeysignDlg.cpp:255 Src/wptKeysignDlg.cpp:332
-#: Src/wptKeysignDlg.cpp:349 Src/wptKeysignDlg.cpp:354
+#: Src/wptKeyManagerDlg.cpp:1503 Src/wptKeysignDlg.cpp:241
+#: Src/wptKeysignDlg.cpp:259 Src/wptKeysignDlg.cpp:334
+#: Src/wptKeysignDlg.cpp:351 Src/wptKeysignDlg.cpp:356
+#: Src/wptKeysignDlg.cpp:358
 msgid "Key Signing"
 msgstr "Schlüsselsignierung"
 
@@ -3425,7 +3448,7 @@
 
 # msgid "Unknown"
 # msgstr "Unbekannt"
-#: Src/wptKeyPropsDlg.cpp:331
+#: Src/wptKeyPropsDlg.cpp:335
 msgid ""
 "The status of this key is 'revoked' or 'expired'.\n"
 "You cannot change the ownertrust of such keys."
@@ -3433,11 +3456,11 @@
 "Der Status dieses Schlüssels ist 'widerrufen' oder 'abgelaufen'.\n"
 "Sie können das Vertrauen in solche Schlüssel nicht ändern."
 
-#: Src/wptKeyPropsDlg.cpp:333 Src/wptKeyPropsDlg.cpp:340
+#: Src/wptKeyPropsDlg.cpp:337 Src/wptKeyPropsDlg.cpp:344
 msgid "WinPT Warning"
 msgstr "WinPT Warnung"
 
-#: Src/wptKeyPropsDlg.cpp:337
+#: Src/wptKeyPropsDlg.cpp:341
 msgid ""
 "This is a non-valid key.\n"
 "Modifying the ownertrust has no effect on such keys.\n"
@@ -3448,11 +3471,11 @@
 "Das Vertrauen solcher Schlüssel zu ändern hat keinerlei Effekt.\n"
 "Trotzdem fortfahren?"
 
-#: Src/wptKeyPropsDlg.cpp:354
+#: Src/wptKeyPropsDlg.cpp:358
 msgid "Ownertrust successfully changed."
 msgstr "Besitzervertrauen erfolgreich geändert."
 
-#: Src/wptKeyPropsDlg.cpp:367 Src/wptKeyRevokersDlg.cpp:146
+#: Src/wptKeyPropsDlg.cpp:371 Src/wptKeyRevokersDlg.cpp:146
 msgid "Key Revokers"
 msgstr "Schlüsselwiderrufer"
 
@@ -3864,12 +3887,12 @@
 msgid "&Receive Key"
 msgstr "&Schlüssel empfangen"
 
-#: Src/wptKeysignDlg.cpp:164 Src/wptKeysignDlg.cpp:307
+#: Src/wptKeysignDlg.cpp:165 Src/wptKeysignDlg.cpp:308
 msgid "Choose Signature Class"
 msgstr "Signaturklasse auswählen"
 
 # c:\oss\winpt-gpgme\src\wptKeysignDlg.cpp:156
-#: Src/wptKeysignDlg.cpp:165
+#: Src/wptKeysignDlg.cpp:166
 msgid ""
 "How carefully have you verified the key you are about to sign actually "
 "belongs to the person? If you don't know what to anwser, use \"0\"."
@@ -3878,30 +3901,30 @@
 "gehört? Wenn Sie nicht antworten wollen, bitte \"0\" benutzen."
 
 # c:\oss\winpt-gpgme\src\wptKeysignDlg.cpp:157
-#: Src/wptKeysignDlg.cpp:166
+#: Src/wptKeysignDlg.cpp:167
 msgid "(0) I will not answer (default)"
 msgstr "(0) Ich möchte nicht darauf antworten"
 
 # c:\oss\winpt-gpgme\src\wptKeysignDlg.cpp:158
-#: Src/wptKeysignDlg.cpp:167
+#: Src/wptKeysignDlg.cpp:168
 msgid "(1) I have not checked at all."
 msgstr "(1) Ich habe keine Überprüfung gemacht."
 
 # c:\oss\winpt-gpgme\src\wptKeysignDlg.cpp:159
-#: Src/wptKeysignDlg.cpp:168
+#: Src/wptKeysignDlg.cpp:169
 msgid "(2) I have done causal checking."
 msgstr "(2) Ich habe einige Überprüfungen gemacht."
 
 # c:\oss\winpt-gpgme\src\wptKeysignDlg.cpp:160
-#: Src/wptKeysignDlg.cpp:169
+#: Src/wptKeysignDlg.cpp:170
 msgid "(3) I have done very careful checkings."
 msgstr "(3) Ich habe gründliche Überprüfungen gemacht"
 
-#: Src/wptKeysignDlg.cpp:204
+#: Src/wptKeysignDlg.cpp:209
 msgid "never"
 msgstr "niemals"
 
-#: Src/wptKeysignDlg.cpp:242
+#: Src/wptKeysignDlg.cpp:246
 #, c-format
 msgid ""
 "pub %d/%s  created: %s    expires: %s\n"
@@ -3922,43 +3945,39 @@
 "\n"
 "Wollen Sie diesen Schlüssel wirklich mit Ihrem eigenen Schlüssel signieren?\n"
 
-#: Src/wptKeysignDlg.cpp:255
+#: Src/wptKeysignDlg.cpp:259
 msgid "No valid secret key found."
 msgstr "Keine gültigen geheimen Schlüssel gefunden."
 
-#: Src/wptKeysignDlg.cpp:259
+#: Src/wptKeysignDlg.cpp:263
 msgid "Sign local only (non exportable signature)"
 msgstr "Nur lokal Signieren (nicht exportierbare Signatur)"
 
-#: Src/wptKeysignDlg.cpp:260
+#: Src/wptKeysignDlg.cpp:264
 msgid "Signature expires on"
 msgstr "Signatur läuft ab am"
 
 # c:\oss\winpt-gpgme\src\wptKeysignDlg.cpp:250
-#: Src/wptKeysignDlg.cpp:261
+#: Src/wptKeysignDlg.cpp:265
 msgid "Sign non-revocably"
 msgstr "Nicht-widerrufbar signieren"
 
-#: Src/wptKeysignDlg.cpp:262
+#: Src/wptKeysignDlg.cpp:266
 msgid "&Ask for certification level"
 msgstr "Zertifizierungslevel erfragen"
 
-#: Src/wptKeysignDlg.cpp:265
+#: Src/wptKeysignDlg.cpp:269
 msgid "&Show photo"
 msgstr "&Photo anzeigen"
 
-#: Src/wptKeysignDlg.cpp:332
+#: Src/wptKeysignDlg.cpp:334
 msgid "Could not get Key ID from key."
 msgstr "Schlüssel-ID konnte nicht aus dem Schlüssel gelesen werden."
 
-#: Src/wptKeysignDlg.cpp:353
+#: Src/wptKeysignDlg.cpp:355
 msgid "This key is already signed by your key"
 msgstr "Der Schlüssel ist bereits mit Ihrem Schlüssel signiert"
 
-#: Src/wptKeysignDlg.cpp:356
-msgid "Key successfully signed."
-msgstr "Schlüssel erfolgreich signiert."
-
 #: Src/wptKeyTrustPathDlg.cpp:138
 msgid "Trustlist"
 msgstr "Vertrauensliste"

Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Src/ChangeLog	2006-01-30 12:42:57 UTC (rev 170)
@@ -1,3 +1,25 @@
+2006-01-29  Timo Schulz  <ts at g10code.de>
+
+	* wptKeyPropsDlg.cpp (keyprops_dlg_proc): Allow to use ESC
+	to quit dialog.
+	* wptKeysignDlg.cpp (sig_class_dlg_proc): More space for
+	translations. Directly return sig class.
+	(keysign_dlg_proc): Change msgbox title.
+	* wptKeyEdit.cpp (signUserid): New.
+	(getUseridIndex): New.
+	(getKeyIndex): New.
+	(getSigIndex): New.
+	(clear): New.
+	* wptKeyEditCB.cpp (cmd_sign_handler): Allow to select
+	user-id first.
+	* wptKeyEditDlgs.cpp (lookup_cmd): New.
+	(do_editkey_sign_userid): New.
+	(do_init_cmdlist): Differ between key pairs and public keys
+	and allowed actions.
+	(keyedit_change_ownertrust): Show msgbox on success.
+	(get_default_key): New.
+	* wptPassphraseDlg.cpp (request_passphrase): Reset @cancel.
+	
 2006-01-27  Timo Schulz  <ts at g10code.de>
 
 	* WinPT.cpp (WinMain): Set minimal list mode as default.

Modified: trunk/Src/WinPT-en.rc
===================================================================
--- trunk/Src/WinPT-en.rc	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Src/WinPT-en.rc	2006-01-30 12:42:57 UTC (rev 170)
@@ -407,7 +407,7 @@
 STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | 
     WS_THICKFRAME
 CAPTION "Key Management"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
     CONTROL         "List1",IDC_KEYMISC_KEYLIST,"SysListView32",LVS_REPORT | 
                     LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | 
@@ -967,16 +967,16 @@
 BEGIN
     DEFPUSHBUTTON   "&OK",IDOK,182,78,50,14
     CONTROL         "(0) I will not answer (default)",IDC_SIGCLASS_CLASS0,
-                    "Button",BS_AUTORADIOBUTTON,14,28,103,10
+                    "Button",BS_AUTORADIOBUTTON,14,28,162,10
     LTEXT           "How carefully have you verified the key you are about to sign actually belongs to the person? If you don't know what to anwser, use ""0"".",
                     IDC_SIGCLASS_TITLEINF,5,7,228,16
     CONTROL         "(1) I have not checked at all.",IDC_SIGCLASS_CLASS1,
-                    "Button",BS_AUTORADIOBUTTON,14,40,107,10
+                    "Button",BS_AUTORADIOBUTTON,14,39,158,10
     CONTROL         "(2) I have done causal checking.",IDC_SIGCLASS_CLASS2,
-                    "Button",BS_AUTORADIOBUTTON,14,51,120,10
+                    "Button",BS_AUTORADIOBUTTON,14,50,159,10
     CONTROL         "(3) I have done very careful checkings.",
-                    IDC_SIGCLASS_CLASS3,"Button",BS_AUTORADIOBUTTON,14,64,
-                    139,10
+                    IDC_SIGCLASS_CLASS3,"Button",BS_AUTORADIOBUTTON,14,62,
+                    160,10
 END
 
 IDD_WINPT_KEYREVOKERS DIALOG DISCARDABLE  0, 0, 226, 105

Modified: trunk/Src/wptKeyEdit.cpp
===================================================================
--- trunk/Src/wptKeyEdit.cpp	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Src/wptKeyEdit.cpp	2006-01-30 12:42:57 UTC (rev 170)
@@ -1,5 +1,5 @@
 /* wptKeyEdit.cpp - GPG key edit abstraction
- *	Copyright (C) 2005 Timo Schulz
+ *	Copyright (C) 2005, 2006 Timo Schulz
  *	Copyright (C) 2005 g10 Code GmbH
  *
  * This file is part of WinPT.
@@ -224,6 +224,7 @@
     return 0;
 }
 
+
 /* Dummy handler to get the colon data and then quit. */
 static gpgme_error_t
 list_handler (void *opaque, gpgme_status_code_t code, const char *key, int fd)
@@ -284,6 +285,7 @@
     return err;
 }
 
+
 /* Retrieve all user ID information of the key set via setKey 
    in @r_inf. The result also contains the user ID number which 
    is needed to securely delete the user-ID. */
@@ -323,34 +325,36 @@
 }
 
 
-/* Construct an object with the given key in @key. */
-GpgKeyEdit::GpgKeyEdit (gpgme_key_t _key)
+/* Clear object. */
+void
+GpgKeyEdit::clear (void)
 {
-    this->key = _key;
-    pass = NULL;
-    type = 0;
+    pass = NULL;    
     name = NULL;
     cmt = NULL;
     email = NULL;
+    type = 0;
     cnt = 0;
     cmd_sent = 0;
     resval = 0;
+    uid_index = sig_index = key_index = -1;
+}
+
+
+/* Construct an object with the given key in @key. */
+GpgKeyEdit::GpgKeyEdit (gpgme_key_t _key)
+{
+    clear ();
+    this->key = _key;
     gpgme_new (&ctx); /* FIXME */
 }
 
 /* Construct an object and fetch the key with the keyid @keyid. */
 GpgKeyEdit::GpgKeyEdit (const char *_keyid)
 {
+    clear ();
     get_pubkey (_keyid, &this->key);
-    pass = NULL;
-    type = 0;
-    name = NULL;
-    cmt = NULL;
-    cnt = 0;
-    email = NULL;
-    cmd_sent = 0;
-    resval = 0;
-    gpgme_new (&ctx); /* FIXME */
+    gpgme_new (&ctx); /* FIXME */    
 }
 
 /* Delete the given object. */
@@ -466,6 +470,24 @@
     return gpg_editkey (this->ctx, this->key, this);
 }
 
+
+/* Sign a single user-id with the index @_uid_index.
+   All other parameters are equal to signKey().
+   Return value: 0 on success. */
+gpgme_error_t
+GpgKeyEdit::signUserid (int _uid_idx, int mode, int _sig_class, 
+			const char *_exp_date)
+{
+    if (!this->key || !this->pass)
+	return gpg_error (GPG_ERR_INV_OBJ);
+    this->uid_index = _uid_idx;
+    type = mode;
+    this->exp_date = _exp_date;
+    this->sig_class = _sig_class;
+    return gpg_editkey (this->ctx, this->key, this);
+}
+
+
 /* Set the ownertrust of the key stored in the object
    to the trust value @trust.
    Return value: 0 on success. */
@@ -754,3 +776,27 @@
     this->uid_index = _uid_index;
     return gpg_editkey (this->ctx, this->key, this);
 }
+
+
+/* Return the saved user-id index. */
+int
+GpgKeyEdit::getUseridIndex (void)
+{
+    return uid_index;
+}
+
+
+/* Return the saved key index. */   
+int 
+GpgKeyEdit::getKeyIndex (void)
+{
+    return key_index;
+}
+
+
+/* Return the saved sig index. */
+int
+GpgKeyEdit::getSigIndex (void)
+{
+    return sig_index;
+}

Modified: trunk/Src/wptKeyEditCB.cpp
===================================================================
--- trunk/Src/wptKeyEditCB.cpp	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Src/wptKeyEditCB.cpp	2006-01-30 12:42:57 UTC (rev 170)
@@ -49,7 +49,7 @@
 
     if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) {
 	ctx->cmd_sent = 1;
-	sprintf (buf, "uid %d", ctx->uid_index);
+	sprintf (buf, "uid %d", ctx->getUseridIndex ());
 	return buf;
     }
     if (!strcmp (key, "keyedit.prompt") && !ctx->cnt) {
@@ -77,6 +77,13 @@
 {
     static char buf[32];
 
+    if (ctx->getUseridIndex () != -1 && 
+	ctx->cnt == 0 && !strcmp (key, "keyedit.prompt")) {
+	ctx->cnt++;
+	sprintf (buf, "uid %d", ctx->getUseridIndex ());
+	return buf;
+    }
+
     if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) {
 	ctx->cmd_sent = 1;
 	switch (ctx->getType ()) {
@@ -177,7 +184,7 @@
     int step = *r_step;
 
     if (step == 0 && !strcmp (key, "keyedit.prompt")) {
-        sprintf (buf, "uid %d", ctx->uid_index);
+        sprintf (buf, "uid %d", ctx->getUseridIndex ());
 	*r_step = step = 1;
 	return buf;
     }
@@ -199,15 +206,15 @@
 }
 
 
-static const char *
-cmd_delsig_handler (GpgKeyEdit *ctx, gpgme_status_code_t code, const char * key,
-		    int * r_step)
+static const char*
+cmd_delsig_handler (GpgKeyEdit *ctx, gpgme_status_code_t code, const char *key,
+		    int *r_step)
 {
     static char buf[64];
     int step = *r_step;
 
     if (step == 0 && !strcmp (key, "keyedit.prompt")) {
-	sprintf (buf, "uid %d", ctx->uid_index);
+	sprintf (buf, "uid %d", ctx->getUseridIndex ());
 	*r_step = step = 1;
 	return buf;
     }
@@ -217,7 +224,7 @@
     }
     if (!strcmp (key, "keyedit.delsig.unknown") ||
 	!strcmp (key, "keyedit.delsig.valid")) {
-	if (++ctx->cnt == ctx->sig_index)
+	if (++ctx->cnt == ctx->getSigIndex ())
 	    return "Y";
 	else
 	    return "N";
@@ -242,7 +249,7 @@
     int step = *r_step;
 
     if (step == 0 && !strcmp (key, "keyedit.prompt")) {
-	sprintf (buf, "key %d", ctx->key_index);
+	sprintf (buf, "key %d", ctx->getKeyIndex ());
 	*r_step = step = 1;
 	return buf;
     }
@@ -364,7 +371,7 @@
     int step = *r_step;
 
     if (step == 0 && !strcmp (key, "keyedit.prompt")) {
-	sprintf (buf, "uid %d", ctx->uid_index);
+	sprintf (buf, "uid %d", ctx->getUseridIndex ());
 	*r_step = step = 1;
 	return buf;
     }
@@ -393,7 +400,7 @@
     int step = *r_step;
 
     if (step == 0 && !strcmp (key, "keyedit.prompt")) {
-	sprintf (buf, "key %d", ctx->key_index);
+	sprintf (buf, "key %d", ctx->getKeyIndex ());
 	*r_step = step = 1;
 	return buf;
     }
@@ -430,7 +437,7 @@
     
     if (step == 0 && !strcmp (key, "keyedit.prompt")) {
 	*r_step = step = 1;
-	sprintf (buf, "uid %d", ctx->uid_index);
+	sprintf (buf, "uid %d", ctx->getUseridIndex ());
 	return buf;
     }
     else if (step == 1 && !strcmp (key, "keyedit.prompt")) {
@@ -474,7 +481,7 @@
     int step = *r_step;
     
     if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) {
-	sprintf( buf, "uid %d", ctx->uid_index);
+	sprintf( buf, "uid %d", ctx->getUseridIndex ());
 	*r_step = step = 1;
 	return buf;
     }
@@ -525,7 +532,7 @@
     static char buf[64];
 
     if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) {
-	sprintf( buf, "key %d", ctx->key_index);
+	sprintf( buf, "key %d", ctx->getKeyIndex ());
 	*r_step = step = 1;
 	return buf;
     }

Modified: trunk/Src/wptKeyEditDlgs.cpp
===================================================================
--- trunk/Src/wptKeyEditDlgs.cpp	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Src/wptKeyEditDlgs.cpp	2006-01-30 12:42:57 UTC (rev 170)
@@ -47,28 +47,49 @@
     CMD_ADDUID,
     CMD_ADDPHOTO,
     CMD_ADDREVOKER,
-    /*CMD_FPR,*/
     CMD_DELUID,
     CMD_DELKEY,
-    /*CMD_DELPHOTO,*/
-    /*CMD_DELSIG,*/
     CMD_EXPIRE,
-    /*CMD_PREF,*/
     CMD_SHOWPREF,
-    /*CMD_SETPREF,*/
-    /*CMD_UPDPREF,*/
+    //CMD_SETPREF,
     CMD_PASSWD,
     CMD_PRIMARY,
     CMD_TRUST,
-    /*CMD_REVSIG,*/
     CMD_REVUID,
     CMD_REVKEY,
     CMD_DISABLE,
-    CMD_ENABLE,
-    /*CMD_SHOWPHOTO,*/
+    CMD_ENABLE,    
+    CMD_SIGN,
+    CMD_LSIGN,
 };
 
+struct cmdlist_s {
+    const char   *name;
+    unsigned int  need_pair:1;
+    int	      id;
+} cmdlist[] = {
+    {"ADDKEY", 1, CMD_ADDKEY},
+    {"ADDUID", 1, CMD_ADDUID},
+    {"ADDPHOTO", 1, CMD_ADDPHOTO},
+    {"ADDREVOKER", 1, CMD_ADDREVOKER},
+    {"DELUID", 1, CMD_DELUID},
+    {"DELKEY", 1, CMD_DELKEY},
+    {"EXPIRE", 1, CMD_EXPIRE},
+    {"SHOWPREF", 0, CMD_SHOWPREF},
+    /*{"SETPREF", 1, CMD_SETPREF},*/
+    {"PASSWD", 1, CMD_PASSWD},
+    {"PRIMARY", 1, CMD_PRIMARY},
+    {"TRUST", 0, CMD_TRUST},
+    {"REVUID", 1, CMD_REVUID},
+    {"REVKEY", 1, CMD_REVKEY},
+    {"DISABLE", 0, CMD_DISABLE},
+    {"ENABLE", 0, CMD_ENABLE},
+    {"SIGN", 0, CMD_SIGN},
+    {"LSIGN", 0, CMD_LSIGN},
+    {NULL, 0}  
+};
 
+
 /* Symbolic ids for the subkey columns. */
 enum subk_col_t {
     SUBK_COL_DESC	= 0,
@@ -325,7 +346,7 @@
 
 	case IDC_ADDPHOTO_SELFILE:
 	    s = get_fileopen_dlg (dlg, _("Select Image File"), 
-				  "JPEG Files (*.jpg, *.jpeg)\0*.jpg;*.jpeg\0\0",
+				  _("JPEG Files (*.jpg, *.jpeg)\0*.jpg;*.jpeg\0\0"),
 				  NULL);
 	    if (s && !is_jpg_file (s)) {
 		log_box (_("Add Photo"), MB_ERR, 
@@ -886,8 +907,10 @@
 			     dlg, keyedit_ownertrust_dlg_proc,
 			     (LPARAM)key, _("Change Ownertrust"),
 			     IDS_WINPT_KEYEDIT_OWNERTRUST);
-    if (rc == TRUE)
+    if (rc == TRUE) {
+	msg_box (dlg, _("Key status changed."), _("Key Edit"), MB_OK);
 	key->update = 1;
+    }
     return rc;
 }
 
@@ -1156,42 +1179,21 @@
 
 
 static void
-do_init_cmdlist( HWND dlg )
-{
-    const char *cmdlist[] = {
-	"ADDKEY",
-	"ADDUID",
-	"ADDPHOTO",
-	"ADDREVOKER",
-	/*"FPR",*/
-	"DELUID",
-	"DELKEY",
-	/*"DELPHOTO",*/
-	/*"DELSIG",*/
-	"EXPIRE",
-	/*"PREF",*/
-	"SHOWPREF",
-	/*"SETPREF",*/
-	"PASSWD",
-	"PRIMARY",
-	"TRUST",
-	/*"REVSIG",*/
-	"REVUID",
-	"REVKEY",
-	"DISABLE",
-	"ENABLE",
-	/*"SHOWPHOTO",*/
-	NULL
-    };
-    const char * s;
+do_init_cmdlist (HWND dlg, int is_keypair)
+{    
+    const char *s;
     int i = 0;
 
-    for( i = 0; (s=cmdlist[i]); i++ ) {
-	SendDlgItemMessage( dlg, IDC_KEYEDIT_CMD, CB_ADDSTRING, 0,
-			    (LPARAM)(char *)s );
+    for (i = 0; (s=cmdlist[i].name); i++) {
+	if (is_keypair)
+	    SendDlgItemMessage (dlg, IDC_KEYEDIT_CMD, CB_ADDSTRING, 0,
+				(LPARAM)(char *)s);
+	else if (!cmdlist[i].need_pair)
+	    SendDlgItemMessage (dlg, IDC_KEYEDIT_CMD, CB_ADDSTRING, 0,
+				(LPARAM)(char *)s);
     }
-    SendDlgItemMessage( dlg, IDC_KEYEDIT_CMD, CB_SETCURSEL, 0, 0 );
-} /* do_init_cmdlist */
+    SendDlgItemMessage (dlg, IDC_KEYEDIT_CMD, CB_SETCURSEL, 0, 0);
+}
 
 
 /* Return 1 if the requested command is RFC2440. */
@@ -1202,9 +1204,7 @@
     case CMD_ADDKEY:
     case CMD_ADDPHOTO:
     case CMD_ADDREVOKER:
-    /*case CMD_DELPHOTO:*/
-    /*case CMD_SHOWPHOTO:*/
-    /*case CMD_SETPREF:*/
+    //case CMD_SETPREF:
 	return 1;
     }
     return 0;
@@ -1218,28 +1218,26 @@
     char helptext[2048];
 
     _snprintf (helptext, sizeof (helptext)-1,
-	_(/*"FPR	    \t\tshow fingerprint\r\n"*/
+	_(
 	 "ADDUID   \t\tadd a user ID\r\n"
 	 "ADDPHOTO  \t\tadd a photo ID\r\n"
 	 "DELUID    \t\tdelete a user ID\r\n"
 	 "ADDKEY    \t\tadd a secondard key\r\n"
 	 "DELKEY    \t\tdelete a secondary key\r\n"
 	 "ADDREVOKER\t\tadd a revocation key\r\n"
-	 /*"DELSIG    \t\tdelete signatures\r\n"*/
 	 "EXPIRE    \t\tchange the expire date\r\n"
-	 /*"PREF	    \t\tlist preferences (expert)\r\n"
 	 "SHOWPREF  \t\tlist preferences (verbose)\r\n"
-	 "SETPREF   \t\tset preference list\r\n"*/
+	 "SETPREF   \t\tset preference list\r\n"
 	 "UPDPREF   \t\tupdated preferences\r\n"
 	 "PASSWD    \t\tchange the passphrase\r\n"
 	 "PRIMARY   \t\tflag user ID as primary\r\n"
 	 "TRUST	    \t\tchange the ownertrust\r\n"
-	 /*"REVSIG    \t\trevoke signatures\r\n"*/
 	 "REVUID    \t\trevoke a user ID\r\n"
 	 "REVKEY    \t\trevoke a secondary key\r\n"
 	 "DISABLE   \t\tdisable a key\r\n"
 	 "ENABLE    \t\tenable a key\r\n"
-	 /*"SHOWPHOTO \t\tshow photo ID\r\n"*/) );
+	 "SIGN	    \t\tsign a user-id (exportable)\r\n"
+	 "LSIGN	    \t\tsign a user-id (non-exportable)\r\n"));
     msg_box (dlg, helptext, _("Key Edit Help"), MB_OK);
 }
 
@@ -1809,6 +1807,84 @@
 }
 
 
+/* Return default secret key. */
+static gpgme_key_t
+get_default_key (void)
+{
+    gpgme_key_t def_sk;
+    char *keyid = get_gnupg_default_key ();
+
+    get_seckey (keyid, &def_sk);
+    free_if_alloc (keyid);
+    return def_sk;
+}
+
+
+static int
+do_editkey_sign_userid (winpt_key_t k, HWND dlg, listview_ctrl_t lv, int mode)
+{
+    gpgme_error_t err;
+    GpgKeyEdit *ke;
+    char *pass = NULL;
+    char email[64], name[128];
+    int uid_index;
+    int cancel = 0;
+
+    uid_index = listview_get_curr_pos (lv);
+    if (uid_index == -1) {
+	msg_box (dlg, _("Please select a user ID."), _("Key Edit"), MB_ERR);
+	return FALSE;
+    }
+    if (mode == CMD_SIGN) {
+	cancel = msg_box (dlg, _("Do you really want to make this sig exportable?"),
+			  _("Key Edit"), MB_QUEST_ASK);
+	if (cancel == IDNO)
+	    return FALSE;
+    }
+
+    listview_get_item_text (lv, uid_index, UID_COL_EMAIL, email, sizeof (email)-1);
+    listview_get_item_text (lv, uid_index, UID_COL_NAME, name, sizeof (name)-1);
+    uid_index = do_find_userid (k->keyid, email, name, NULL);
+    if (k->is_protected) {
+	pass = request_passphrase (_("Key Edit"), 1, &cancel);
+	if (cancel)
+	    return FALSE;
+    }
+    ke = new GpgKeyEdit (k->keyid);
+    ke->setPassphrase (pass);
+    ke->setLocalUser (get_default_key ());
+    err = ke->signUserid (uid_index, 
+			  mode == CMD_SIGN? GPG_EDITKEY_SIGN : GPG_EDITKEY_LSIGN,
+			  0, NULL);
+    if (!err) {
+	msg_box (dlg, _("Key successfully signed."), _("Key Edit"), MB_OK);
+	k->update = 1;
+    }
+    else
+	msg_box (dlg, gpgme_strerror (err), _("Key Edit"), MB_ERR);
+    delete ke;
+    sfree_if_alloc (pass);
+    return !err? TRUE : FALSE;
+}
+
+
+static int
+lookup_cmd (HWND dlg)
+{
+    char buf[64];
+    int i;
+
+    i = SendDlgItemMessage (dlg, IDC_KEYEDIT_CMD, CB_GETCURSEL, 0, 0);
+    if (i == LB_ERR)
+	return LB_ERR;
+    GetDlgItemText (dlg, IDC_KEYEDIT_CMD, buf, sizeof (buf)-1);
+    for (i=0; cmdlist[i].name != NULL; i++) {
+	if (!strcmp (buf, cmdlist[i].name))
+	    return cmdlist[i].id;
+    }
+    return LB_ERR;
+}
+
 /* Dialog box procedure for the edit key dialog. */
 BOOL CALLBACK
 keyedit_main_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
@@ -1823,7 +1899,7 @@
 	k = (winpt_key_t)lparam;
 	if (!k)
 	    BUG (NULL);
-	do_init_cmdlist (dlg);
+	do_init_cmdlist (dlg, k->key_pair);
 	lvsub = subkey_list_init (dlg, k);
 	if( !lvsub )
 	    BUG( NULL );
@@ -1850,7 +1926,7 @@
 		BUG( NULL );
 	    }
 	}
-	if (!k->key_pair || k->ctx->revoked) {
+	if (k->ctx->revoked) {
 	    EnableWindow (GetDlgItem (dlg, IDC_KEYEDIT_CMD), FALSE);
 	    EnableWindow (GetDlgItem (dlg, IDOK), FALSE);
 	}
@@ -1858,8 +1934,8 @@
 	SetDlgItemText (dlg, IDCANCEL, _("&Close"));
 	SetDlgItemText (dlg, IDC_KEYEDIT_HELP, _("&Help"));
 	SetWindowText (dlg, _("Key Edit"));
-	SetForegroundWindow( dlg );
-	center_window( dlg, NULL );
+	SetForegroundWindow (dlg);
+	center_window (dlg, NULL);
 	return TRUE;
 
     case WM_DESTROY:
@@ -1884,7 +1960,7 @@
     case WM_COMMAND:
 	switch( LOWORD( wparam ) ) {
 	case IDOK:
-	    cmd = SendDlgItemMessage (dlg, IDC_KEYEDIT_CMD, CB_GETCURSEL, 0, 0);
+	    cmd = lookup_cmd (dlg);
 	    if (cmd == LB_ERR) {
 		msg_box( dlg, _("Please select a command."), _("Key Edit"), MB_INFO );
 		return FALSE;
@@ -1911,6 +1987,10 @@
 	    case CMD_ENABLE: do_editkey_enable_disable (k, dlg, lvsub, 1); break;
 	    case CMD_DISABLE: do_editkey_enable_disable (k, dlg, lvsub, 0); break;
 	    case CMD_TRUST: keyedit_change_ownertrust (k, dlg); break;
+	    case CMD_SIGN:
+	    case CMD_LSIGN: do_editkey_sign_userid (k, dlg, 
+						    lvuid, cmd);
+			    break;
 	    }
 	    break;
 

Modified: trunk/Src/wptKeyPropsDlg.cpp
===================================================================
--- trunk/Src/wptKeyPropsDlg.cpp	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Src/wptKeyPropsDlg.cpp	2006-01-30 12:42:57 UTC (rev 170)
@@ -317,7 +317,7 @@
 
     case WM_SYSCOMMAND:
         if (LOWORD (wparam) == SC_CLOSE)
-            EndDialog (dlg, TRUE);
+            EndDialog (dlg, FALSE);
         return FALSE;
         
     case WM_COMMAND:
@@ -325,6 +325,10 @@
         case IDOK:
             EndDialog (dlg, TRUE);
             return TRUE;
+
+	case IDCANCEL:
+	    EndDialog (dlg, FALSE);
+	    return TRUE;
             
         case IDC_KEYPROPS_OT_CHANGE:
 	    if (do_check_key (key)) {

Modified: trunk/Src/wptKeysignDlg.cpp
===================================================================
--- trunk/Src/wptKeysignDlg.cpp	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Src/wptKeysignDlg.cpp	2006-01-30 12:42:57 UTC (rev 170)
@@ -1,5 +1,5 @@
 /* wptKeysignDlg.cpp - Key signing dialog
- *	Copyright (C) 2001-2005 Timo Schulz
+ *	Copyright (C) 2001-2006 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -39,7 +39,6 @@
 #include "wptKeylist.h"
 #include "wptKeyEdit.h"
 
-static int sig_class_choice = 0;
 
 /* Return a beautified printable fingerprint of @fpr. */
 static const char*
@@ -159,6 +158,8 @@
 BOOL CALLBACK
 sig_class_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
 {
+    int sig_class = 0;
+
     switch (msg) {
     case WM_INITDIALOG:
 	SetWindowText (dlg, _("Choose Signature Class"));
@@ -173,20 +174,24 @@
 	return TRUE;
 
     case WM_COMMAND:
-	switch( LOWORD( wparam ) ) {
+	switch (LOWORD (wparam)) {
 	case IDOK:
 	    if (IsDlgButtonChecked (dlg, IDC_SIGCLASS_CLASS0))
-		sig_class_choice = 0;
+		sig_class = 0;
 	    else if (IsDlgButtonChecked (dlg, IDC_SIGCLASS_CLASS1))
-		sig_class_choice = 1;
+		sig_class = 1;
 	    else if (IsDlgButtonChecked (dlg, IDC_SIGCLASS_CLASS2))
-		sig_class_choice = 2;
+		sig_class = 2;
 	    else if (IsDlgButtonChecked (dlg, IDC_SIGCLASS_CLASS3))
-		sig_class_choice = 3;
+		sig_class = 3;
 	    else
-		sig_class_choice = 0;
-	    EndDialog (dlg, TRUE);
+		sig_class = 0;
+	    EndDialog (dlg, sig_class);
 	    return TRUE;
+
+	case IDCANCEL:
+	    EndDialog (dlg, 0);
+	    return TRUE;
 	}
 	break;
     }
@@ -227,14 +232,13 @@
     char *uid = NULL;
     const char *keyid, *s;
     int type, expires=0, idx;
+    int sig_class = 0;
     
     switch ( msg )  {
     case WM_INITDIALOG:
         if (lparam == 0)
             dlg_fatal_error (dlg, "Could not get dialog param.");
-	#ifndef LANG_DE
         SetWindowText (dlg, _("Key Signing"));
-	#endif
         key = (winpt_key_t) lparam;
         s = key->ctx->uids->uid;
 	uid = utf8_to_wincp (s, strlen (s));
@@ -277,10 +281,6 @@
 	h = GetDlgItem (dlg, IDC_KEYSIGN_PASSPHRASE);
 	SetFocus (h);
         return FALSE;
-    
-    case WM_DESTROY:
-	sig_class_choice = 0;
-	break;
 
     case WM_SYSCOMMAND:
         if( LOWORD( wparam ) == SC_CLOSE ) {
@@ -299,12 +299,14 @@
 	    EnableWindow (GetDlgItem (dlg, IDC_KEYSIGN_EXPIRES), enable? TRUE : FALSE);
 	}
 
-        switch( LOWORD( wparam ) ) {
+        switch (LOWORD (wparam)) {
         case IDOK:
 	    if (IsDlgButtonChecked (dlg, IDC_KEYSIGN_ASKLEVEL))
-		dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_SIGCLASS, dlg, 
-				  sig_class_dlg_proc, (LPARAM)NULL,
-				  _("Choose Signature Class"),  IDS_WINPT_SIGCLASS);
+		sig_class = dialog_box_param (glob_hinst, 
+					      (LPCSTR)IDD_WINPT_SIGCLASS, dlg,
+					      sig_class_dlg_proc, (LPARAM)NULL,
+					      _("Choose Signature Class"), 
+					      IDS_WINPT_SIGCLASS);
             type = IsDlgButtonChecked (dlg, IDC_KEYSIGN_LOCAL);
 	    if (type)
 		type = GPG_EDITKEY_LSIGN;
@@ -342,7 +344,7 @@
 	    if (k)
 		ke->setLocalUser (k);
 
-	    err = ke->signKey (type, sig_class_choice, expires? keymsg : "0");
+	    err = ke->signKey (type, sig_class, expires? keymsg : "0");
 	    wipememory (pwd, sizeof (pwd));
 	    if (err) {
 		delete ke;
@@ -353,7 +355,7 @@
 		msg_box (dlg, _("This key is already signed by your key"), 
 			 _("Key Signing"), MB_INFO);
 	    else {
-		status_box (dlg, _("Key successfully signed."), PGM_NAME);
+		status_box (dlg, _("Key successfully signed."), _("Key Signing"));
 		key->update = 1;
 	    }
 	    delete ke;

Modified: trunk/Src/wptPassphraseDlg.cpp
===================================================================
--- trunk/Src/wptPassphraseDlg.cpp	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/Src/wptPassphraseDlg.cpp	2006-01-30 12:42:57 UTC (rev 170)
@@ -120,6 +120,7 @@
     passphrase_s pass;
     char *p;
 
+    *ret_cancel = 0; /* reset */
     memset (&pass, 0, sizeof (pass));
     if (title && *title) {
 	pass.title = m_strdup (title);

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/TODO	2006-01-30 12:42:57 UTC (rev 170)
@@ -1,6 +1,7 @@
 Feel free if you think there is missing something to mail me.
 
 -0.11.x-
+    * Check the code for checking detached sigs.
     * On modern P4 CPUs the thread scheduling mechanism seems to
       cause trouble and the result is that any GPG operation will
       be take much longer as expected.

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2006-01-27 10:27:01 UTC (rev 169)
+++ trunk/configure.ac	2006-01-30 12:42:57 UTC (rev 170)
@@ -15,7 +15,7 @@
 
 # Version number: Remember to change it immediately *after* a release.
 #                 Add a "-cvs" prefix for non-released code.
-AC_INIT(WinPT, 0.11.7, http://www.winpt.org)
+AC_INIT(WinPT, 0.11.8-cvs, http://www.winpt.org)
 NEED_GPG_VERSION=1.4.2
 NEED_GPGME_API=1
 NEED_GPGME_VERSION=1.1.1



More information about the Winpt-commits mailing list