Skip Menu |
 

This queue is for tickets about the Gtk2-Ex-PodViewer CPAN distribution.

Report information
The Basics
Id: 60097
Status: new
Priority: 0/
Queue: Gtk2-Ex-PodViewer

People
Owner: Nobody in particular
Requestors: jafingerhut [...] mac.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Andy Fingerhut <andy_fingerhut [...] alum.wustl.edu>
Subject: Possible bug fix for intermittent link_clicked signal behavior
Date: Wed, 04 Aug 2010 19:25:06 -0700
To: bug-Gtk2-Ex-PodViewer [...] rt.cpan.org
From: Andy Fingerhut <jafingerhut [...] mac.com>
Download (untitled) / with headers
text/plain 2.2k
My system: Ubuntu 10.4 LTS Perl version 5.10.1 I have Synaptics package libgtk2-ex-podviewer-perl version 0.18-1 installed, and I have verified that the Perl source code is identical to that in the version 0.18 .tar.gz file for PodViewer available on CPAN. I have been using gscan2pdf 0.9.31 and making modifications to it. It uses Gtk2::Ex::PodViewer, and while trying to use the link_clicked signal from PodViewer, I noticed that it seemed to only produce such a signal intermittently. Sometimes I would click on a link at the signal would be emitted, sometimes not. I did some Googling, and found the following email that appears as if someone else may have been experiencing similar troubles, but I'm not sure of that: http://www.mail-archive.com/gtk-perl-list@gnome.org/msg04116.html As an experiment, without any real understanding of how this code works, I noticed that the PodViewer code for emitting link_enter and link_leave signals was similar in some ways to that for emitting link_clicked signals. One difference was the first argument to the two calls to window_to_buffer_coords. I made the following one line change to my copy of PodViewer.pm, and the link_clicked signals became reliable -- they worked every time I clicked on one. If this works for others, too, or the author could verify that it is actually a fix, it would be great if a new version could be released and become the standard one in Linux distros. Thanks, Andy Fingerhut *** PodViewer.pm.orig 2008-10-04 07:01:23.000000000 -0700 --- PodViewer.pm 2010-08-04 18:33:22.000000000 -0700 *************** *** 454,460 **** sub clicked { my ($self, $event) = @_; ! my ($x, $y) = $self->window_to_buffer_coords('widget', $event- Show quoted text
>get_coords);
my $iter = $self->get_iter_at_location($x, $y); my $text = $self->get_link_text_at_iter($iter); if (defined($text) && $text ne '') { --- 454,460 ---- sub clicked { my ($self, $event) = @_; ! my ($x, $y) = $self->window_to_buffer_coords('text', $event- Show quoted text
>get_coords);
my $iter = $self->get_iter_at_location($x, $y); my $text = $self->get_link_text_at_iter($iter); if (defined($text) && $text ne '') {


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.