aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/edit_urpm_sources.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-02-22 11:29:13 +0000
committerThierry Vignaud <tv@mandriva.org>2007-02-22 11:29:13 +0000
commit43adf536384a22be9605816e607d227cf77ca8ba (patch)
treef4877894901cb4cd381ce80cbb548da73d4ed3c4 /Rpmdrake/edit_urpm_sources.pm
parent5eefce86e92a60a783168453d6aac8184fda17be (diff)
downloadrpmdrake-43adf536384a22be9605816e607d227cf77ca8ba.tar
rpmdrake-43adf536384a22be9605816e607d227cf77ca8ba.tar.gz
rpmdrake-43adf536384a22be9605816e607d227cf77ca8ba.tar.bz2
rpmdrake-43adf536384a22be9605816e607d227cf77ca8ba.tar.xz
rpmdrake-43adf536384a22be9605816e607d227cf77ca8ba.zip
(mainwindow) make "remove" button insensitive if no selection
Diffstat (limited to 'Rpmdrake/edit_urpm_sources.pm')
-rwxr-xr-xRpmdrake/edit_urpm_sources.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index 56cf92e5..18723f46 100755
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -893,9 +893,10 @@ sub mainwindow() {
my $list = Gtk2::ListStore->new("Glib::Boolean", "Glib::Boolean", "Glib::String");
$list_tv = Gtk2::TreeView->new_with_model($list);
$list_tv->get_selection->set_mode('browse');
- my ($up_button, $dw_button);
+ my ($up_button, $dw_button, $remove_button);
$list_tv->get_selection->signal_connect(changed => sub {
my ($model, $iter) = $_[0]->get_selected;
+ $remove_button and $remove_button->set_sensitive(defined $iter);
return if !$iter;
my $curr_path = $model->get_path($iter);
my $first_path = $model->get_path($model->get_iter_first);
@@ -993,7 +994,7 @@ sub mainwindow() {
0, gtkpack__(
gtknew('VBox', spacing => 5),
gtksignal_connect(
- Gtk2::Button->new(but(N("Remove"))),
+ $remove_button = Gtk2::Button->new(but(N("Remove"))),
clicked => sub { remove_callback() and $reread_media->() },
),
gtksignal_connect(