diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-01-07 18:43:12 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-01-07 18:43:12 +0100 |
commit | 7ed2c026ec660f95945545fd39a6f78b5a8f96c9 (patch) | |
tree | 03eb1de70c5b91a93730012c274bc51931e45e8e /modules/rpmdragora | |
parent | be1dcd0ca7de608b87fa1cdd93219ac026e2c5a5 (diff) | |
download | colin-keep-7ed2c026ec660f95945545fd39a6f78b5a8f96c9.tar colin-keep-7ed2c026ec660f95945545fd39a6f78b5a8f96c9.tar.gz colin-keep-7ed2c026ec660f95945545fd39a6f78b5a8f96c9.tar.bz2 colin-keep-7ed2c026ec660f95945545fd39a6f78b5a8f96c9.tar.xz colin-keep-7ed2c026ec660f95945545fd39a6f78b5a8f96c9.zip |
changed gurpmi to Moose and managed all the calls
Diffstat (limited to 'modules/rpmdragora')
-rwxr-xr-x | modules/rpmdragora/rpmdragora | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora index bc6f706..34b9fc8 100755 --- a/modules/rpmdragora/rpmdragora +++ b/modules/rpmdragora/rpmdragora @@ -254,6 +254,8 @@ sub _do_search($$$$$$) { my $vbox = $factory->createVBox($searchw); my $lblWIP = $factory->createLabel($vbox, $loc->N("Please wait, searching...")); my $searchprogress = $factory->createProgressBar($vbox, ''); + + my $replace_pnt = $factory->createReplacePoint($vbox); # my $stop_button = $factory->createIconButton($vbox,"",$loc->N("Stop")); #gtkadd( @@ -282,22 +284,25 @@ sub _do_search($$$$$$) { my $update_search_pb = sub { $progresscount++; my $val = int($progresscount * 100 / $total_size); - if (!($progresscount % 100)) { - $progresscount <= $total_size and $searchprogress->setValue($val); - $searchw->pollEvent() if $searchw->isTopmostDialog(); # refresh only if top most or crashing - } + $searchprogress->setValue($val); + $searchw->pollEvent() if $searchw->isTopmostDialog(); # refresh only if top most or crashing }; + my $gurpm; # per medium download progress bar (if needed) + my $_gurpm_clean_guard = MDK::Common::Func::before_leaving { undef $gurpm }; foreach my $medium (grep { !$_->{ignore} } @{$urpm->{media}}) { $searchstop and last; - my $gurpm; # per medium download progress bar (if needed) - my $_gurpm_clean_guard = MDK::Common::Func::before_leaving { undef $gurpm }; + my $xml_info_file = urpm::media::any_xml_info($urpm, $medium, ($current_search_type eq 'files' ? 'files' : 'info'), undef, sub { - $gurpm ||= AdminPanel::Rpmdragora::gurpm->new($loc->N("Please wait"), - transient => $::main_window); + $gurpm ||= AdminPanel::Rpmdragora::gurpm->new( + text => $loc->N("Please wait"), + main_dialog => $searchw, + parent => $replace_pnt, + ); + $gurpm->progress(0); download_callback($gurpm, @_) or do { $searchstop = 1; }; |