xmltv/lib/ProgressBar Tk.pm,1.2,1.3

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

Modified Files:
	Tk.pm 
Log Message:
4 space indents

Index: Tk.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/ProgressBar/Tk.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Tk.pm	12 Jul 2015 00:59:02 -0000	1.2
--- Tk.pm	12 Jul 2015 04:25:47 -0000	1.3
***************
*** 14,23 ****
  sub new {
  
!         my $class = shift;
!         my $self = {};
  
!         bless $self, $class;
  
!         $self->_init(@_);
  
  }
--- 14,23 ----
  sub new {
  
!     my $class = shift;
!     my $self = {};
  
!     bless $self, $class;
  
!     $self->_init(@_);
  
  }
***************
*** 25,71 ****
  sub _init {
  
!         my $self = shift;
  
!         # Term::ProgressBar V1 Compatibility
!         if (@_==2) {
  
!                 return $self->_init({count      => $_[1], name => $_[0],
!                       term_width => 50,    bar_width => 50,
!                       major_char => '#',   minor_char => '',
!                       lbrack     => '',    rbrack     => '',
!                       term       => 0, })
  
!         }
  
!         my %params = %{$_[0]};
  
!         my $main_window = MainWindow->new;
  
!         $main_window->title("Please Wait");
!         $main_window->minsize(qw(400 250));
!         $main_window->geometry('+250+150');
  
!         my $top_frame    = $main_window->Frame()->pack;
!         my $middle_frame = $main_window->Frame()->pack( -fill => "x" );
!         my $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!         $top_frame->Label(-height => 2)->pack;
  
!         $top_frame->Label(-text => $params{name})->pack;
  
!         my $tk_progressbar = $middle_frame->ProgressBar(
!               -width => 20,
!               -height => 300,
!               -from => 0,
!               -to => $params{count},
!               -variable => \$unused
!               )->pack( -fill=>"x", -pady => 24, -padx => 8 );
  
!         $self->{main_window} = $main_window;
!         $self->{tk_progressbar} = $tk_progressbar;
  
!         $main_window->update();
  
!         return $self;
  
  }
--- 25,71 ----
  sub _init {
  
!     my $self = shift;
  
!     # Term::ProgressBar V1 Compatibility
!     if (@_==2) {
  
!         return $self->_init({count      => $_[1], name => $_[0],
!                              term_width => 50,    bar_width => 50,
!                              major_char => '#',   minor_char => '',
!                              lbrack     => '',    rbrack     => '',
!                              term       => 0, })
  
!     }
  
!     my %params = %{$_[0]};
  
!     my $main_window = MainWindow->new;
  
!     $main_window->title("Please Wait");
!     $main_window->minsize(qw(400 250));
!     $main_window->geometry('+250+150');
  
!     my $top_frame    = $main_window->Frame()->pack;
!     my $middle_frame = $main_window->Frame()->pack( -fill => "x" );
!     my $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!     $top_frame->Label(-height => 2)->pack;
  
!     $top_frame->Label(-text => $params{name})->pack;
  
!     my $tk_progressbar = $middle_frame->ProgressBar(
!           -width => 20,
!           -height => 300,
!           -from => 0,
!           -to => $params{count},
!           -variable => \$unused
!           )->pack( -fill=>"x", -pady => 24, -padx => 8 );
  
!     $self->{main_window} = $main_window;
!     $self->{tk_progressbar} = $tk_progressbar;
  
!     $main_window->update();
  
!     return $self;
  
  }
***************
*** 73,89 ****
  sub update {
  
!         my $self = shift;
  
!         my $set_to_value = shift;
  
!         if (not $set_to_value) {
  
!                 $set_to_value = $self->{tk_progressbar}->value + 1;
  
!         }
  
!         $self->{tk_progressbar}->value( $set_to_value );
  
!         $self->{main_window}->update();
  
  }
--- 73,89 ----
  sub update {
  
!     my $self = shift;
  
!     my $set_to_value = shift;
  
!     if (not $set_to_value) {
  
!         $set_to_value = $self->{tk_progressbar}->value + 1;
  
!     }
  
!     $self->{tk_progressbar}->value( $set_to_value );
  
!     $self->{main_window}->update();
  
  }
***************
*** 91,97 ****
  sub finish {
  
!         my $self = shift;
  
!         $self->{main_window}->destroy();
  
  }
--- 91,97 ----
  sub finish {
  
!     my $self = shift;
  
!     $self->{main_window}->destroy();
  
  }


------------------------------------------------------------------------------
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/