xmltv/lib ProgressBar.pm,1.2,1.3

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

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

Index: ProgressBar.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/ProgressBar.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ProgressBar.pm	12 Jul 2015 00:59:01 -0000	1.2
--- ProgressBar.pm	12 Jul 2015 03:26:15 -0000	1.3
***************
*** 10,22 ****
  # Use Log::TraceMessages if installed.
  BEGIN {
!      eval { require Log::TraceMessages };
!      if ($@) {
!           *t = sub {};
!           *d = sub { '' };
!      }
!      else {
!           *t = \&Log::TraceMessages::t;
!           *d = \&Log::TraceMessages::d;
!      }
  }
  
--- 10,22 ----
  # Use Log::TraceMessages if installed.
  BEGIN {
!     eval { require Log::TraceMessages };
!     if ($@) {
!          *t = sub {};
!          *d = sub { '' };
!     }
!     else {
!          *t = \&Log::TraceMessages::t;
!          *d = \&Log::TraceMessages::d;
!     }
  }
  
***************
*** 26,43 ****
  # Must be called before we use this module if we want to use a gui.
  sub init( $ ) {
!      my $opt_gui = shift;
  
!      # Ask the XMLTV::GUI module for the graphics type we will use
!      my $gui_type = XMLTV::GUI::get_gui_type($opt_gui);
  
!      if ($gui_type eq 'term') {
!           $real_class = 'XMLTV::ProgressBar::None';
!      } elsif ($gui_type eq 'term+progressbar') {
!           $real_class = 'XMLTV::ProgressBar::Term';
!      } elsif ($gui_type eq 'tk') {
!           $real_class = 'XMLTV::ProgressBar::Tk';
!      } else {
!           die "Unknown gui type: '$gui_type'.";
!      }
  }
  
--- 26,43 ----
  # Must be called before we use this module if we want to use a gui.
  sub init( $ ) {
!     my $opt_gui = shift;
  
!     # Ask the XMLTV::GUI module for the graphics type we will use
!     my $gui_type = XMLTV::GUI::get_gui_type($opt_gui);
  
!     if ($gui_type eq 'term') {
!          $real_class = 'XMLTV::ProgressBar::None';
!     } elsif ($gui_type eq 'term+progressbar') {
!          $real_class = 'XMLTV::ProgressBar::Term';
!     } elsif ($gui_type eq 'tk') {
!          $real_class = 'XMLTV::ProgressBar::Tk';
!     } else {
!          die "Unknown gui type: '$gui_type'.";
!     }
  }
  
***************
*** 49,63 ****
  # ignored in some of the implementations.
  sub new {
!      my $class = shift;
  
!      ((my $real_class_path = $real_class.".pm") =~ s/::/\//g);
  
!      require $real_class_path;
!      import $real_class_path;
  
!      $bar = $real_class->new(@_);
  
!      my $self = {};
!      return bless $self, $class;
  }
  
--- 49,63 ----
  # ignored in some of the implementations.
  sub new {
!     my $class = shift;
  
!     ((my $real_class_path = $real_class.".pm") =~ s/::/\//g);
  
!     require $real_class_path;
!     import $real_class_path;
  
!     $bar = $real_class->new(@_);
  
!     my $self = {};
!     return bless $self, $class;
  }
  
***************
*** 67,72 ****
  # If no value is given, the value will be incremented by 1.
  sub update {
!      my $self = shift;
!      return $bar->update( @_ );
  }
  
--- 67,72 ----
  # If no value is given, the value will be incremented by 1.
  sub update {
!     my $self = shift;
!     return $bar->update( @_ );
  }
  
***************
*** 74,81 ****
  sub finish {
  
!      # Only does anything for the GUI ones.
!      if ($real_class eq 'XMLTV::ProgressBar::Tk') {
!           return $bar->finish();
!      }
  }
  
--- 74,81 ----
  sub finish {
  
!     # Only does anything for the GUI ones.
!     if ($real_class eq 'XMLTV::ProgressBar::Tk') {
!          return $bar->finish();
!     }
  }
  


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