Skip Menu |
 

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

Report information
The Basics
Id: 31142
Status: open
Priority: 0/
Queue: Gtk2-Ex-PrintDialog

People
Owner: Nobody in particular
Requestors: "Jeffrey Ratcliffe" (no email address)
Cc:
AdminCc:

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



Subject: Bug in Gtk2::Ex::PrintDialog-0.03 for Linux
Date: Sun, 2 Dec 2007 12:00:40 +0100
To: bug-Gtk2-Ex-PrintDialog [...] rt.cpan.org
From: "Jeffrey Ratcliffe" <jeffrey.ratcliffe [...] gmail.com>
Download (untitled) / with headers
text/plain 1.1k
Whilst packaging Gtk2::Ex::PrintDialog 0.03 for Debian, I found 2 issues: 1. it seems that use Net::CUPS::Destination is not being called, and therefore those methods are not available. 2. the Net::CUPS::Destination objects, rather than their associated printer names are being passed to the ComboBox. I am running v5.8.8 built for i486-linux-gnu-thread-multi under Ubuntu Gutsy: Linux desktop1-ubuntu 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux Below is a patch which fixes both problems for Linux. Regards Jeff Ratcliffe Index: lib/Gtk2/Ex/PrintDialog.pm =================================================================== --- lib/Gtk2/Ex/PrintDialog.pm (revision 9967) +++ lib/Gtk2/Ex/PrintDialog.pm (working copy) @@ -69,9 +69,11 @@ $self->{opt_print_command}->set_active(1); } else { - map { $self->{opt_printer_combo}->append_text($_) } @printers; + my @names; + use Net::CUPS::Destination; + for (@printers) {push @names, $_->getName} + map { $self->{opt_printer_combo}->append_text($_) } @names; $self->{opt_printer_combo}->set_active(0); - }
From: heiko [...] rabuju.com
Download (untitled) / with headers
text/plain 562b
I don't think it's a bug in PrintDialog.pm. It's in the `sub get_printers' of Gtk2::Ex::PrintDialog::Unix. The patch below solves the problems as well. Regards heiko --- lib/Gtk2/Ex/Unix.pm 2009-02-07 11:00:55.000000000 +0100 +++ lib/Gtk2/Ex/Unix.pm 2009-02-07 11:06:37.000000000 +0100 @@ -22,7 +22,9 @@ sub get_printers { my $self = shift; - return grep { defined } $self->{cups}->getDestinations; + my @printer = grep { defined } $self->{cups}->getDestinations; + + return map { $_->getName } @printer; } sub print_file {


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.