aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-07-20 15:52:56 +0200
committerAngelo Naselli <anaselli@linux.it>2014-07-20 15:52:56 +0200
commit2ea82cdabc988bf6dbaacd0ff6943489e0fdd6f4 (patch)
tree6f4489f773619743c8676aec953f1e005a541012 /lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm
parent9faf6d26127d3799f9b559c695661e4ffa112325 (diff)
downloadcolin-keep-2ea82cdabc988bf6dbaacd0ff6943489e0fdd6f4.tar
colin-keep-2ea82cdabc988bf6dbaacd0ff6943489e0fdd6f4.tar.gz
colin-keep-2ea82cdabc988bf6dbaacd0ff6943489e0fdd6f4.tar.bz2
colin-keep-2ea82cdabc988bf6dbaacd0ff6943489e0fdd6f4.tar.xz
colin-keep-2ea82cdabc988bf6dbaacd0ff6943489e0fdd6f4.zip
Managed selection changed also after removing from list
(buttons enabling)
Diffstat (limited to 'lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm')
-rw-r--r--lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm27
1 files changed, 16 insertions, 11 deletions
diff --git a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm
index df0d4e1..d0475b1 100644
--- a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm
+++ b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm
@@ -1532,6 +1532,7 @@ sub mainwindow() {
my $event = $dialog->waitForEvent();
my $eventType = $event->eventType();
my $changed = 0;
+ my $selection_changed = 0;
#event type checking
if ($eventType == $yui::YEvent::CancelEvent) {
@@ -1668,17 +1669,7 @@ sub mainwindow() {
$changed = easy_add_callback();
}
elsif ($widget == $mirrorTbl) {
- my $sel = $mirrorTbl->selectedItems();
- if ($sel->size() > 1 ) {
- $edtButton->setEnabled(0);
- $upButton->setEnabled(0);
- $downButton->setEnabled(0);
- }
- else {
- $edtButton->setEnabled(1);
- $upButton->setEnabled(1);
- $downButton->setEnabled(1);
- }
+ $selection_changed = 1;
}
}
if ($changed) {
@@ -1696,6 +1687,20 @@ sub mainwindow() {
$dialog->doneMultipleChanges();
yui::YUI::ui()->unblockEvents();
yui::YUI::app()->normalCursor();
+ $selection_changed = 1;
+ }
+ if ($selection_changed) {
+ my $sel = $mirrorTbl->selectedItems();
+ if ($sel->size() > 1 ) {
+ $edtButton->setEnabled(0);
+ $upButton->setEnabled(0);
+ $downButton->setEnabled(0);
+ }
+ else {
+ $edtButton->setEnabled(1);
+ $upButton->setEnabled(1);
+ $downButton->setEnabled(1);
+ }
}
}
$dialog->destroy();