system-config-printer/system-config-printer-remote-location-field.patch
Tim Waugh 09775bd93f - Use correct 'location' field for printers added remotely.
- Parse nmblookup failures correctly in troubleshooter.
- Prevent traceback on IPP notification after properties dialog cancelled.
- Fixed handling of incorrect authentication when not using PolicyKit (bug
    #508102).
2009-06-25 17:10:34 +00:00

19 lines
992 B
Diff

diff -up system-config-printer-1.1.8/system-config-printer.py.remote-location-field system-config-printer-1.1.8/system-config-printer.py
--- system-config-printer-1.1.8/system-config-printer.py.remote-location-field 2009-06-25 17:46:36.895328974 +0100
+++ system-config-printer-1.1.8/system-config-printer.py 2009-06-25 17:46:52.622454030 +0100
@@ -5791,8 +5791,12 @@ class NewPrinterGUI(GtkGUI):
try:
if len (location) == 0 and self.device.device_class == "direct":
# Set location to the name of this host.
- u = os.uname ()
- location = u[1]
+ if (self.mainapp.connect_server == 'localhost' or
+ self.mainapp.connect_server[0] == '/'):
+ u = os.uname ()
+ location = u[1]
+ else:
+ location = self.mainapp.connect_server
# Pre-fill location field.
self.entNPLocation.set_text (location)