system-config-printer/system-config-printer-remote-location-field.patch

19 lines
992 B
Diff
Raw Normal View History

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)