From b4656ec11991244e68df09f4cae8dab0e147fb0a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 17 Jul 2010 11:57:38 -0600 Subject: [PATCH] Choose library dialog remembers previously used library locations --- src/calibre/gui2/dialogs/choose_library.py | 2 ++ src/calibre/gui2/dialogs/choose_library.ui | 31 ++++++++++++---------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/calibre/gui2/dialogs/choose_library.py b/src/calibre/gui2/dialogs/choose_library.py index abf7fffaed..03bd303112 100644 --- a/src/calibre/gui2/dialogs/choose_library.py +++ b/src/calibre/gui2/dialogs/choose_library.py @@ -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) diff --git a/src/calibre/gui2/dialogs/choose_library.ui b/src/calibre/gui2/dialogs/choose_library.ui index 793c805eda..ca2cfd5d96 100644 --- a/src/calibre/gui2/dialogs/choose_library.ui +++ b/src/calibre/gui2/dialogs/choose_library.ui @@ -18,7 +18,7 @@ :/images/lt.png:/images/lt.png - + Your calibre library is currently located at {0} @@ -38,14 +38,7 @@ - - - - true - - - - + Use &existing library at the new location @@ -55,21 +48,21 @@ - + &Create an empty library at the new location - + &Move current library to new location - + Qt::Horizontal @@ -79,7 +72,7 @@ - + Qt::Vertical @@ -118,7 +111,7 @@ - + ... @@ -129,8 +122,18 @@ + + + + + + HistoryLineEdit + QComboBox +
calibre/gui2/widgets.h
+
+