From 8c82c22233cbf53ce830823b3c663777f4f81fc9 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 25 Jan 2010 16:00:13 +0000 Subject: [PATCH] - Fixed statereason localization for raw queues (bug #558156). --- system-config-printer-raw-statereason.patch | 23 +++++++++++++++++++++ system-config-printer.spec | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-raw-statereason.patch diff --git a/system-config-printer-raw-statereason.patch b/system-config-printer-raw-statereason.patch new file mode 100644 index 0000000..a69e3f2 --- /dev/null +++ b/system-config-printer-raw-statereason.patch @@ -0,0 +1,23 @@ +diff -up system-config-printer-1.1.90/statereason.py.raw-statereason system-config-printer-1.1.90/statereason.py +--- system-config-printer-1.1.90/statereason.py.raw-statereason 2010-01-19 11:18:46.000000000 +0000 ++++ system-config-printer-1.1.90/statereason.py 2010-01-25 15:58:21.721083889 +0000 +@@ -141,6 +141,7 @@ class StateReason: + except (cups.IPPError, OSError): + pass + ++ reason = self.get_reason () + if self._ppd: + try: + schemes = ["text", "http", "help", "file"] +@@ -152,10 +153,8 @@ class StateReason: + localized_reason = localized_reason + reason + ", " + if localized_reason != "": + reason = localized_reason[:-2] +- else: +- reason = self.get_reason() + except RuntimeError: +- reason = self.get_reason() ++ pass + + text = _("Printer '%s': '%s'.") % (self.get_printer (), reason) + return (title, text) diff --git a/system-config-printer.spec b/system-config-printer.spec index e433a18..8603cd3 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.1.90 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,6 +18,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-copy-printer.patch Patch3: system-config-printer-spinbuttons.patch +Patch4: system-config-printer-raw-statereason.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -80,6 +81,7 @@ printers. %patch1 -p1 -b .no-epydoc %patch2 -p1 -b .copy-printer %patch3 -p1 -b .spinbuttons +%patch4 -p1 -b .raw-statereason %build %configure --with-udev-rules --with-polkit-1 @@ -195,6 +197,9 @@ rm -rf %buildroot exit 0 %changelog +* Mon Jan 25 2010 Tim Waugh - 1.1.90-3 +- Fixed statereason localization for raw queues (bug #558156). + * Thu Jan 21 2010 Tim Waugh - 1.1.90-2 - Added GtkAdjustments for all XML-declared SpinButtons. - Fixed traceback when renaming a printer.