mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
04c5fcc2ee
commit
fcc6ec5de5
@ -16,7 +16,7 @@ from calibre.gui2 import error_dialog
|
|||||||
from calibre.library.coloring import (Rule, conditionable_columns,
|
from calibre.library.coloring import (Rule, conditionable_columns,
|
||||||
displayable_columns)
|
displayable_columns)
|
||||||
|
|
||||||
class ConditionEditor(QWidget):
|
class ConditionEditor(QWidget): # {{{
|
||||||
|
|
||||||
def __init__(self, fm, parent=None):
|
def __init__(self, fm, parent=None):
|
||||||
QWidget.__init__(self, parent)
|
QWidget.__init__(self, parent)
|
||||||
@ -188,9 +188,9 @@ class ConditionEditor(QWidget):
|
|||||||
if action in ('is set', 'is not set', 'is true', 'is false',
|
if action in ('is set', 'is not set', 'is true', 'is false',
|
||||||
'is undefined'):
|
'is undefined'):
|
||||||
self.value_box.setEnabled(False)
|
self.value_box.setEnabled(False)
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
class RuleEditor(QDialog): # {{{
|
||||||
class RuleEditor(QDialog):
|
|
||||||
|
|
||||||
def __init__(self, fm, parent=None):
|
def __init__(self, fm, parent=None):
|
||||||
QDialog.__init__(self, parent)
|
QDialog.__init__(self, parent)
|
||||||
@ -314,8 +314,13 @@ class RuleEditor(QDialog):
|
|||||||
r.add_condition(*condition)
|
r.add_condition(*condition)
|
||||||
|
|
||||||
return col, r
|
return col, r
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
class EditRules(QWidget):
|
||||||
|
|
||||||
|
def __init__(self, db, parent=None):
|
||||||
|
QWidget.__init__(self, parent)
|
||||||
|
self.db = db
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from PyQt4.Qt import QApplication
|
from PyQt4.Qt import QApplication
|
||||||
|
Loading…
x
Reference in New Issue
Block a user