From 940e64af0d788a77a6bc3845cffddf6e617bc39c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 6 Sep 2011 21:41:36 -0600 Subject: [PATCH] Make smarten and unsmarten checkboxes in the GUI exclusive --- src/calibre/gui2/convert/look_and_feel.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/convert/look_and_feel.py b/src/calibre/gui2/convert/look_and_feel.py index 5ca7e1ea02..4785e222fc 100644 --- a/src/calibre/gui2/convert/look_and_feel.py +++ b/src/calibre/gui2/convert/look_and_feel.py @@ -6,7 +6,7 @@ __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal ' __docformat__ = 'restructuredtext en' -from PyQt4.Qt import SIGNAL, QVariant +from PyQt4.Qt import SIGNAL, QVariant, Qt from calibre.gui2.convert.look_and_feel_ui import Ui_Form from calibre.gui2.convert import Widget @@ -45,6 +45,12 @@ class LookAndFeelWidget(Widget, Ui_Form): self.font_key_wizard) self.opt_remove_paragraph_spacing.toggle() self.opt_remove_paragraph_spacing.toggle() + self.opt_smarten_punctuation.stateChanged.connect( + lambda state: state != Qt.Unchecked and + self.opt_unsmarten_punctuation.setCheckState(Qt.Unchecked)) + self.opt_unsmarten_punctuation.stateChanged.connect( + lambda state: state != Qt.Unchecked and + self.opt_smarten_punctuation.setCheckState(Qt.Unchecked)) def get_value_handler(self, g): if g is self.opt_change_justification: