From de14f38ad4e95ab19e300c6e7d6cb5a1582fba91 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 4 Sep 2008 16:07:57 +0000 Subject: (mainwindow) by default do not enable to alter the 'update' flag (unless --expert is given) --- Rpmdrake/edit_urpm_sources.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Rpmdrake/edit_urpm_sources.pm') diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index fc618907..c04eb2be 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -51,6 +51,7 @@ my %col = ( is_update => 1, type => 2, name => 3, + activatable => 4 }, ); @@ -970,7 +971,7 @@ sub mainwindow() { ), ); - my $list = Gtk2::ListStore->new("Glib::Boolean", "Glib::Boolean", "Glib::String", "Glib::String"); + my $list = Gtk2::ListStore->new("Glib::Boolean", "Glib::Boolean", "Glib::String", "Glib::String", "Glib::Boolean"); $list_tv = Gtk2::TreeView->new_with_model($list); $list_tv->get_selection->set_mode('multiple'); my ($dw_button, $edit_button, $remove_button, $up_button); @@ -1016,7 +1017,7 @@ sub mainwindow() { ); $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Enabled"), my $tr = Gtk2::CellRendererToggle->new, 'active' => $col{mainw}{is_enabled})); - $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Updates"), my $cu = Gtk2::CellRendererToggle->new, 'active' => $col{mainw}{is_update})); + $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Updates"), my $cu = Gtk2::CellRendererToggle->new, 'active' => $col{mainw}{is_update}, activatable => $col{mainw}{activatable})); $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Type"), Gtk2::CellRendererText->new, 'text' => $col{mainw}{type})); $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Medium"), Gtk2::CellRendererText->new, 'text' => $col{mainw}{name})); @@ -1074,7 +1075,9 @@ sub mainwindow() { $list->append_set($col{mainw}{is_enabled} => !$_->{ignore}, $col{mainw}{is_update} => ! !$_->{update}, $col{mainw}{type} => get_medium_type($_), - $col{mainw}{name} => $name); + $col{mainw}{name} => $name, + $col{mainw}{activatable} => to_bool($::expert), + ); } $reorder_ok = 1; }; -- cgit v1.2.1