summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-03-03 15:35:38 +0000
committerThierry Vignaud <tv@mandriva.org>2008-03-03 15:35:38 +0000
commit20e57b7b9cbc50127a52373bdff3daed3a96fd79 (patch)
treeb842909216cc7fb6b4457c8ff3197f73ba8900dd
parent2bda6c7a9d5b16ba26ee71e4459a4dcc9deb8a07 (diff)
downloadurpmi-20e57b7b9cbc50127a52373bdff3daed3a96fd79.tar
urpmi-20e57b7b9cbc50127a52373bdff3daed3a96fd79.tar.gz
urpmi-20e57b7b9cbc50127a52373bdff3daed3a96fd79.tar.bz2
urpmi-20e57b7b9cbc50127a52373bdff3daed3a96fd79.tar.xz
urpmi-20e57b7b9cbc50127a52373bdff3daed3a96fd79.zip
give the focus to buttons (Emmanuel Blindauer, #38047)
-rw-r--r--NEWS1
-rwxr-xr-xgurpmi25
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 7d603c85..1374c121 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
o exit immediately on success in automatic mode
o fix --auto-select option
o fix --root option
+ o give the focus to buttons (Emmanuel Blindauer, #38047)
o handle --expect-install
o handle --allow-medium-change
o reuse common shared code of urpmi
diff --git a/gurpmi2 b/gurpmi2
index 2b695f00..c969a65c 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -119,6 +119,7 @@ sub configure_urpm() {
$text->get_buffer->set_text($message);
$_->show foreach $f, $sw, $text;
$w->set_size_request(400, 400);
+ $w->set_default_response('ok');
} else {
$w = Gtk2::MessageDialog->new($mainw, [qw(modal destroy-with-parent)], 'warning', 'ok', $message);
}
@@ -163,6 +164,7 @@ sub ask_choice {
exit 0 if $_[1] == 0; #- "cancel"
});
$radios[0]->set_active(1);
+ $d->set_default_response(1); # defaults to ok
$d->show_all;
$d->run;
$choices->[$n];
@@ -178,6 +180,8 @@ sub ask_continue {
$continue_button->signal_connect(clicked => sub { goto &$nextclosure });
add_button_box($vbox, $quit_button, $continue_button);
change_mainw($vbox);
+ # default is to continue, but according to some HIG, warning should reverse the choise and defaults to abort
+ $mainw->set_focus($continue_button); # also set_default should be called but it gives a warning!
}
sub ask_continue_blocking {
@@ -291,6 +295,7 @@ sub do_install_3 () {
$quit_button->signal_connect(clicked => \&quit);
add_button_box($vbox, $quit_button);
change_mainw($vbox);
+ $mainw->set_focus($quit_button);
},
missing_files_summary => sub {
my ($error_sources) = @_;