mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Choose library dialog remembers previously used library locations
This commit is contained in:
parent
828f47995b
commit
b4656ec119
@ -24,6 +24,7 @@ class ChooseLibrary(QDialog, Ui_Dialog):
|
||||
self.db = db
|
||||
self.new_db = None
|
||||
self.callback = callback
|
||||
self.location.initialize('choose_library_dialog')
|
||||
|
||||
lp = db.library_path
|
||||
if isbytestring(lp):
|
||||
@ -85,4 +86,5 @@ class ChooseLibrary(QDialog, Ui_Dialog):
|
||||
loc):
|
||||
return
|
||||
QDialog.accept(self)
|
||||
self.location.save_history()
|
||||
self.perform_action(action, loc)
|
||||
|
@ -18,7 +18,7 @@
|
||||
<normaloff>:/images/lt.png</normaloff>:/images/lt.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="old_location">
|
||||
<property name="text">
|
||||
<string>Your calibre library is currently located at {0}</string>
|
||||
@ -38,14 +38,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="location">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<item row="4" column="0" colspan="4">
|
||||
<widget class="QRadioButton" name="existing_library">
|
||||
<property name="text">
|
||||
<string>Use &existing library at the new location</string>
|
||||
@ -55,21 +48,21 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<item row="5" column="0" colspan="3">
|
||||
<widget class="QRadioButton" name="empty_library">
|
||||
<property name="text">
|
||||
<string>&Create an empty library at the new location</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="6" column="0" colspan="3">
|
||||
<widget class="QRadioButton" name="move_library">
|
||||
<property name="text">
|
||||
<string>&Move current library to new location</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="8" column="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -79,7 +72,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="7" column="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -118,7 +111,7 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<item row="2" column="3">
|
||||
<widget class="QToolButton" name="browse_button">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
@ -129,8 +122,18 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="HistoryLineEdit" name="location"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>HistoryLineEdit</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>calibre/gui2/widgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../../../resources/images.qrc"/>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user