~ubuntu-branches/ubuntu/gutsy/horae/gutsy

« back to all changes in this revision

Viewing changes to 0CPAN/Tk-Splashscreen-1.0/splashscreen.pl

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2006-12-28 12:36:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061228123648-9xnjr76wfthd92cq
Tags: 064-1
New upstream release, dropped dependency on libtk-filedialog-perl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/local/bin/perl -w
2
 
use Tk;
3
 
use lib './blib/lib'; use Tk::Splashscreen;
4
 
use Tk::widgets qw/Photo Animation/;
5
 
use strict;
6
 
 
7
 
my $mw = MainWindow->new;
8
 
$mw->withdraw;
9
 
$mw->Button(-text => 'Quit', -command => \&exit)->pack;
10
 
 
11
 
 
12
 
my $splash = $mw->Splashscreen(-milliseconds => 5000);
13
 
 
14
 
my $animate;
15
 
my $gif89 = Tk->findINC('anim.gif');
16
 
$animate = $splash->Animation(-format => 'gif', -file => $gif89);
17
 
$splash->Label(-image => $animate)->pack;
18
 
$animate->set_image(0);
19
 
$animate->start_animation(500);
20
 
 
21
 
$splash->Splash;                # show Splashscreen
22
 
 
23
 
$mw->after(1000);
24
 
$| = 1;
25
 
print STDOUT "Waiting for Splashscreen to finish ...\n";
26
 
 
27
 
$splash->Destroy;               # tear down Splashscreen
28
 
 
29
 
$mw->deiconify;                 # show calculator
30
 
 
31
 
MainLoop;