X-Git-Url: https://code.th-h.de/?p=usenet%2Fusevote.git;a=blobdiff_plain;f=UVmenu.pm;h=07e32c86436a84c597cc295007f99b33159c3c29;hp=cd523e833063264876495fcaa9272e1d6a18511a;hb=b4bfb234881080210ca8d019b8aa317b3a709d56;hpb=b9f5201405ce5145f258c7e909397f4cf1f3bd23 diff --git a/UVmenu.pm b/UVmenu.pm index cd523e8..07e32c8 100644 --- a/UVmenu.pm +++ b/UVmenu.pm @@ -60,6 +60,7 @@ sub menu { while (1) { system($config{clearcmd}); + print "-> $config{votename} <-\n"; print UVmessage::get("MENU_PROBLEMS") . "\n"; foreach my $error (keys %errors) { @@ -69,6 +70,12 @@ sub menu { my $menucaption = UVmessage::get("MENU_CAPTION"); print "\n\n$menucaption\n"; print "=" x length($menucaption), "\n\n"; + + # don't print this option if called from uvcfv.pl + unless ($mailonly) { + print "(0) ", UVmessage::get("MENU_DIFF_BALLOT"), "\n"; + } + print "(1) ", UVmessage::get("MENU_SHOW_MAIL"), "\n\n", UVmessage::get("MENU_CHANGE_PROPERTIES"), "\n", "(2) ", UVmessage::get("MENU_ADDRESS"), " [$voter_addr]\n"; @@ -95,7 +102,14 @@ sub menu { # only accept 1, 2, i and w if called from uvcfv.pl next if ($mailonly && $input !~ /^[12iw]$/i); - if ($input eq '1') { + if ($input eq '0') { + # ignore SIGPIPE (Bug in more and less) + $SIG{PIPE} = 'IGNORE'; + open (DIFF, "|$config{diff} - $config{sampleballotfile} | $config{pager}"); + print DIFF $$body, "\n"; + close (DIFF); + + } elsif ($input eq '1') { system($config{clearcmd}); # ignore SIGPIPE (Bug in more and less) $SIG{PIPE} = 'IGNORE';