More fixes for UTF-8 encoding issues (bug #969846).

This commit is contained in:
Tim Waugh 2013-06-06 17:09:44 +01:00
parent 120f8baa6a
commit b41139f715
2 changed files with 49 additions and 3 deletions

View File

@ -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)

View File

@ -1,7 +1,7 @@
Summary: A printer administration tool Summary: A printer administration tool
Name: system-config-printer Name: system-config-printer
Version: 1.4.1 Version: 1.4.1
Release: 3%{?dist} Release: 4%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/ URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base Group: System Environment/Base
@ -12,7 +12,8 @@ Patch3: system-config-printer-utf8-962207.patch
Patch4: system-config-printer-utf8-964673.patch Patch4: system-config-printer-utf8-964673.patch
Patch5: system-config-printer-utf8-965578.patch Patch5: system-config-printer-utf8-965578.patch
Patch6: system-config-printer-utf8-965771.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: cups-devel >= 1.2
BuildRequires: desktop-file-utils >= 0.2.92 BuildRequires: desktop-file-utils >= 0.2.92
@ -81,9 +82,10 @@ printers.
%patch4 -p1 -b .utf8-964673 %patch4 -p1 -b .utf8-964673
%patch5 -p1 -b .utf8-965578 %patch5 -p1 -b .utf8-965578
%patch6 -p1 -b .utf8-965771 %patch6 -p1 -b .utf8-965771
%patch7 -p1 -b .utf8-969846
# Fixed typo which could cause a traceback (bug #965678). # Fixed typo which could cause a traceback (bug #965678).
%patch7 -p1 -b .typo %patch8 -p1 -b .typo
%build %build
%configure --with-udev-rules %configure --with-udev-rules
@ -184,6 +186,9 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
exit 0 exit 0
%changelog %changelog
* Thu Jun 6 2013 Tim Waugh <twaugh@redhat.com> 1.4.1-4
- More fixes for UTF-8 encoding issues (bug #969846).
* Wed May 22 2013 Tim Waugh <twaugh@redhat.com> 1.4.1-3 * Wed May 22 2013 Tim Waugh <twaugh@redhat.com> 1.4.1-3
- Fixed typo introduced in previous change (for bug #962207), and - Fixed typo introduced in previous change (for bug #962207), and
fixed another UTF-8 encoding issue (bug #965771). fixed another UTF-8 encoding issue (bug #965771).