[Winpt-commits] r297 - in trunk: . Include Src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Mar 17 23:13:41 CET 2007
Author: twoaday
Date: 2007-03-17 23:13:40 +0100 (Sat, 17 Mar 2007)
New Revision: 297
Modified:
trunk/Include/wptRegistry.h
trunk/NEWS
trunk/Src/ChangeLog
trunk/Src/wptErrors.cpp
trunk/Src/wptMisc.c
trunk/Src/wptOwnertrustDlg.cpp
trunk/Src/wptPassphraseCB.cpp
trunk/Src/wptPassphraseDlg.cpp
Log:
Modified: trunk/Include/wptRegistry.h
===================================================================
--- trunk/Include/wptRegistry.h 2007-03-17 21:56:11 UTC (rev 296)
+++ trunk/Include/wptRegistry.h 2007-03-17 22:13:40 UTC (rev 297)
@@ -1,5 +1,5 @@
/* wptRegistry.h - Registry interface
- * Copyright (C) 2000-2006 Timo Schulz
+ * Copyright (C) 2000-2007 Timo Schulz
*
* This file is part of WinPT.
*
@@ -12,12 +12,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with WinPT; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#ifndef WPT_REGISTRY_H
#define WPT_REGISTRY_H
@@ -68,6 +63,7 @@
int always_trust; /* skip key validation (1 means yes) */
int auto_backup; /* automatic backup (1 means activated) */
int default_ext; /* 1 = GPG, PGP otherwise. */
+ int no_safe_pwd_ctrl; /* disable the additional 'safe' window hooks. */
struct {
int include_secr;/* including secret keyrings. */
int mode; /* backup mode */
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2007-03-17 21:56:11 UTC (rev 296)
+++ trunk/NEWS 2007-03-17 22:13:40 UTC (rev 297)
@@ -990,4 +990,7 @@
* Update the dependencies to make sure that a recent GnuPG version
is used. Plus a recent GPGME DLL is required to fix the problem
with the double plaintext issue.
-
\ No newline at end of file
+
+* Allow to use the ordinary passphrase control again. When this
+ setting is enabled, the passphase field is not restricted in
+ use any longer. But this feature is disabled by default.
Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog 2007-03-17 21:56:11 UTC (rev 296)
+++ trunk/Src/ChangeLog 2007-03-17 22:13:40 UTC (rev 297)
@@ -1,3 +1,10 @@
+2007-03-17 Timo Schulz <twoaday at gmx.net>
+
+ * wptErrors.cpp (debug_end): Reset FP pointer.
+ (printf_box): Fix buffer calculation.
+ * wptOwnertrustDlg.cpp (gpg_import_ownertrust): Actually
+ return the error.
+
2007-03-13 Timo Schulz <twoaday at gmx.net>
* wptGPG.cpp (gpg_check_file_permissions): New.
Modified: trunk/Src/wptErrors.cpp
===================================================================
--- trunk/Src/wptErrors.cpp 2007-03-17 21:56:11 UTC (rev 296)
+++ trunk/Src/wptErrors.cpp 2007-03-17 22:13:40 UTC (rev 297)
@@ -122,14 +122,6 @@
case WPTERR_NOCARD: return _("There is no card in the reader");
case WPTERR_NOREADER: return _("There was no reader found");
case WPTERR_NOPGPCARD: return _("This is not an OpenPGP card");
- /*
- case WPTERR_CDISK_LOCK: return _("Could not lock or unlock volume");
- case WPTERR_CDISK_MOUNT: return _("Could not mount volume");
- case WPTERR_CDISK_UMOUNT: return _("Could not unmount volume");
- case WPTERR_CDISK_OPEN: return _("Could not open volume");
- case WPTERR_CDISK_BUSY: return _("Drive that belongs to the volume is busy");
- case WPTERR_CDISK_QUERY: return _("Could not query volume information");
- */
default: _snprintf (buf, DIM (buf) - 1,
_("Unknown error=%d"), errid); return buf;
}
@@ -212,8 +204,10 @@
void
debug_end (void)
{
- if (log_fp != NULL)
+ if (log_fp != NULL) {
fclose (log_fp);
+ log_fp = NULL;
+ }
}
@@ -226,7 +220,7 @@
int id;
va_start (arg_ptr, format);
- _vsnprintf (log, sizeof (log)-1, format, arg_ptr);
+ _vsnprintf (log, DIM (log)-1, format, arg_ptr);
id = msg_box (NULL, log, title, style);
va_end (arg_ptr);
Modified: trunk/Src/wptMisc.c
===================================================================
--- trunk/Src/wptMisc.c 2007-03-17 21:56:11 UTC (rev 296)
+++ trunk/Src/wptMisc.c 2007-03-17 22:13:40 UTC (rev 297)
@@ -12,10 +12,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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
@@ -25,14 +21,14 @@
#include <shlobj.h>
-void
-_SHFree (void *p)
+void
+_SHFree (void *p)
{
IMalloc *pm;
SHGetMalloc (&pm);
- if (pm) {
- pm->lpVtbl->Free (pm,p);
+ if (pm != NULL) {
+ pm->lpVtbl->Free (pm, p);
pm->lpVtbl->Release (pm);
}
}
Modified: trunk/Src/wptOwnertrustDlg.cpp
===================================================================
--- trunk/Src/wptOwnertrustDlg.cpp 2007-03-17 21:56:11 UTC (rev 296)
+++ trunk/Src/wptOwnertrustDlg.cpp 2007-03-17 22:13:40 UTC (rev 297)
@@ -1,5 +1,5 @@
/* wptOwnertrust.cpp - Ownertrust im- and export
- * Copyright (C) 2001, 2002, 2003, 2005, 2006 Timo Schulz
+ * Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Timo Schulz
* Copyright (C) 2005 g10 Code GmbH
*
* This file is part of WinPT.
@@ -13,10 +13,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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>
@@ -81,7 +77,7 @@
err = gpg_manage_ownertrust (&ot_data, 0);
safe_free (ot_data);
- return 0;
+ return err;
}
@@ -92,7 +88,7 @@
gpgme_error_t err;
const char *fname;
- switch( msg ) {
+ switch (msg) {
case WM_INITDIALOG:
SetWindowText (dlg, _("Ownertrust"));
SetDlgItemText (dlg, IDC_OWNERTRUST_INFO, _("File"));
@@ -116,11 +112,13 @@
msg_box (dlg, gpgme_strerror( err ), _("Ownertrust"), MB_ERR );
return TRUE;
}
- status_box (dlg, _("Ownertrust successfully exported."), _("GnuPG Status"));
+ status_box (dlg, _("Ownertrust successfully exported."),
+ _("GnuPG Status"));
return TRUE;
case IDC_OWNERTRUST_IMPORT:
- fname = get_fileopen_dlg (dlg, _("Select File Name for Input"), NULL, NULL);
+ fname = get_fileopen_dlg (dlg, _("Select File Name for Input"),
+ NULL, NULL);
if (!fname)
return TRUE;
err = gpg_import_ownertrust (fname);
@@ -128,7 +126,8 @@
msg_box (dlg, gpgme_strerror (err), _("Ownertrust"), MB_ERR);
return TRUE;
}
- status_box (dlg, _("Ownertrust successfully imported."), _("GnuPG Status"));
+ status_box (dlg, _("Ownertrust successfully imported."),
+ _("GnuPG Status"));
return TRUE;
case IDCANCEL:
Modified: trunk/Src/wptPassphraseCB.cpp
===================================================================
--- trunk/Src/wptPassphraseCB.cpp 2007-03-17 21:56:11 UTC (rev 296)
+++ trunk/Src/wptPassphraseCB.cpp 2007-03-17 22:13:40 UTC (rev 297)
@@ -75,11 +75,16 @@
switch (msg) {
case WM_ACTIVATE:
- safe_edit_control_init (dlg, item_ctrl_id (c->gpg_cmd));
+ /* Some people complained that it is no longer possible to
+ paste in the passphrase in this dialog. When this option
+ is enabled, the ordinary passphrase control will be used. */
+ if (!reg_prefs.no_safe_pwd_ctrl)
+ safe_edit_control_init (dlg, item_ctrl_id (c->gpg_cmd));
break;
case WM_DESTROY:
- safe_edit_control_free (dlg, item_ctrl_id (c->gpg_cmd));
+ if (!reg_prefs.no_safe_pwd_ctrl)
+ safe_edit_control_free (dlg, item_ctrl_id (c->gpg_cmd));
break;
case WM_INITDIALOG:
Modified: trunk/Src/wptPassphraseDlg.cpp
===================================================================
--- trunk/Src/wptPassphraseDlg.cpp 2007-03-17 21:56:11 UTC (rev 296)
+++ trunk/Src/wptPassphraseDlg.cpp 2007-03-17 22:13:40 UTC (rev 297)
@@ -29,6 +29,7 @@
#include "wptUTF8.h"
#include "wptVersion.h"
#include "wptTypes.h"
+#include "wptRegistry.h"
#include "StringBuffer.h"
@@ -101,11 +102,14 @@
return FALSE;
case WM_ACTIVATE:
- safe_edit_control_init (dlg, IDC_PASSWD_PWD);
+ /* See comment in wptPassphraseCBDlg.cpp for more information. */
+ if (!reg_prefs.no_safe_pwd_ctrl)
+ safe_edit_control_init (dlg, IDC_PASSWD_PWD);
break;
case WM_DESTROY:
- safe_edit_control_free (dlg, IDC_PASSWD_PWD);
+ if (!reg_prefs.no_safe_pwd_ctrl)
+ safe_edit_control_free (dlg, IDC_PASSWD_PWD);
break;
case WM_COMMAND:
More information about the Winpt-commits
mailing list