From: Thomas Hochstein Date: Wed, 19 Mar 2014 20:43:48 +0000 (+0100) Subject: Add votename to Menu. X-Git-Tag: 4.0.12^2~5 X-Git-Url: https://code.th-h.de/?p=usenet%2Fusevote.git;a=commitdiff_plain;h=3aca529725c836e6aa7968f462cff67cb63e0e60 Add votename to Menu. Display the current voting's description. Also purge some dead code. Picked from upstream. Signed-off-by: Thomas Hochstein --- diff --git a/CHANGES b/CHANGES index 4afa606..f911feb 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,9 @@ Version 4.12 (19.01.2014): Wahlschein und einem Musterwahlschein (wie im CfV geposted) zu starten. Dazu muss die Config-Option "sampleballotfile" gesetzt und die Datei vorhanden sein (Standard-Dateiname: ballot.sample) +- im Fehlermenue wird nun der Name der Abstimmung als Ueberschrift + angezeigt. Ausserdem wurde in UVmenu.pm ein redundanter Code-Abschnitt + entfernt Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. diff --git a/UVmenu.pm b/UVmenu.pm index 486bb2c..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) { @@ -107,7 +108,7 @@ sub menu { 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) @@ -300,22 +301,6 @@ sub menu { $errors{WrongVoting} = UVmessage::get("MENU_WRONGVOTING"); } - } elsif ($input eq '7') { - my $sel; - do { - print "[a] ", UVmessage::get("MENU_VOTING_CORRECT"), "\n", - "[b] ", UVmessage::get("MENU_VOTING_WRONG"), "\n\n", - UVmessage::get("MENU_PROMPT"); - $sel = ; - } until ($sel =~ /^[ab]$/i); - - if ($sel =~ /^a$/i) { - delete $errors{NoVoting}; - delete $errors{WrongVoting}; - } else { - $errors{WrongVoting} = UVmessage::get("MENU_WRONGVOTING"); - } - } elsif ($input =~ /^i$/i) { my $ignore = UVmessage::get("MENU_IGNORE_STRING"); # Set columns for Text::Wrap