Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions newprinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3053,7 +3053,6 @@ def on_tvNPDevices_cursor_changed(self, widget):
physicaldevice = model.get_value (iter, 1)
if physicaldevice is None:
return
show_uris = True
for device in physicaldevice.get_devices ():
if device.type == "parallel":
device.menuentry = _("Parallel Port")
Expand Down Expand Up @@ -3137,7 +3136,6 @@ def on_tvNPDevices_cursor_changed(self, widget):
device.menuentry = \
_("Network printer via DNS-SD")
else:
show_uris = False
device.menuentry = device.uri

model = Gtk.ListStore (str, # URI description
Expand Down Expand Up @@ -3234,7 +3232,7 @@ def on_tvNPDevices_cursor_changed(self, widget):
n += 1
column = self.tvNPDeviceURIs.get_column (0)
self.tvNPDeviceURIs.set_cursor (Gtk.TreePath(), column, False)
if show_uris:
if n > 1:
self.expNPDeviceURIs.show_all ()
else:
self.expNPDeviceURIs.hide ()
Expand Down