system-config-printer/system-config-printer-get_cursor.patch

18 lines
833 B
Diff

diff -up system-config-printer-1.1.12/system-config-printer.py.get_cursor system-config-printer-1.1.12/system-config-printer.py
--- system-config-printer-1.1.12/system-config-printer.py.get_cursor 2009-08-25 17:01:28.000000000 +0100
+++ system-config-printer-1.1.12/system-config-printer.py 2009-08-26 12:32:02.757680412 +0100
@@ -5655,7 +5655,12 @@ class NewPrinterGUI(GtkGUI):
self.expNPDeviceURIs.hide ()
def on_tvNPDeviceURIs_cursor_changed(self, widget):
- model, iter = widget.get_selection().get_selected()
+ path, column = widget.get_cursor ()
+ if path == None:
+ return
+
+ model = widget.get_model ()
+ iter = model.get_iter (path)
device = model.get_value(iter, 1)
self.device = device
self.lblNPDeviceDescription.set_text ('')