summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ugtk2.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 8994baf51..e9b8cb8da 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -1223,7 +1223,9 @@ sub ask_browse_tree_info_given_widgets {
$w->{tree}->signal_connect(key_press_event => sub {
my $c = chr($_[1]->keyval & 0xff);
- $toggle->(0) if $_[1]->keyval >= 0x100 ? $c eq "\r" || $c eq "\x8d" : $c eq ' ';
+ if ($_[1]->keyval >= 0x100 ? $c eq "\r" || $c eq "\x8d" : $c eq ' ') {
+ Gtk2->timeout_add(1, sub { $toggle->(0), 0 })
+ }
0;
});
$w->{tree}->get_selection->signal_connect(changed => sub {
@@ -1241,7 +1243,10 @@ sub ask_browse_tree_info_given_widgets {
#- the following test for equality is because we can have a button_press_event first, then
#- two changed events, the first being on a different row :/ (is it a bug in gtk2?) - that
#- happens in rpmdrake when doing a "search" and directly trying to select a found package
- $toggle->(1), $mouse_toggle_pending = 0 if $mouse_toggle_pending eq $model->get($iter, 0);
+ if ($mouse_toggle_pending eq $model->get($iter, 0)) {
+ Gtk2->timeout_add(1, sub { $toggle->(1), $mouse_toggle_pending = 0 });
+ }
+ 0;
});
$w->{tree}->signal_connect(button_press_event => sub { #- not too good, but CellRendererPixbuf doesn't have the needed signals :(
my ($returns, $path, $column) = $w->{tree}->get_path_at_pos($_[1]->x, $_[1]->y);