App-CPAN2Pkg
view release on metacpan or search on metacpan
lib/App/CPAN2Pkg/Lock.pm
lib/App/CPAN2Pkg/Module.pm
lib/App/CPAN2Pkg/Repository.pm
lib/App/CPAN2Pkg/Types.pm
lib/App/CPAN2Pkg/UI/Text.pm
lib/App/CPAN2Pkg/UI/Tk.pm
lib/App/CPAN2Pkg/Utils.pm
lib/App/CPAN2Pkg/Worker.pm
lib/App/CPAN2Pkg/Worker/Mageia.pm
lib/App/CPAN2Pkg/Worker/RPM.pm
share/bullets/black.png
share/bullets/blue.png
share/bullets/green.png
share/bullets/orange.png
share/bullets/pink.png
share/bullets/purple.png
share/bullets/red.png
share/bullets/yellow.png
share/icon-mask.xbm
share/icon.png
t/00-compile.t
t/000-report-versions-tiny.t
t/lock.t
t/release-pod-coverage.t
t/release-pod-syntax.t
weaver.ini
name = App-CPAN2Pkg
author = Jerome Quelin <jquelin@gmail.com>
license = Perl_5
copyright_holder = Jerome Quelin
copyright_year = 2009
[Encoding]
encoding = bytes
filename = share/icon.png
filename = share/bullets/black.png
filename = share/bullets/blue.png
filename = share/bullets/green.png
filename = share/bullets/orange.png
filename = share/bullets/pink.png
filename = share/bullets/purple.png
filename = share/bullets/red.png
filename = share/bullets/yellow.png
[Prereqs]
POE::Loop::Tk = 0 ; tk event loop now released outside of poe
[@Author::JQUELIN]
Test::Compile.skip = .*
lib/App/CPAN2Pkg/UI/Tk.pm view on Meta::CPAN
importing => "purple",
building => "orange",
installing => "blue",
available => "green",
error => "red",
);
my $colorl = $color{ $module->local->status };
my $coloru = $color{ $module->upstream->status };
# update bullets
my $bulletl = _image( $SHAREDIR->file("bullets", "$colorl.png") );
my $bulletu = _image( $SHAREDIR->file("bullets", "$coloru.png") );
$hlist->itemConfigure( $elem, 0, -image=>$bulletl );
$hlist->itemConfigure( $elem, 1, -image=>$bulletu );
# $self->_w( "btn_close_$modname" )->configure( enabled )
# if $module->local->status eq 'available'
# && $module->upstream->status eq 'available';
$hlist->update;
# allow user to mark a module as available
lib/App/CPAN2Pkg/UI/Tk.pm view on Meta::CPAN
my ($self, $module) = @_[OBJECT, ARG0];
my $modname = $module->name;
# calculate module position in the list
my $hlist = $self->_w('hlist');
my @children = $hlist->info( 'children' );
my $next = first { $hlist->info(data=>$_) gt $modname } @children;
my @pos = defined $next ? ( -before => $next ) : ( -at => -1 );
# create module in the list
my $bullet = _image( $SHAREDIR->file("bullets", "black.png") );
my $elem = $hlist->addchild( "", -data=>$modname, @pos );
$hlist->itemCreate( $elem, 0, -itemtype => 'image', -image=>$bullet );
$hlist->itemCreate( $elem, 1, -itemtype => 'image', -image=>$bullet );
$hlist->itemCreate( $elem, 2, -itemtype => 'text', -text=>$modname );
$hlist->see( $elem );
# create new pane in the notebook
my $nb = $self->_w('notebook');
my $pane = $nb->add( $modname, -label=>$modname );
$nb->raise( $modname );
lib/App/CPAN2Pkg/UI/Tk.pm view on Meta::CPAN
# hide window during its creation to avoid flickering
$mw->withdraw;
# prettyfying tk app.
# see http://www.perltk.org/index.php?option=com_content&task=view&id=43&Itemid=37
$mw->optionAdd('*BorderWidth' => 1);
# set windowtitle
$mw->title('cpan2pkg');
$mw->iconimage( _image( $SHAREDIR->file('icon.png') ) );
$mw->iconmask ( '@' . $SHAREDIR->file('icon-mask.xbm') );
# make sure window is big enough
#my $config = Games::Pandemic::Config->instance;
#my $width = $config->get( 'win_width' );
#my $height = $config->get( 'win_height' );
#$mw->geometry($width . 'x' . $height);
# the tooltip
$self->_set_w('tooltip', $mw->Balloon);
lib/App/CPAN2Pkg/UI/Tk.pm view on Meta::CPAN
my @lab1 = ( 'not started', 'not available', 'building', 'installing', 'available', 'error' );
my @col1 = qw{ black yellow orange blue green red };
my @lab2 = ( 'not started', 'not available', 'importing', 'building', 'available', 'error' );
my @col2 = qw{ black yellow purple orange green red };
$legend->Label( -text => 'Local' )
->grid( -row => 0, -column => 0, -columnspan=>2, -sticky => 'w' );
$legend->Label( -text => 'Build System' )
->grid( -row => 0, -column => 2, -columnspan=>2,-sticky => 'w' );
my $buldir = $SHAREDIR->subdir( 'bullets' );
foreach my $i ( 0 .. $#lab1 ) {
$legend->Label( -image => _image( $buldir->file( $col1[$i] . ".png" ) ) )
->grid( -row => $i + 1, -column => 0, ipad5 );
$legend->Label( -image => _image( $buldir->file( $col2[$i] . ".png" ) ) )
->grid( -row => $i + 1, -column => 2, ipad5 );
$legend->Label( -text => $lab1[$i] )->grid( -row=>$i+1, -column=>1, -sticky => 'w' );
$legend->Label( -text => $lab2[$i] )->grid( -row=>$i+1, -column=>3, -sticky => 'w' );
}
}
# -- private subs
( run in 2.509 seconds using v1.01-cache-2.11-cpan-df04353d9ac )