1 From 4ede66364b6987cb3013fa447fcdec09b3a638cb Mon Sep 17 00:00:00 2001
2 From: Tim Waugh <twaugh@redhat.com>
3 Date: Mon, 1 Aug 2011 14:04:49 +0100
4 Subject: [PATCH 3/4] Properties dialog: make OK button sensitive even when no changes to save (Ubuntu #444280).
6 Only becomes insensitive when there are conflicts.
8 printerproperties.py | 8 +++++---
9 1 files changed, 5 insertions(+), 3 deletions(-)
11 diff --git a/printerproperties.py b/printerproperties.py
12 index ca40f31..9c055f9 100755
13 --- a/printerproperties.py
14 +++ b/printerproperties.py
15 @@ -619,7 +619,10 @@ class PrinterPropertiesDialog(GtkGUI):
17 if (response == gtk.RESPONSE_OK or
18 response == gtk.RESPONSE_APPLY):
19 - failed = self.save_printer (self.printer)
20 + if (response == gtk.RESPONSE_OK and len (self.changed) == 0):
23 + failed = self.save_printer (self.printer)
25 if response == gtk.RESPONSE_APPLY and not failed:
27 @@ -957,8 +960,7 @@ class PrinterPropertiesDialog(GtkGUI):
29 self.btnPrinterPropertiesApply.set_sensitive (len (self.changed) > 0 and
31 - self.btnPrinterPropertiesOK.set_sensitive (len (self.changed) > 0 and
33 + self.btnPrinterPropertiesOK.set_sensitive (not self.conflicts)
35 def save_printer(self, printer, saveall=False, parent=None):