xmltv/lib/Ask Term.pm,1.4,1.5 Tk.pm,1.4,1.5

Nick Morrott <[email protected]> Sun, 12 Jul 2015 00:59:04 +0000
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/lib/Ask
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21723/lib/Ask

Modified Files:
	Term.pm Tk.pm 
Log Message:
Whitespace: remove trailing whitespace

Index: Tk.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Ask/Tk.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Tk.pm	9 Sep 2004 08:25:38 -0000	1.4
--- Tk.pm	12 Jul 2015 00:59:01 -0000	1.5
***************
*** 21,25 ****
  my $main_window;
  my $top_frame;
! my $middle_frame; 
  my $bottom_frame;
  my $mid_bottom_frame;
--- 21,25 ----
  my $main_window;
  my $top_frame;
! my $middle_frame;
  my $bottom_frame;
  my $mid_bottom_frame;
***************
*** 37,43 ****
  
          my $textbox;
!         
          $main_window = MainWindow->new;
!         
          $main_window->title("Question");
          $main_window->minsize(qw(400 250));
--- 37,43 ----
  
          my $textbox;
! 
          $main_window = MainWindow->new;
! 
          $main_window->title("Question");
          $main_window->minsize(qw(400 250));
***************
*** 47,62 ****
          $middle_frame = $main_window->Frame()->pack;
          $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
! 	
          $top_frame->Label(-height => 2)->pack;
! 	
          $top_frame->Label(-text => $question)->pack;
  
          my $ans;
!         
          $bottom_frame->Button(-text    => "OK",
  			  -command => sub {$ans = $textbox->get(); $main_window->destroy;},
  			  -width    => 10
  			 )->pack(-padx => 2, -pady => 4);
!         
          if (defined $show) {
              $textbox = $middle_frame->Entry(-show => $show)->pack();
--- 47,62 ----
          $middle_frame = $main_window->Frame()->pack;
          $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
! 
          $top_frame->Label(-height => 2)->pack;
! 
          $top_frame->Label(-text => $question)->pack;
  
          my $ans;
! 
          $bottom_frame->Button(-text    => "OK",
  			  -command => sub {$ans = $textbox->get(); $main_window->destroy;},
  			  -width    => 10
  			 )->pack(-padx => 2, -pady => 4);
! 
          if (defined $show) {
              $textbox = $middle_frame->Entry(-show => $show)->pack();
***************
*** 66,70 ****
          }
          MainLoop();
! 	
          return $ans;
  }
--- 66,70 ----
          }
          MainLoop();
! 
          return $ans;
  }
