aboutsummaryrefslogtreecommitdiffstats
path: root/modules/rpmdragora
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2015-02-04 23:04:29 +0100
committerAngelo Naselli <anaselli@linux.it>2015-02-04 23:04:29 +0100
commit8b85fcc404d91f96f88d13fdd6fcd6d78c7f123d (patch)
tree06a2e69bff89db07be765db1d2d4ec93d13ce08b /modules/rpmdragora
parent1cde30a15235efb8153632f4a52f5b9e25993826 (diff)
downloadmanatools-8b85fcc404d91f96f88d13fdd6fcd6d78c7f123d.tar
manatools-8b85fcc404d91f96f88d13fdd6fcd6d78c7f123d.tar.gz
manatools-8b85fcc404d91f96f88d13fdd6fcd6d78c7f123d.tar.bz2
manatools-8b85fcc404d91f96f88d13fdd6fcd6d78c7f123d.tar.xz
manatools-8b85fcc404d91f96f88d13fdd6fcd6d78c7f123d.zip
Fixed info message if empty package list
Diffstat (limited to 'modules/rpmdragora')
-rwxr-xr-xmodules/rpmdragora/dragoraUpdate26
1 files changed, 19 insertions, 7 deletions
diff --git a/modules/rpmdragora/dragoraUpdate b/modules/rpmdragora/dragoraUpdate
index b1ab4002..0261dc03 100755
--- a/modules/rpmdragora/dragoraUpdate
+++ b/modules/rpmdragora/dragoraUpdate
@@ -96,13 +96,7 @@ sub _refresh_packages_list {
$dialog->startMultipleChanges();
$packageTbl->deleteAllItems();
- if (!scalar(@requested)) {
- AdminPanel::rpmdragora::interactive_msg($loc->N("rpmdragora update"),
- $loc->N("The list of updates is empty. This means that either there is no available update for the packages installed on your computer, or you already installed all of them."),
- scroll => 1
- );
- }
- else {
+ if (scalar(@requested)) {
my $itemCollection = new yui::YItemCollection;
my $i = 0;
foreach (@requested) {
@@ -241,6 +235,7 @@ sub run_treeview_dialog {
my $hbox = $factory->createHBox( $vbox );
my $align = $factory->createLeft($hbox);
$hbox = $factory->createHBox($align);
+ $hbox->setWeight(0, 1);
my $helpButton = $factory->createPushButton($hbox, $loc->N("Help"));
my $aboutButton = $factory->createPushButton($hbox, $loc->N("About") );
@@ -252,6 +247,7 @@ sub run_treeview_dialog {
my $updateButton = $factory->createPushButton($hbox, $loc->N("Update"));
my $closeButton = $factory->createPushButton($hbox, $loc->N("Quit") );
$statusbar = $factory->createBusyIndicator($vbox, "" );
+ $statusbar->setWeight(0, 1);
my $info_options = {};
@@ -347,6 +343,14 @@ sub run_treeview_dialog {
my $res = do_action({ tree_mode => 'all_updates' }, $callback_action);
$initialized = 0 if !$res;
$num_pkgs = _refresh_packages_list($dialog, $packageTbl);
+ $infoBox->setValue("");
+ if ($num_pkgs) {
+ $item = $packageTbl->selectedItem();
+ if ($item) {
+ my $pkg = $data{$item->index()}{fullname};
+ AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox);
+ }
+ }
}
elsif ($widget == $helpButton) {
}
@@ -357,6 +361,14 @@ sub run_treeview_dialog {
$dialog->destroy();
+ if (!$num_pkgs) {
+ AdminPanel::rpmdragora::interactive_msg(
+ $loc->N("rpmdragora update"),
+ $loc->N("The list of updates is empty. This means that either there is no available update for the packages installed on your computer, or you already installed all of them."),
+ scroll => 1
+ );
+ }
+
#restore old application title
yui::YUI::app()->setApplicationTitle($appTitle) if $appTitle;