summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-02-21 13:14:04 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-02-21 13:14:04 +0000
commitb06ccc3ddc51b9b1dd01aeeecc28adea69923592 (patch)
tree73fa49efe05de37f5b614dc1bcd0aebc9eb5b69d /perl-install
parentca5a89a117f40449218f24ca98515230fb8ad029 (diff)
downloaddrakx-b06ccc3ddc51b9b1dd01aeeecc28adea69923592.tar
drakx-b06ccc3ddc51b9b1dd01aeeecc28adea69923592.tar.gz
drakx-b06ccc3ddc51b9b1dd01aeeecc28adea69923592.tar.bz2
drakx-b06ccc3ddc51b9b1dd01aeeecc28adea69923592.tar.xz
drakx-b06ccc3ddc51b9b1dd01aeeecc28adea69923592.zip
workaround what seems to be a gtk bug (#1445)
gtk seems to loop (and take 100% user cpu) when I change the pixbuf of a gtkcellrendererpixbuf in a treeview that is not currently displayed
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);