From f76a8e5f4f493eaaf2329db418cb9d84d7c17fdc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 2 Feb 2011 12:50:31 -0700 Subject: [PATCH] Refactor old edit metadata dialog to use new completer --- src/calibre/gui2/dialogs/metadata_single.py | 4 ++++ src/calibre/gui2/dialogs/metadata_single.ui | 21 ++++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/calibre/gui2/dialogs/metadata_single.py b/src/calibre/gui2/dialogs/metadata_single.py index fa20658c12..f36fd3019d 100644 --- a/src/calibre/gui2/dialogs/metadata_single.py +++ b/src/calibre/gui2/dialogs/metadata_single.py @@ -739,6 +739,8 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog): self.series.setSizeAdjustPolicy(self.series.AdjustToContentsOnFirstShow) all_series = self.db.all_series() all_series.sort(key=lambda x : sort_key(x[1])) + self.series.set_separator(None) + self.series.update_items_cache([x[1] for x in all_series]) series_id = self.db.series_id(self.row) idx, c = None, 0 for i in all_series: @@ -756,6 +758,8 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog): def initialize_publisher(self): all_publishers = self.db.all_publishers() all_publishers.sort(key=lambda x : sort_key(x[1])) + self.publisher.set_separator(None) + self.publisher.update_items_cache([x[1] for x in all_publishers]) publisher_id = self.db.publisher_id(self.row) idx, c = None, 0 for i in all_publishers: diff --git a/src/calibre/gui2/dialogs/metadata_single.ui b/src/calibre/gui2/dialogs/metadata_single.ui index 23efc45399..5bcf268aaa 100644 --- a/src/calibre/gui2/dialogs/metadata_single.ui +++ b/src/calibre/gui2/dialogs/metadata_single.ui @@ -240,7 +240,7 @@ Using this button to create author sort will change author sort from red to gree - + true @@ -313,7 +313,7 @@ If the box is colored green, then text matches the individual author's sort stri - + true @@ -335,7 +335,7 @@ If the box is colored green, then text matches the individual author's sort stri - + Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas. @@ -379,7 +379,7 @@ If the box is colored green, then text matches the individual author's sort stri 5 - + List of known series. You can add new series. @@ -837,19 +837,14 @@ If the box is colored green, then text matches the individual author's sort stri
widgets.h
- EnComboBox - QComboBox -
widgets.h
-
- - CompleteLineEdit + MultiCompleteLineEdit QLineEdit -
widgets.h
+
calibre/gui2/complete.h
- CompleteComboBox + MultiCompleteComboBox QComboBox -
widgets.h
+
calibre/gui2/complete.h
FormatList