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