gurpm::RPMProgressDialog

Section: Mageia Package Management (3)
Updated: 2017-12-23
Page Index
 

SYNOPSIS

gurpm::RPMProgressDialog is a widget for gurpmi, rpmdrake (drakx already has its own) that presents a global progress bar.  

USAGE

How to use:

 my $w = gurpm::RPMProgressDialog->new:
 #$w->change_widget(Gtk3::Box->new);
 label(N("Preparing packages installation..."));
 ... # compute packages to install/remove...
 $w->init_progressbar;
 urpm::main_loop::run($urpm, $state, $nb, \@ask_unselect, {
       trans_log => \&gurpm::RPMProgressDialog::callback_download,
       pre_check_sig => \&gurpm::RPMProgressDialog::pre_check_sig,
       inst => \&gurpm::RPMProgressDialog::callback_inst,
       trans => \&gurpm::RPMProgressDialog::callback_inst,
       uninst => \&gurpm::RPMProgressDialog::callback_inst,
       ....

 

DESCRIPTION

 

Creators

gurpm::RPMProgressDialog->new($urpm, $o_quit)
Creates a new Progress Dialog.

Arguments are an urpm object and a quit routine reference.

 

Methods

change_widget($w, $box_widget)
Replaces the contents of the main window with the specified box (avoids popup multiplication)
label($w, $o_text)
sets the window to a please-wait message
init_progressbar($w)
Put a progress bar in the dialog.
set_progresslabel($w, $text)
Update the progress label
set_progressbar($w, $local_ratio)
Update the progress bar
validate_cancel($self, $cancel_msg, $cancel_cb)
Add a ``Cancel'' button, with $cancel_msg as label, calling $cancel_cb when clicked.
invalidate_cancel($self)
Disable the ``Cancel'' button if any.
invalidate_cancel($self)
Disable the ``Cancel'' button if any.
sync($w)
tell Gtk+ to refresh the dialog content if needed.
gurpm::RPMProgressDialog::get_something_done()
Whether some package has been installed or removed
canceled($w)
Whether downloading has been canceled or not.
 

Callbacks

callback_pre_check_sig()
This callback is called when checking packages before installing them.

Its purpose is to display installation progress in the dialog.

callback_inst($urpm, $type, $id, $subtype, $amount, $total)
This callback is called when a new RPM DB transaction is created and when packages are installed.

Its purpose is to display installation progress in the dialog.

callback_download($mode, $file, $percent, $total, $eta, $speed)
This callback is called when packages are downloaded prior being installed in a RPM transaction.

Its purpose is to display download progress in the dialog.

callback_cancel()
This callback is to be called when canceling packages download.
 

Copyright

Copyright (C) 2005 MandrakeSoft SA

Copyright (C) 2005-2010 Mandriva SA

Copyright (C) 2011-2017 Mageia


 

Index

SYNOPSIS
USAGE
DESCRIPTION
Creators
Methods
Callbacks
Copyright