diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-10 16:47:25 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-10 16:47:25 +0000 |
commit | 6ba1c0fc17470a57ba43dd22bbdeac8002855718 (patch) | |
tree | 94cc76bb59d874104dcba2477f125072d2b420bc | |
parent | f4c637578e95ce4761696b911de5787c33cf8f31 (diff) | |
download | rpmdrake-6ba1c0fc17470a57ba43dd22bbdeac8002855718.tar rpmdrake-6ba1c0fc17470a57ba43dd22bbdeac8002855718.tar.gz rpmdrake-6ba1c0fc17470a57ba43dd22bbdeac8002855718.tar.bz2 rpmdrake-6ba1c0fc17470a57ba43dd22bbdeac8002855718.tar.xz rpmdrake-6ba1c0fc17470a57ba43dd22bbdeac8002855718.zip |
follow std button order (interface team request)
-rwxr-xr-x | rpmdrake | 6 | ||||
-rw-r--r-- | rpmdrake.pm | 15 |
2 files changed, 12 insertions, 9 deletions
@@ -88,7 +88,7 @@ sub wait_msg_ { wait_msg(@_, if_(exists $w->{rwindow}, transient $> and (interactive_msg_(N("Running in user mode"), N("You are launching this program as a normal user. You will not be able to perform modifications on the system, -but you may still browse the existing database."), yesno => 1, text => { yes => N("Ok"), no => N("Cancel") }) or myexit(0)); +but you may still browse the existing database."), yesno => 1, text => { no => N("Cancel"), yes => N("Ok") }) or myexit(0)); #- /usr/share/rpmlint/TagsCheck.py (duplicates are normal, so that we are not too far away from .py) @@ -511,7 +511,7 @@ or you already installed all of them.")); @deps > 0 or return 1; deps_msg_again: my $results = interactive_msg_($title, $msg . $formatlistpkg->(@deps), - yesno => [ N("Ok"), N("More info"), N("Cancel") ]); + yesno => [ N("Cancel"), N("More info"), N("Ok") ]); if ($results eq #-PO: Keep it short, this is gonna be on a button N("More info")) { @@ -1164,7 +1164,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( ask_for_medium => sub { interactive_msg_(N("Change medium"), N("Please insert the medium named \"%s\" on device [%s]", @_), - yesno => 1, text => { yes => N("Ok"), no => N("Cancel") }) }, + yesno => 1, text => { no => N("Cancel"), yes => N("Ok"), }) }, callback => sub { my ($mode, $file, $percent) = @_; if ($mode eq 'start') { diff --git a/rpmdrake.pm b/rpmdrake.pm index 1b9d1304..995f6628 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -118,10 +118,12 @@ sub interactive_msg { my $label = $_; gtksignal_connect(Gtk2::Button->new($label), clicked => sub { $d->{retval} = $label; Gtk2->main_quit }) } @{$options{yesno}} - : $options{yesno} ? (gtksignal_connect(Gtk2::Button->new($options{text}{yes} || N("Yes")), - clicked => sub { $d->{retval} = 1; Gtk2->main_quit }), - gtksignal_connect(Gtk2::Button->new($options{text}{no} || N("No")), - clicked => sub { $d->{retval} = 0; Gtk2->main_quit })) + : $options{yesno} ? ( + gtksignal_connect(Gtk2::Button->new($options{text}{no} || N("No")), + clicked => sub { $d->{retval} = 0; Gtk2->main_quit }), + gtksignal_connect(Gtk2::Button->new($options{text}{yes} || N("Yes")), + clicked => sub { $d->{retval} = 1; Gtk2->main_quit }), + ) : gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub { Gtk2->main_quit }) ))); $d->main; @@ -358,7 +360,7 @@ by Mandrake Linux Official Updates.")), return ''; $model and $w->{retval} = { sel => $model->get($iter, 0) }; } Gtk2->main_quit }) - } ([ N("Ok"), 1 ], [ N("Cancel"), 0 ])), + } ([ N("Cancel"), 0 ], [ N("Ok"), 1 ] )), )); my %roots; $tree_model->append_set($roots{$_->{land}} ||= $tree_model->append_set(undef, [ 0 => $_->{land} ]), @@ -463,12 +465,13 @@ sub update_sources_interactive { (@buttons = map { Gtk2::CheckButton->new($_->{name}) } @{$urpm->{media}}), Gtk2::HSeparator->new, gtkpack(create_hbox(), + gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $w->{retval} = 0; Gtk2->main_quit }), gtksignal_connect(Gtk2::Button->new(N("Update")), clicked => sub { $w->{retval} = any { $_->get_active } @buttons; @media = map_index { if_($_->get_active, $urpm->{media}[$::i]{name}) } @buttons; Gtk2->main_quit; }), - gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $w->{retval} = 0; Gtk2->main_quit })))); + ))); if ($w->main) { foreach (@{$urpm->{media}}) { #- force ignored media to be returned alive (forked from urpmi.updatemedia...) $_->{modified} and delete $_->{ignore}; |