system-config-printer/system-config-printer-lpd-model.patch

25 lines
1.2 KiB
Diff

diff -up system-config-printer-1.1.90/system-config-printer.py.lpd-model system-config-printer-1.1.90/system-config-printer.py
--- system-config-printer-1.1.90/system-config-printer.py.lpd-model 2010-01-25 16:31:03.394084803 +0000
+++ system-config-printer-1.1.90/system-config-printer.py 2010-01-25 16:31:36.473209434 +0000
@@ -5729,7 +5729,8 @@ class NewPrinterGUI(GtkGUI):
elif device.type=="lpd":
self.cmbentNPTLpdHost.child.set_text ('')
self.cmbentNPTLpdQueue.child.set_text ('')
- self.cmbentNPTLpdQueue.get_model().clear ()
+ model = gtk.ListStore (gobject.TYPE_STRING)
+ self.cmbentNPTLpdQueue.set_model(model)
self.btnNPTLpdProbe.set_sensitive (False)
if len (device.uri) > 6:
host = device.uri[6:]
@@ -5790,8 +5791,8 @@ class NewPrinterGUI(GtkGUI):
printers = server.probe()
self.WaitWindow.hide ()
- model = self.cmbentNPTLpdQueue.get_model()
- model.clear()
+ model = gtk.ListStore (gobject.TYPE_STRING)
+ self.cmbentNPTLpdQueue.set_model (model)
for printer in printers:
self.cmbentNPTLpdQueue.append_text(printer)
if printers: