From b41139f7150615298ffde40adcfbeb7236c08118 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 6 Jun 2013 17:09:44 +0100 Subject: [PATCH] More fixes for UTF-8 encoding issues (bug #969846). --- system-config-printer-utf8-969846.patch | 41 +++++++++++++++++++++++++ system-config-printer.spec | 11 +++++-- 2 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 system-config-printer-utf8-969846.patch diff --git a/system-config-printer-utf8-969846.patch b/system-config-printer-utf8-969846.patch new file mode 100644 index 0000000..fd813df --- /dev/null +++ b/system-config-printer-utf8-969846.patch @@ -0,0 +1,41 @@ +diff -up system-config-printer-1.4.1/newprinter.py.utf8-969846 system-config-printer-1.4.1/newprinter.py +--- system-config-printer-1.4.1/newprinter.py.utf8-969846 2013-06-06 17:07:44.113770877 +0100 ++++ system-config-printer-1.4.1/newprinter.py 2013-06-06 17:08:30.764007511 +0100 +@@ -3377,7 +3377,7 @@ class NewPrinterGUI(GtkGUI): + recommended = (auto_make_norm and + cupshelpers.ppds.normalize (make) == auto_make_norm) + if self.device and self.device.make_and_model and recommended: +- text = make + _(" (recommended)") ++ text = make + _(" (recommended)").decode ('utf-8') + else: + text = make + +@@ -3440,7 +3440,7 @@ class NewPrinterGUI(GtkGUI): + cupshelpers.ppds.normalize (pmodel) == + auto_model_norm) + if self.device and self.device.make_and_model and recommended: +- text = pmodel + _(" (recommended)") ++ text = pmodel + _(" (recommended)").decode ('utf-8') + else: + text = pmodel + +@@ -3528,7 +3528,8 @@ class NewPrinterGUI(GtkGUI): + driverlist.append (driver) + NPDrivers.append (ppdname) + i += 1 +- iter = model.append ((driver + _(" (Current)"),)) ++ iter = model.append ((driver + ++ _(" (Current)").decode ('utf-8'),)) + path = model.get_path (iter) + self.tvNPDrivers.get_selection().select_path(path) + self.tvNPDrivers.scroll_to_cell(path, None, True, 0.5, 0.0) +@@ -3536,7 +3537,8 @@ class NewPrinterGUI(GtkGUI): + driverlist.append (driver) + NPDrivers.append (ppdname) + i += 1 +- iter = model.append ((driver + _(" (recommended)"),)) ++ iter = model.append ((driver + ++ _(" (recommended)").decode ('utf-8'),)) + path = model.get_path (iter) + self.tvNPDrivers.get_selection().select_path(path) + self.tvNPDrivers.scroll_to_cell(path, None, True, 0.5, 0.0) diff --git a/system-config-printer.spec b/system-config-printer.spec index 730fd74..7659489 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -1,7 +1,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.4.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -12,7 +12,8 @@ Patch3: system-config-printer-utf8-962207.patch Patch4: system-config-printer-utf8-964673.patch Patch5: system-config-printer-utf8-965578.patch Patch6: system-config-printer-utf8-965771.patch -Patch7: system-config-printer-typo.patch +Patch7: system-config-printer-utf8-969846.patch +Patch8: system-config-printer-typo.patch BuildRequires: cups-devel >= 1.2 BuildRequires: desktop-file-utils >= 0.2.92 @@ -81,9 +82,10 @@ printers. %patch4 -p1 -b .utf8-964673 %patch5 -p1 -b .utf8-965578 %patch6 -p1 -b .utf8-965771 +%patch7 -p1 -b .utf8-969846 # Fixed typo which could cause a traceback (bug #965678). -%patch7 -p1 -b .typo +%patch8 -p1 -b .typo %build %configure --with-udev-rules @@ -184,6 +186,9 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris exit 0 %changelog +* Thu Jun 6 2013 Tim Waugh 1.4.1-4 +- More fixes for UTF-8 encoding issues (bug #969846). + * Wed May 22 2013 Tim Waugh 1.4.1-3 - Fixed typo introduced in previous change (for bug #962207), and fixed another UTF-8 encoding issue (bug #965771).