From: <har...@us...> - 2006-06-08 21:29:21
|
Revision: 4549 Author: hardaker Date: 2006-06-08 14:29:16 -0700 (Thu, 08 Jun 2006) ViewCVS: http://svn.sourceforge.net/net-policy/?rev=4549&view=rev Log Message: ----------- Various minor fixes for merged primaries Modified Paths: -------------- trunk/net-policy/perl/Getopt_GUI/Long.pm Modified: trunk/net-policy/perl/Getopt_GUI/Long.pm =================================================================== --- trunk/net-policy/perl/Getopt_GUI/Long.pm 2006-06-08 18:50:09 UTC (rev 4548) +++ trunk/net-policy/perl/Getopt_GUI/Long.pm 2006-06-08 21:29:16 UTC (rev 4549) @@ -1,6 +1,6 @@ package Getopt::GUI::Long; -# Copyright 2005, Sparta, Inc. +# Copyright 2005-2006, Sparta, Inc. # All rights reserved. use strict; @@ -8,6 +8,7 @@ use Getopt::Long qw(); use QWizard; use QWizard::Storage::File; +use QWizard::Plugins::Bookmarks qw(init_bookmarks); use File::Temp qw(tempfile); our $VERSION="0.5"; @@ -53,8 +54,6 @@ ); - - # # changes the default for a given question to a memorized value # @@ -78,6 +77,7 @@ my $progname = $main::0; my $cache; my %GUI_info; + my %addpris; $progname =~ s/([^a-zA-Z0-9])/'_' . ord($1)/eg; my $cachefile = "$ENV{HOME}/.GetoptLongGUI/$progname"; @@ -101,8 +101,7 @@ # Define the first screen $pris->{'screen' . $screencount} = - { title => "Options for $main::0", - }; + { title => "Options for $main::0", }; for (my $i = $st; $i <= $#opts; $i += $cb) { my ($spec, $desc, %rest); @@ -317,7 +316,7 @@ # include other primary information passed to us if (exists($GUI_info{'otherprimaries'})) { - %$pris = @{$GUI_info{'otherprimaries'}}; + %addpris = @{$GUI_info{'otherprimaries'}}; } # Prompt for remaining arguments (or don't if requested to @@ -325,7 +324,7 @@ # realm of the Getopt processing like file-names, etc. if ($GUI_info{'nootherargs'}) { push @{$pris->{'screen0'}{'questions'}}, - "", { type => 'hidden', name => '__otherargs' }; + { type => 'hidden', name => '__otherargs' }; } else { my $q = { type => 'text', width => 80, @@ -417,12 +416,12 @@ no_confirm => 1, title => $main::0); - # ... remember it ... $GUI_qw = $qw; # ... load in our other primaries ... $qw->merge_primaries(\%primaries); + $qw->merge_primaries(\%addpris); # ... and tell it to go $qw->magic('screen0', @{$GUI_info{'submodules'}}); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |