1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-06 23:17:47 +02:00

* photoid.c (generate_photo_id): Enable readline completion and tilde

expansion for the JPEG prompt.
This commit is contained in:
David Shaw 2005-08-31 18:40:39 +00:00
parent cb00951803
commit 187eaf0665
2 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-08-31 David Shaw <dshaw@jabberwocky.com>
* photoid.c (generate_photo_id): Enable readline completion and
tilde expansion for the JPEG prompt.
2005-08-26 David Shaw <dshaw@jabberwocky.com>
* misc.c (openpgp_pk_algo_usage): Default to allowing CERT for

View File

@ -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 @@ PKT_user_id *generate_photo_id(PKT_public_key *pk)
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;