Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/etk-perl/etk_test


Modified Files:
        etk_test.pl 


Log Message:
ProgressBar work + test

===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/etk_test/etk_test.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- etk_test.pl 7 Jun 2006 17:37:20 -0000       1.2
+++ etk_test.pl 7 Jun 2006 22:26:47 -0000       1.3
@@ -17,6 +17,7 @@
 use Etk::HSlider;
 use Etk::VSlider;
 use Etk::ProgressBar;
+use Etk::Timer;
 
 Etk::Init();
 
@@ -348,8 +349,28 @@
     my $pbar1 = Etk::ProgressBar->new("0% done");
     my $pbar2 = Etk::ProgressBar->new("Loading...");
     
+    $pbar2->PulseStepSet(0.015);
+    
     $vbox->PackStart($pbar1);
     $vbox->PackStart($pbar2);
+
+    my $timer1 = Etk::Timer->new(0.05, 
+       sub {
+           my $fraction = $pbar1->FractionGet();
+           $fraction += 0.01;
+           
+           $fraction = 0.0 if ($fraction > 1.0);
+           
+           $pbar1->TextSet(sprintf("%.0f%% done", $fraction * 100.0));
+           $pbar1->FractionSet($fraction);
+       }
+    );
+    
+    my $timer2 = Etk::Timer->new(0.025,
+       sub {
+           $pbar2->Pulse();
+       }
+    );
     
     $win->Add($vbox);
     $win->ShowAll();    




_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to