From 32b11e4501b31267cf0e311bfb9eb55db4515e54 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Thu, 4 Jul 2002 16:06:38 +0000 Subject: * photoid.c (get_default_photo_command, show_photos): Honor FIXED_PHOTO_VIEWER and DISABLE_PHOTO_VIEWER. * mainproc.c (check_sig_and_print): Use --show-photos to show photos when verifying a sig made by a key with a photo. * keyserver.c (parse_keyserver_uri): Properly parse a URI with no :port section and an empty file path, but with a terminating '/'. (keyserver_work): Honor DISABLE_KEYSERVER_HELPERS. * hkp.c (hkp_ask_import): Display keyserver URI as a URI, but only if verbose. * exec.c, g10.c: USE_EXEC_PATH -> FIXED_EXEC_PATH --- g10/photoid.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'g10/photoid.c') diff --git a/g10/photoid.c b/g10/photoid.c index 8a9101d36..091fe0c8b 100644 --- a/g10/photoid.c +++ b/g10/photoid.c @@ -218,6 +218,7 @@ char *image_type_to_string(byte type,int style) return string; } +#if !defined(FIXED_PHOTO_VIEWER) && !defined(DISABLE_PHOTO_VIEWER) static const char *get_default_photo_command(void) { #if defined(HAVE_DOSISH_SYSTEM) @@ -240,10 +241,12 @@ static const char *get_default_photo_command(void) return "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin"; #endif } +#endif void show_photos(const struct user_attribute *attrs, int count,PKT_public_key *pk,PKT_secret_key *sk) { +#ifndef DISABLE_PHOTO_VIEWER int i; struct expando_args args; u32 len; @@ -266,8 +269,12 @@ void show_photos(const struct user_attribute *attrs, struct exec_info *spawn; int offset=attrs[i].len-len; +#ifdef FIXED_PHOTO_VIEWER + opt.photo_viewer=FIXED_PHOTO_VIEWER; +#else if(!opt.photo_viewer) opt.photo_viewer=get_default_photo_command(); +#endif /* make command grow */ command=pct_expando(opt.photo_viewer,&args); @@ -320,4 +327,5 @@ void show_photos(const struct user_attribute *attrs, fail: log_error("unable to display photo ID!\n"); +#endif } -- cgit v1.2.3