[svn] GnuPG - r3878 - trunk/g10
svn author dshaw
cvs at cvs.gnupg.org
Wed Aug 31 20:40:41 CEST 2005
Author: dshaw
Date: 2005-08-31 20:40:39 +0200 (Wed, 31 Aug 2005)
New Revision: 3878
Modified:
trunk/g10/ChangeLog
trunk/g10/photoid.c
Log:
* photoid.c (generate_photo_id): Enable readline completion and tilde
expansion for the JPEG prompt.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2005-08-31 15:36:50 UTC (rev 3877)
+++ trunk/g10/ChangeLog 2005-08-31 18:40:39 UTC (rev 3878)
@@ -1,3 +1,8 @@
+2005-08-31 David Shaw <dshaw at jabberwocky.com>
+
+ * photoid.c (generate_photo_id): Enable readline completion and
+ tilde expansion for the JPEG prompt.
+
2005-08-26 David Shaw <dshaw at jabberwocky.com>
* misc.c (openpgp_pk_algo_usage): Default to allowing CERT for
Modified: trunk/g10/photoid.c
===================================================================
--- trunk/g10/photoid.c 2005-08-31 15:36:50 UTC (rev 3877)
+++ trunk/g10/photoid.c 2005-08-31 18:40:39 UTC (rev 3878)
@@ -1,5 +1,5 @@
/* photoid.c - photo ID handling code
- * Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -43,7 +43,8 @@
#include "ttyio.h"
/* Generate a new photo id packet, or return NULL if canceled */
-PKT_user_id *generate_photo_id(PKT_public_key *pk)
+PKT_user_id *
+generate_photo_id(PKT_public_key *pk)
{
PKT_user_id *uid;
int error=1,i;
@@ -73,13 +74,23 @@
while(photo==NULL)
{
+ char *tempname;
+
tty_printf("\n");
xfree(filename);
- filename=cpr_get("photoid.jpeg.add",
+ tty_enable_completion(NULL);
+
+ tempname=cpr_get("photoid.jpeg.add",
_("Enter JPEG filename for photo ID: "));
+ tty_disable_completion();
+
+ filename=make_filename(tempname,(void *)NULL);
+
+ xfree(tempname);
+
if(strlen(filename)==0)
goto scram;
More information about the Gnupg-commits
mailing list