summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-18 00:22:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-18 00:22:52 +0000
commitf0bcda57c0cd9f923a90a41bdd9d25f80101af06 (patch)
tree88c8377f73cb61122e4a27d054aad5f24e03d327 /perl-install/interactive
parent9c10e4f45112e33649ff43d6b097b2dcba29f1de (diff)
downloaddrakx-backup-do-not-use-f0bcda57c0cd9f923a90a41bdd9d25f80101af06.tar
drakx-backup-do-not-use-f0bcda57c0cd9f923a90a41bdd9d25f80101af06.tar.gz
drakx-backup-do-not-use-f0bcda57c0cd9f923a90a41bdd9d25f80101af06.tar.bz2
drakx-backup-do-not-use-f0bcda57c0cd9f923a90a41bdd9d25f80101af06.tar.xz
drakx-backup-do-not-use-f0bcda57c0cd9f923a90a41bdd9d25f80101af06.zip
in {complete} or {canceled}, ensure giving a bad entry number to focus doesn't
break (and log that something wrong happened)
Diffstat (limited to 'perl-install/interactive')
-rw-r--r--perl-install/interactive/gtk.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 1514c5a45..98c50250a 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -643,7 +643,7 @@ sub ask_fromW {
@widgets && ($common->{focus_first} || !$mainw->{ok} || @widgets == 1 && member(ref($widgets[0]{focus_w}), "Gtk2::TreeView", "Gtk2::RadioButton")) ?
$widgets[0]{focus_w} :
$mainw->{ok};
- $widget_to_focus->grab_focus() if $widget_to_focus;
+ $widget_to_focus->grab_focus if $widget_to_focus;
my $check = sub {
my ($f) = @_;
@@ -653,7 +653,11 @@ sub ask_fromW {
if ($error) {
$set_all->();
- $widgets[$focus || 0]{focus_w}->grab_focus();
+ if (my $to_focus = $widgets[$focus || 0]) {
+ $to_focus->{focus_w}->grab_focus;
+ } else {
+ log::l("ERROR: bad entry number given to focus " . backtrace());
+ }
}
!$error;
}