summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-22 16:14:06 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-22 16:14:06 +0000
commitc92258089dbea5ff1007c9607dbd982667eb7663 (patch)
tree2f7ae97c7763081181332e61c418a483e3827e8c /perl-install/interactive_gtk.pm
parent10b213bacda35e62d0f18e0ea25c5a2860eb906b (diff)
downloaddrakx-c92258089dbea5ff1007c9607dbd982667eb7663.tar
drakx-c92258089dbea5ff1007c9607dbd982667eb7663.tar.gz
drakx-c92258089dbea5ff1007c9607dbd982667eb7663.tar.bz2
drakx-c92258089dbea5ff1007c9607dbd982667eb7663.tar.xz
drakx-c92258089dbea5ff1007c9607dbd982667eb7663.zip
- fix entries editing causing the cursor to go to the end of line
- select the text
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r--perl-install/interactive_gtk.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index be8359f05..78d000601 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -455,11 +455,13 @@ sub ask_fromW {
$width = max(map { length } @{$e->{list}});
} else {
$w = new Gtk::Entry;
+ $w->signal_connect(focus_in_event => sub { $w->select_region });
+ $w->signal_connect(focus_out_event => sub { $w->select_region(0,0) });
}
$w->signal_connect(key_press_event => $may_go_to_next);
$w->signal_connect(changed => $changed);
$w->set_visibility(0) if $e->{hidden};
- $set = sub { $w->set_text($_[0]) };
+ $set = sub { $w->set_text($_[0]) if $_[0] ne $w->get_text };
$get = sub { $w->get_text };
}
$w->signal_connect(focus_out_event => sub {