- Only add current device to list when all devices found (bug #558524).

This commit is contained in:
Tim Waugh 2010-01-25 16:28:00 +00:00
parent e07384d1c7
commit 6574a08d3c
3 changed files with 38 additions and 2 deletions

4
clog1
View File

@ -1,2 +1,2 @@
* Thu Jan 21 2010 Tim Waugh <twaugh@redhat.com> - 1.1.90-2
- Added GtkAdjustments for all XML-declared SpinButtons.
* Mon Jan 25 2010 Tim Waugh <twaugh@redhat.com> - 1.1.90-3
- Only add current device to list when all devices found (bug #558524).

View File

@ -0,0 +1,33 @@
diff -up system-config-printer-1.1.90/system-config-printer.py.duplicate-current system-config-printer-1.1.90/system-config-printer.py
--- system-config-printer-1.1.90/system-config-printer.py.duplicate-current 2010-01-25 16:22:42.885084708 +0000
+++ system-config-printer-1.1.90/system-config-printer.py 2010-01-25 16:22:56.142210328 +0000
@@ -4757,7 +4757,7 @@ class NewPrinterGUI(GtkGUI):
self.fetchDevices_conn = None
# Add the network devices to the list.
- self.add_devices (result, current_uri)
+ self.add_devices (result, current_uri, no_more=True)
def get_hpfax_device_id(self, faxuri):
os.environ["URI"] = faxuri
@@ -4910,16 +4910,18 @@ class NewPrinterGUI(GtkGUI):
self.fetchDevices_conn._begin_operation (_("fetching device list"))
self.fetchDevices (network=False, current_uri=current_uri)
- def add_devices (self, devices, current_uri):
+ def add_devices (self, devices, current_uri, no_more=False):
if current_uri:
if devices.has_key (current_uri):
current = devices.pop(current_uri)
elif devices.has_key (current_uri.replace (":9100", "")):
current_uri = current_uri.replace (":9100", "")
current = devices.pop(current_uri)
- else:
+ elif no_more:
current = cupshelpers.Device (current_uri)
current.info = "Current device"
+ else:
+ current_uri = None
devices = devices.values()

View File

@ -20,6 +20,7 @@ Patch2: system-config-printer-copy-printer.patch
Patch3: system-config-printer-spinbuttons.patch
Patch4: system-config-printer-raw-statereason.patch
Patch5: system-config-printer-async-fallback-2.patch
Patch6: system-config-printer-duplicate-current.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: python-devel >= 2.4
@ -84,6 +85,7 @@ printers.
%patch3 -p1 -b .spinbuttons
%patch4 -p1 -b .raw-statereason
%patch5 -p1 -b .async-fallback-2
%patch6 -p1 -b .duplicate-current
%build
%configure --with-udev-rules --with-polkit-1
@ -200,6 +202,7 @@ exit 0
%changelog
* Mon Jan 25 2010 Tim Waugh <twaugh@redhat.com> - 1.1.90-3
- Only add current device to list when all devices found (bug #558524).
- Fixed statereason localization for raw queues (bug #558156).
- Fixed async fallback again (bug #557854).