diff --git a/newprinter.py b/newprinter.py
index eee8b5556..e081df2ed 100644
--- a/newprinter.py
+++ b/newprinter.py
@@ -250,6 +250,7 @@ def __init__(self):
"entNPName",
"entNPDescription",
"entNPLocation",
+ "isSharedCbx",
"tvNPDevices",
"ntbkNPType",
"lblNPDeviceDescription",
@@ -754,6 +755,7 @@ def _initialisePPDMode (self):
def _initialiseWidgetsForMode (self, mode_name):
self.entNPName.set_text (self.makeNameUnique (mode_name))
self.entNPName.grab_focus ()
+ self.isSharedCbx.set_active(False)
for widget in [self.entNPLocation,
self.entNPDescription,
self.entSMBURI, self.entSMBUsername,
@@ -4320,6 +4322,7 @@ def on_btnNPApply_clicked(self, widget):
name = self.entNPName.get_text()
location = self.entNPLocation.get_text()
info = self.entNPDescription.get_text()
+ isShared = self.isSharedCbx.get_active()
else:
name = self._name
@@ -4391,6 +4394,7 @@ def on_btnNPApply_clicked(self, widget):
cupshelpers.activateNewPrinter (self.cups, name)
self.cups.setPrinterLocation(name, location)
self.cups.setPrinterInfo(name, info)
+ self.cups.setPrinterShared(name, isShared)
except cups.IPPError as e:
(e, msg) = e.args
self.show_IPP_Error(e, msg)
diff --git a/ui/NewPrinterWindow.ui b/ui/NewPrinterWindow.ui
index ed6103d87..ce9aab4e4 100644
--- a/ui/NewPrinterWindow.ui
+++ b/ui/NewPrinterWindow.ui
@@ -219,6 +219,36 @@
2
+
+
+
+ False
+ True
+ 3
+
+
True