from ${GNUPGHOME}/gpg.conf if that file exists. (addresses MS #2080)
* Under Linux, report details about the requesting process if we can
learn them from /proc (closes MS #2005)
+ * Conditionally rely on Gtk2 perl module -- no marginal UI without it,
+ but you can also install the MSVA now without needing to pull in a
+ bunch of Gtk libs (closes MS #2514)
-- Daniel Kahn Gillmor <dkg@fifthhorseman.net> Mon, 11 Oct 2010 16:02:22 -0400
use strict;
use warnings;
- use Gtk2;
use Crypt::Monkeysphere::MSVA qw( msvalog );
use IO::File;
+ use Module::Load::Conditional;
sub ask_the_user {
my $self = shift;
my @subvalid_key_fprs = @{$fprs};
msvalog('debug', "%d subvalid_key_fprs\n", $#subvalid_key_fprs+1);
+
+ if (! Module::Load::Conditional::can_load('modules' => { 'Gtk2' => undef })) {
+ msvalog('info', "Gtk2 Perl module is unavailable, so no marginal UI presented\n");
+ return 0;
+ }
+
+
foreach my $keyfpr (@subvalid_key_fprs) {
my $fprx = sprintf('0x%.40s', $keyfpr->{fpr}->as_hex_string);
msvalog('debug', "checking on %s\n", $fprx);
my $labeltxt = shift;
my $tip = shift;
+ require Gtk2;
Gtk2->init();
# create a new dialog with some buttons - one stock, one not.
my $dialog = Gtk2::Dialog->new(sprintf('Monkeysphere validation agent [%s]', $peer),