mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
* options.skel, photoid.c (get_default_photo_command): Find an image
viewer at runtime. Seems FC5 doesn't have xloadimage.
This commit is contained in:
parent
2830e83246
commit
27bb89d687
@ -1,3 +1,8 @@
|
||||
2006-04-11 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* options.skel, photoid.c (get_default_photo_command): Find an
|
||||
image viewer at runtime. Seems FC5 doesn't have xloadimage.
|
||||
|
||||
2006-04-08 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* getkey.c (parse_auto_key_locate): Fix dupe-removal code.
|
||||
|
@ -182,14 +182,13 @@ keyserver hkp://subkeys.pgp.net
|
||||
# input is the best way to do this as it avoids the time and effort in
|
||||
# generating and then cleaning up a secure temp file.
|
||||
#
|
||||
# The default program is "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin"
|
||||
# On Mac OS X and Windows, the default is to use your regular JPEG image
|
||||
# viewer.
|
||||
# If no photo-viewer is provided, GnuPG will look for xloadimage, eog,
|
||||
# or display (ImageMagick). On Mac OS X and Windows, the default is
|
||||
# to use your regular JPEG image viewer.
|
||||
#
|
||||
# Some other viewers:
|
||||
# photo-viewer "qiv %i"
|
||||
# photo-viewer "ee %i"
|
||||
# photo-viewer "display -title 'KeyID 0x%k'"
|
||||
#
|
||||
# This one saves a copy of the photo ID in your home directory:
|
||||
# photo-viewer "cat > ~/photoid-for-key-%k.%t"
|
||||
|
@ -259,7 +259,8 @@ char *image_type_to_string(byte type,int style)
|
||||
}
|
||||
|
||||
#if !defined(FIXED_PHOTO_VIEWER) && !defined(DISABLE_PHOTO_VIEWER)
|
||||
static const char *get_default_photo_command(void)
|
||||
static const char *
|
||||
get_default_photo_command(void)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
OSVERSIONINFO osvi;
|
||||
@ -278,7 +279,14 @@ static const char *get_default_photo_command(void)
|
||||
#elif defined(__riscos__)
|
||||
return "Filer_Run %I";
|
||||
#else
|
||||
return "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin";
|
||||
if(path_access("xloadimage",X_OK)==0)
|
||||
return "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin";
|
||||
else if(path_access("eog",X_OK)==0)
|
||||
return "eog %i";
|
||||
else if(path_access("display",X_OK)==0)
|
||||
return "display -title 'KeyID 0x%k' %i";
|
||||
else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@ -316,6 +324,12 @@ void show_photos(const struct user_attribute *attrs,
|
||||
opt.photo_viewer=get_default_photo_command();
|
||||
#endif
|
||||
|
||||
if(!*opt.photo_viewer)
|
||||
{
|
||||
log_info(_("no photo viewer set\n"));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* make command grow */
|
||||
command=pct_expando(opt.photo_viewer,&args);
|
||||
if(!command)
|
||||
|
Loading…
x
Reference in New Issue
Block a user