[Winpt-commits] r101 - trunk/Src

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Fri Nov 25 11:56:06 CET 2005


Author: twoaday
Date: 2005-11-25 11:56:05 +0100 (Fri, 25 Nov 2005)
New Revision: 101

Modified:
   trunk/Src/ChangeLog
   trunk/Src/wptKeyEditCB.cpp
   trunk/Src/wptKeygenDlg.cpp
   trunk/Src/wptKeyserverDlg.cpp
   trunk/Src/wptPassphraseDlg.cpp
Log:
Localized 'Cancel' buttons.
Fix 'addrevoker' hanging problem.



Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog	2005-11-25 09:49:59 UTC (rev 100)
+++ trunk/Src/ChangeLog	2005-11-25 10:56:05 UTC (rev 101)
@@ -1,3 +1,8 @@
+2005-11-25  Timo Schulz  <ts at g10code.com>
+
+	* wptKeyEditCB.cpp (addrev_cmd_handler): Avoid hanging
+	process when the revoker is already there.
+	
 2005-11-24  Timo Schulz  <ts at g10code.com>
 
 	* wptPassphraseCB.cpp (passphrase_callback_proc): Localize

Modified: trunk/Src/wptKeyEditCB.cpp
===================================================================
--- trunk/Src/wptKeyEditCB.cpp	2005-11-25 09:49:59 UTC (rev 100)
+++ trunk/Src/wptKeyEditCB.cpp	2005-11-25 10:56:05 UTC (rev 101)
@@ -563,13 +563,23 @@
 {
     int step = *r_step;
 
+    /* If the isuser already signed the key, send an empty
+       string and jump to quit. */
+    if (ctx->getResult () & GPG_EDITRES_ALREADY_SIGNED
+	&& *r_step != -1 && *r_step != 4) {
+	*r_step = step = -1;
+	return "";
+    }
+    if (*r_step == -1) {
+	*r_step = step = 4;
+	return ""; /* empty value to abort. */
+    } 
     if (step == 0 && !strcmp (key, "keyedit.prompt")) {
 	*r_step = step = 1;
 	return "addrevoker";
     }
     if (step == 1 && !strcmp (key, "keyedit.add_revoker")) {
 	*r_step = step = 2;
-	/* XXX: handle already-signed. */
 	return ctx->name;
     }
     if (step == 2 && !strcmp (key, "keyedit.add_revoker.okay")) {
@@ -761,6 +771,7 @@
 static gpgme_error_t 
 map_result (GpgKeyEdit *ke)
 {
+    /* XXX Sometimes ALREADY_SIGNED indicates an failure. */
     if (!ke->getResult ())
 	return gpg_error (GPG_ERR_NO_ERROR);
     if (ke->getResult () & GPG_EDITRES_BAD_PASSPHRASE)

Modified: trunk/Src/wptKeygenDlg.cpp
===================================================================
--- trunk/Src/wptKeygenDlg.cpp	2005-11-25 09:49:59 UTC (rev 100)
+++ trunk/Src/wptKeygenDlg.cpp	2005-11-25 10:56:05 UTC (rev 101)
@@ -391,6 +391,7 @@
         SetDlgItemText( dlg, IDC_KEYGEN_KEYTYPEINF, _("Key &type") );
 	SetDlgItemText (dlg, IDC_KEYGEN_EXPNEVER, _("&Never"));
 	SetDlgItemText (dlg, IDC_KEYGEN_HIDEPWD, _("&Hide Typing"));
+	SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
 
         SetDlgItemInt (dlg, IDC_KEYGEN_SUBKEYBITS, 2048, FALSE);
 	CheckDlgButton (dlg, IDC_KEYGEN_HIDEPWD, BST_CHECKED);

Modified: trunk/Src/wptKeyserverDlg.cpp
===================================================================
--- trunk/Src/wptKeyserverDlg.cpp	2005-11-25 09:49:59 UTC (rev 100)
+++ trunk/Src/wptKeyserverDlg.cpp	2005-11-25 10:56:05 UTC (rev 101)
@@ -357,7 +357,6 @@
     
     switch ( msg ) {
     case WM_INITDIALOG:
-    #ifndef LANG_DE
         SetWindowText (dlg, _("Keyserver Access"));
 	SetDlgItemText (dlg, IDC_KEYSERVER_RECV, _("&Receive"));
         SetDlgItemText (dlg, IDC_KEYSERVER_SEND, 
@@ -367,7 +366,8 @@
         SetDlgItemText (dlg, IDC_KEYSERVER_INDEX, _("&Search"));
 	SetDlgItemText (dlg, IDC_KEYSERVER_PROXSETT, _("C&hange"));
 	SetDlgItemText (dlg, IDC_KEYSERVER_DEFAULT, _("Set &default"));
-    #endif
+	SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
+
         set_proxy (dlg);
         keyserver_list_build (&lv, GetDlgItem (dlg, IDC_KEYSERVER_LIST));
 	center_window (dlg, NULL);

Modified: trunk/Src/wptPassphraseDlg.cpp
===================================================================
--- trunk/Src/wptPassphraseDlg.cpp	2005-11-25 09:49:59 UTC (rev 100)
+++ trunk/Src/wptPassphraseDlg.cpp	2005-11-25 10:56:05 UTC (rev 101)
@@ -56,9 +56,7 @@
         pwd = (passphrase_s *)lparam;
         if (pwd == NULL)
             dlg_fatal_error (dlg, "Could not get dialog param!");
-    #ifndef LANG_DE
         SetWindowText (dlg, _("Passphrase Dialog"));
-    #endif
 	CheckDlgButton (dlg, IDC_PASSWD_HIDE, BST_CHECKED);
         if (pwd->title)
             SetWindowText (dlg, pwd->title);
@@ -67,6 +65,8 @@
 	else
 	    SetDlgItemText (dlg, IDC_PASSWD_INFO, _("Enter Passphrase"));
 	SetDlgItemText (dlg, IDC_PASSWD_HIDE, _("&Hide Typing"));
+	SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
+	
         SetFocus (GetDlgItem (dlg, IDC_PASSWD_PWD ));
 	center_window2 (dlg, NULL, HWND_TOPMOST);
 	center_window (dlg, NULL);



More information about the Winpt-commits mailing list