mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Added the third radio button and made them exclusive.
I solved the vertical space problem by eliminating the content margins.
This commit is contained in:
parent
f176c4ac36
commit
1474957e99
@ -108,9 +108,13 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
||||
self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setText(_('&Cancel'))
|
||||
self.buttonBox.accepted.connect(self.accepted)
|
||||
self.buttonBox.rejected.connect(self.rejected)
|
||||
self.apply_vl_checkbox.setAutoExclusive(False)
|
||||
self.show_button_layout.setSpacing(0)
|
||||
self.show_button_layout.setContentsMargins(0, 0, 0, 0)
|
||||
self.apply_all_checkbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.apply_all_checkbox.setChecked(True)
|
||||
self.apply_vl_checkbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.apply_vl_checkbox.toggled.connect(self.use_vl_changed)
|
||||
self.apply_selection_checkbox.setAutoExclusive(False)
|
||||
self.apply_selection_checkbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.apply_selection_checkbox.toggled.connect(self.apply_selection_box_changed)
|
||||
|
||||
self.table.setAlternatingRowColors(True)
|
||||
@ -214,13 +218,9 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
||||
self.ignore_cell_changed = orig
|
||||
|
||||
def use_vl_changed(self, x):
|
||||
if self.apply_vl_checkbox.isChecked():
|
||||
self.apply_selection_checkbox.setChecked(False)
|
||||
self.show_table(None, None, None, False)
|
||||
|
||||
def apply_selection_box_changed(self, x):
|
||||
if self.apply_selection_checkbox.isChecked():
|
||||
self.apply_vl_checkbox.setChecked(False)
|
||||
self.show_table(None, None, None, False)
|
||||
|
||||
def selection_to_apply(self):
|
||||
|
@ -65,37 +65,48 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QRadioButton" name="apply_vl_checkbox">
|
||||
<property name="toolTip">
|
||||
<string><p>Show authors only if they appear in the
|
||||
current Virtual library. Edits already done may be hidden but will
|
||||
not be forgotten.
|
||||
</p><p>
|
||||
Note that this box affects only what is displayed. Changes
|
||||
will affect all books in your library even if this box
|
||||
is checked.</p><</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Only show authors in the current &Virtual library</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QRadioButton" name="apply_selection_checkbox">
|
||||
<property name="toolTip">
|
||||
<string><p>Show items only if they appear in the
|
||||
currently selected books. Edits already done may be hidden but will
|
||||
not be forgotten.
|
||||
</p><p>
|
||||
Note that this box affects only what is displayed. Changes
|
||||
will affect all books in your library even if this box
|
||||
is checked.</p><</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>O&nly show authors in the currently selected books</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="0" column="4" rowspan="2">
|
||||
<layout class="QVBoxLayout" name="show_button_layout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="apply_all_checkbox">
|
||||
<property name="text">
|
||||
<string>Show &all authors</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="apply_vl_checkbox">
|
||||
<property name="toolTip">
|
||||
<string><p>Show authors only if they appear in the
|
||||
current Virtual library. Edits already done may be hidden but will
|
||||
not be forgotten.
|
||||
</p><p>
|
||||
Note that this box affects only what is displayed. Changes
|
||||
will affect all books in your library even if this box
|
||||
is checked.</p><</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Only show authors in the current &Virtual library</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="apply_selection_checkbox">
|
||||
<property name="toolTip">
|
||||
<string><p>Show items only if they appear in the
|
||||
currently selected books. Edits already done may be hidden but will
|
||||
not be forgotten.
|
||||
</p><p>
|
||||
Note that this box affects only what is displayed. Changes
|
||||
will affect all books in your library even if this box
|
||||
is checked.</p><</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>O&nly show authors in the currently selected books</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel">
|
||||
|
@ -372,9 +372,12 @@ class TagListEditor(QDialog, Ui_TagListEditor):
|
||||
ac.triggered.connect(self.clear_filter)
|
||||
le.returnPressed.connect(self.do_filter)
|
||||
self.filter_button.clicked.connect(self.do_filter)
|
||||
self.apply_vl_checkbox.setAutoExclusive(False)
|
||||
self.show_button_layout.setSpacing(0)
|
||||
self.show_button_layout.setContentsMargins(0, 0, 0, 0)
|
||||
self.apply_all_checkbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.apply_all_checkbox.setChecked(True)
|
||||
self.apply_vl_checkbox.toggled.connect(self.vl_box_changed)
|
||||
self.apply_selection_checkbox.setAutoExclusive(False)
|
||||
self.apply_selection_checkbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.apply_selection_checkbox.toggled.connect(self.apply_selection_box_changed)
|
||||
|
||||
self.is_enumerated = False
|
||||
@ -540,14 +543,10 @@ class TagListEditor(QDialog, Ui_TagListEditor):
|
||||
return txt.swapcase()
|
||||
|
||||
def vl_box_changed(self):
|
||||
if self.apply_vl_checkbox.isChecked():
|
||||
self.apply_selection_checkbox.setChecked(False)
|
||||
self.search_item_row = -1
|
||||
self.fill_in_table(None, None, False)
|
||||
|
||||
def apply_selection_box_changed(self):
|
||||
if self.apply_selection_checkbox.isChecked():
|
||||
self.apply_vl_checkbox.setChecked(False)
|
||||
self.search_item_row = -1
|
||||
self.fill_in_table(None, None, False)
|
||||
|
||||
|
@ -71,37 +71,48 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QRadioButton" name="apply_vl_checkbox">
|
||||
<property name="toolTip">
|
||||
<string><p>Show items only if they appear in the
|
||||
current Virtual library. Edits already done may be hidden but will
|
||||
not be forgotten.
|
||||
</p><p>
|
||||
Note that this box affects only what is displayed. Changes
|
||||
will affect all books in your library even if this box
|
||||
is checked.</p></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Only show items in the current &Virtual library</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QRadioButton" name="apply_selection_checkbox">
|
||||
<property name="toolTip">
|
||||
<string><p>Show items only if they appear in the
|
||||
currently selected books. Edits already done may be hidden but will
|
||||
not be forgotten.
|
||||
</p><p>
|
||||
Note that this box affects only what is displayed. Changes
|
||||
will affect all books in your library even if this box
|
||||
is checked.</p></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>O&nly show items in the currently selected books</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="0" column="4" rowspan="2">
|
||||
<layout class="QVBoxLayout" name="show_button_layout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="apply_all_checkbox">
|
||||
<property name="text">
|
||||
<string>Show &all items</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="apply_vl_checkbox">
|
||||
<property name="toolTip">
|
||||
<string><p>Show items only if they appear in the
|
||||
current Virtual library. Edits already done may be hidden but will
|
||||
not be forgotten.
|
||||
</p><p>
|
||||
Note that this box affects only what is displayed. Changes
|
||||
will affect all books in your library even if this box
|
||||
is checked.</p></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Only show items in the current &Virtual library</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="apply_selection_checkbox">
|
||||
<property name="toolTip">
|
||||
<string><p>Show items only if they appear in the
|
||||
currently selected books. Edits already done may be hidden but will
|
||||
not be forgotten.
|
||||
</p><p>
|
||||
Note that this box affects only what is displayed. Changes
|
||||
will affect all books in your library even if this box
|
||||
is checked.</p></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>O&nly show items in the currently selected books</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
|
Loading…
x
Reference in New Issue
Block a user