aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-10 17:05:57 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-10 17:05:57 +0000
commit06462e65f1f45943cabaf3ee49f7ce1c8f9b9c0e (patch)
tree28ce77671672f82de34993273a06dd7ce66fb1b9
parentebe0d5e6c035d1ea98a00abdebe51e8e978323fe (diff)
downloadrpmdrake-06462e65f1f45943cabaf3ee49f7ce1c8f9b9c0e.tar
rpmdrake-06462e65f1f45943cabaf3ee49f7ce1c8f9b9c0e.tar.gz
rpmdrake-06462e65f1f45943cabaf3ee49f7ce1c8f9b9c0e.tar.bz2
rpmdrake-06462e65f1f45943cabaf3ee49f7ce1c8f9b9c0e.tar.xz
rpmdrake-06462e65f1f45943cabaf3ee49f7ce1c8f9b9c0e.zip
add GUI interface for auto option (#16093)
-rwxr-xr-xrpmdrake14
1 files changed, 14 insertions, 0 deletions
diff --git a/rpmdrake b/rpmdrake
index f953992c..5ebcb50f 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -340,6 +340,8 @@ sub run_treeview_dialog {
my $status = gtknew('Label');
my $checkbox_show_autoselect;
+ my %check_boxes;
+ my $auto_string = N("/_Options") . N("/_Auto solve dependancies");
my ($menu, $factory) = create_factory_menu(
$w->{real_window},
[ N("/_File"), undef, undef, undef, '<Branch>' ],
@@ -382,6 +384,9 @@ sub run_treeview_dialog {
#[ N("/_View"), undef, undef, undef, '<Branch>' ],
if_(!$>,
[ N("/_Options"), undef, undef, undef, '<Branch>' ],
+ [ $auto_string, undef, sub {
+ $urpm->{options}{auto} = $::options{auto} = $check_boxes{$auto_string}->get_active if $check_boxes{$auto_string};
+ }, undef, '<CheckItem>' ],
[ N("/_Options") . N("/_Media Manager"), undef, sub {
require Rpmdrake::edit_urpm_sources;
Rpmdrake::edit_urpm_sources::run() and $rmodes{pkgs_provider({ skip_updating_mu => 1 }, $options->{tree_mode})};
@@ -416,6 +421,15 @@ sub run_treeview_dialog {
]
);
+
+ # to retrieve a path, one must prevent "accelerators completion":
+ my $get_path = sub { return join('', map { my $i = $_; $i =~ s/_//g; print ">> $i\n"; $i } @_) };
+
+ %check_boxes = map {
+ $_ => $factory->get_widget("<main>" . $get_path->($auto_string));
+ } ($auto_string);
+ $check_boxes{$auto_string}->set_active($::options{auto});
+
$checkbox_show_autoselect = $factory->get_widget("<main>" . strip_first_underscore(N("/_Options"), N("/_Show automatically selected packages")))
and $checkbox_show_autoselect->set_active(!$dont_show_selections);
gtkadd(