diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-10-09 14:57:59 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-10-09 14:57:59 +0000 |
commit | 3c3721122e0e8caef69f19508a81217830919342 (patch) | |
tree | a5c71d028a6c3657f0e1b5ffb8c4cbf7dc621e16 /Rpmdrake | |
parent | 2df9fe6ec366cd3ea86dd08a3249516b1083e105 (diff) | |
download | rpmdrake-3c3721122e0e8caef69f19508a81217830919342.tar rpmdrake-3c3721122e0e8caef69f19508a81217830919342.tar.gz rpmdrake-3c3721122e0e8caef69f19508a81217830919342.tar.bz2 rpmdrake-3c3721122e0e8caef69f19508a81217830919342.tar.xz rpmdrake-3c3721122e0e8caef69f19508a81217830919342.zip |
(mainwindow) prevent crashing if one click on a media checkbox while
another click event is already being processed (#46727)
rationale: flush() process waiting events including potential clicks
on other media checkboxes, thus causing gtk+ to reenter the callback
when we were processing refreshing events, which is not reentrant
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/edit_urpm_sources.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 5fb3d3c0..d02cdeb9 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -1055,10 +1055,12 @@ sub mainwindow() { $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Medium"), Gtk2::CellRendererText->new, 'text' => $col{mainw}{name})); - - $tr->signal_connect( + my $id; + $id = $tr->signal_connect( toggled => sub { my (undef, $path) = @_; + $tr->signal_handler_block($id); + my $_guard = before_leaving { $tr->signal_handler_unblock($id) }; my $iter = $list->get_iter_from_string($path); $urpm->{media}[$path]{ignore} = !$urpm->{media}[$path]{ignore} || undef; $list->set($iter, $col{mainw}{is_enabled}, !$urpm->{media}[$path]{ignore}); |