***************
*** 110,116 ****
  sub ask_boolean( $$$ ) {
          shift;
!         my ($text, $default) = @_;	
          t "asking question $text, default $default";
! 	
          $main_window = MainWindow->new;
  
--- 110,116 ----
  sub ask_boolean( $$$ ) {
          shift;
!         my ($text, $default) = @_;
          t "asking question $text, default $default";
! 
          $main_window = MainWindow->new;
  
***************
*** 122,141 ****
          $middle_frame = $main_window->Frame()->pack;
          $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
! 	
          $top_frame->Label(-height => 2)->pack;
          $top_frame->Label(-text => $text)->pack;
! 	
          my $ans = 0;
!   
          $bottom_frame->Button(-text    => "Yes",
  			  -command => sub { $ans = 1; $main_window->destroy; },
  			  -width => 10,
  			 )->pack(-side => 'left', -padx => 2, -pady => 4);
! 	
          $bottom_frame->Button(-text    => "No",
  			  -command => sub { $ans = 0; $main_window->destroy; },
  			  -width => 10
  			 )->pack(-side => 'left', -padx => 2, -pady => 4);
! 	
          MainLoop();
  
--- 122,141 ----
          $middle_frame = $main_window->Frame()->pack;
          $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
! 
          $top_frame->Label(-height => 2)->pack;
          $top_frame->Label(-text => $text)->pack;
! 
          my $ans = 0;
! 
          $bottom_frame->Button(-text    => "Yes",
  			  -command => sub { $ans = 1; $main_window->destroy; },
  			  -width => 10,
  			 )->pack(-side => 'left', -padx => 2, -pady => 4);
! 
          $bottom_frame->Button(-text    => "No",
  			  -command => sub { $ans = 0; $main_window->destroy; },
  			  -width => 10
  			 )->pack(-side => 'left', -padx => 2, -pady => 4);
! 
          MainLoop();
  
***************
*** 169,173 ****
  
          return if not @options;
! 	
          my $select_all_button;
          my $select_none_button;
--- 169,173 ----
  
          return if not @options;
! 
          my $select_all_button;
          my $select_none_button;
***************
*** 175,179 ****
          my $listbox;
          my $i;
! 	
          $main_window = MainWindow->new;
  
--- 175,179 ----
          my $listbox;
          my $i;
! 
          $main_window = MainWindow->new;
  
***************
*** 184,188 ****
          $top_frame    = $main_window->Frame()->pack;
          $middle_frame = $main_window->Frame()->pack(-fill => 'both');
! 	
          $top_frame->Label(-height => 2)->pack;
  
--- 184,188 ----
          $top_frame    = $main_window->Frame()->pack;
          $middle_frame = $main_window->Frame()->pack(-fill => 'both');
! 
          $top_frame->Label(-height => 2)->pack;
  
***************
*** 192,205 ****
  
          $listbox->insert(0, @options);
! 	
          if ($allowedMany) {
                  $listbox->configure( -selectmode => 'multiple' );
! 		
                  if ($default) {
                          $listbox->selectionSet( 0, 'end' );
                  }
! 		
                  $mid_bottom_frame = $main_window->Frame()->pack();
! 	
  	        $select_all_button = $mid_bottom_frame->Button
                          (-text => 'Select All',
--- 192,205 ----
  
          $listbox->insert(0, @options);
! 
          if ($allowedMany) {
                  $listbox->configure( -selectmode => 'multiple' );
! 
                  if ($default) {
                          $listbox->selectionSet( 0, 'end' );
                  }
! 
                  $mid_bottom_frame = $main_window->Frame()->pack();
! 
  	        $select_all_button = $mid_bottom_frame->Button
                          (-text => 'Select All',
***************
*** 207,211 ****
                          -width => 10,
                          )->pack(-side => 'left');
! 	
  	        $select_none_button = $mid_bottom_frame->Button
                          (-text => 'Select None',
--- 207,211 ----
                          -width => 10,
                          )->pack(-side => 'left');
! 
  	        $select_none_button = $mid_bottom_frame->Button
                          (-text => 'Select None',
***************
*** 218,233 ****
                  $listbox->selectionSet(_index_array($default, @options));
          }
! 	
          $listbox->pack(-fill => 'x', -padx => '5', -pady => '2');
! 	
          $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
! 	
          my @cursel;
!   
          $bottom_frame->Button(-text    => 'OK',
  			  -command => sub { @cursel = $listbox->curselection; $main_window->destroy; },
  			  -width    => 10,
  			 )->pack(-padx => 2, -pady => 4);
!         
          MainLoop();
  
--- 218,233 ----
                  $listbox->selectionSet(_index_array($default, @options));
          }
! 
          $listbox->pack(-fill => 'x', -padx => '5', -pady => '2');
! 
          $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
! 
          my @cursel;
! 
          $bottom_frame->Button(-text    => 'OK',
  			  -command => sub { @cursel = $listbox->curselection; $main_window->destroy; },
  			  -width    => 10,
  			 )->pack(-padx => 2, -pady => 4);
! 
          MainLoop();
  
***************
*** 247,251 ****
                  }
  
!                 return @choices;	
          }
          else {
--- 247,251 ----
                  }
  
!                 return @choices;
          }
          else {
***************
*** 262,266 ****
          shift;
          my $question = shift;
! 	
          $main_window = MainWindow->new;
  
--- 262,266 ----
          shift;
          my $question = shift;
! 
          $main_window = MainWindow->new;
  
***************
*** 272,284 ****
          $middle_frame = $main_window->Frame()->pack;
          $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
! 	
          $top_frame->Label(-height => 2)->pack;
          $top_frame->Label(-text => $question)->pack;
! 	
          $bottom_frame->Button(-text    => "OK",
  			  -command => sub { $main_window->destroy; },
  			  -width    => 10,
  			 )->pack(-padx => 2, -pady => 4);
! 	
          MainLoop();
  }
--- 272,284 ----
          $middle_frame = $main_window->Frame()->pack;
          $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
! 
          $top_frame->Label(-height => 2)->pack;
          $top_frame->Label(-text => $question)->pack;
! 
          $bottom_frame->Button(-text    => "OK",
  			  -command => sub { $main_window->destroy; },
  			  -width    => 10,
  			 )->pack(-padx => 2, -pady => 4);
! 
          MainLoop();
  }
***************
*** 294,302 ****
          my $s=shift;
          my @array = @_;
! 	
          for (my $i = 0; $i < $#array; $i++) {
                  return $i if $array[$i] eq $s;
          }
! 	
          return -1;
  }
--- 294,302 ----
          my $s=shift;
          my @array = @_;
! 
          for (my $i = 0; $i < $#array; $i++) {
                  return $i if $array[$i] eq $s;
          }
! 
          return -1;
  }

Index: Term.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Ask/Term.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Term.pm	20 May 2008 02:20:44 -0000	1.4
--- Term.pm	12 Jul 2015 00:59:01 -0000	1.5
***************
*** 35,39 ****
  # Returns the text entered by the user.
  sub ask( $$ )
! {       
          shift;
          my $prompt = shift;
--- 35,39 ----
  # Returns the text entered by the user.
  sub ask( $$ )
! {
          shift;
          my $prompt = shift;
***************
*** 56,61 ****
  # Returns the text entered by the user.
  sub ask_password( $$ )
! {       
!     
          shift;
          my $prompt = shift;
--- 56,61 ----
  # Returns the text entered by the user.
  sub ask_password( $$ )
! {
! 
          shift;
          my $prompt = shift;


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/