mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
commit
07f3e87b13
@ -296,16 +296,17 @@ class BooksModel(QAbstractTableModel):
|
||||
|
||||
def read_config(self):
|
||||
self.use_roman_numbers = config['use_roman_numerals_for_series_number']
|
||||
self.column_map = config['column_map'][:] # force a copy
|
||||
cmap = config['column_map'][:] # force a copy
|
||||
self.headers = {}
|
||||
for i in self.column_map: # take out any columns no longer in the db
|
||||
if not i in self.orig_headers and not i in self.custom_columns:
|
||||
self.column_map.remove(i)
|
||||
for i in self.column_map:
|
||||
if i in self.orig_headers:
|
||||
self.headers[i] = self.orig_headers[i]
|
||||
elif i in self.custom_columns:
|
||||
self.headers[i] = self.custom_columns[i]['name']
|
||||
self.column_map = []
|
||||
for col in cmap: # take out any columns no longer in the db
|
||||
if col in self.orig_headers or col in self.custom_columns:
|
||||
self.column_map.append(col)
|
||||
for col in self.column_map:
|
||||
if col in self.orig_headers:
|
||||
self.headers[col] = self.orig_headers[col]
|
||||
elif col in self.custom_columns:
|
||||
self.headers[col] = self.custom_columns[col]['name']
|
||||
self.build_data_convertors()
|
||||
self.reset()
|
||||
self.emit(SIGNAL('columns_sorted()'))
|
||||
|
@ -157,6 +157,30 @@
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="restriction_label">
|
||||
<property name="text">
|
||||
<string>&Restrict to:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>search_restriction</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="search_restriction">
|
||||
<property name="toolTip">
|
||||
<string>Books display will be restricted to those matching the selected saved search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="search_count">
|
||||
<property name="text">
|
||||
<string>set in ui.py</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="advanced_search_button">
|
||||
<property name="toolTip">
|
||||
@ -206,13 +230,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="search_count">
|
||||
<property name="text">
|
||||
<string>set in ui.py</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="clear_button">
|
||||
<property name="toolTip">
|
||||
@ -342,8 +359,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QComboBox" name="tag_match">
|
||||
<property name="currentIndex">
|
||||
@ -372,35 +387,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="10,50">
|
||||
<item>
|
||||
<widget class="QLabel" name="restriction_label">
|
||||
<property name="text">
|
||||
<string>&Restrict to:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>search_restriction</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="search_restriction">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>50</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Books display will be restricted to those matching the selected saved search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="BooksView" name="library_view">
|
||||
<property name="sizePolicy">
|
||||
|
Loading…
x
Reference in New Issue
Block a user