File: 01_fix_dialog_combobox.patch

package info (click to toggle)
libgtk2-ex-printdialog-perl 0.03-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 116 kB
  • ctags: 58
  • sloc: perl: 414; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 597 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From: Jeffrey Ratcliffe <jeffrey.ratcliffe@gmail.com>
Subject: Bug printing to CUPS printers
Forwarded: http://rt.cpan.org/Public/Bug/Display.html?id=31142

--- a/lib/Gtk2/Ex/PrintDialog.pm
+++ b/lib/Gtk2/Ex/PrintDialog.pm
@@ -69,9 +69,11 @@ sub INIT_INSTANCE {
 		$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);
-
 	}