diff --git a/src/calibre/gui2/dialogs/metadata_single.py b/src/calibre/gui2/dialogs/metadata_single.py
index d4b9819af2..14baa0de91 100644
--- a/src/calibre/gui2/dialogs/metadata_single.py
+++ b/src/calibre/gui2/dialogs/metadata_single.py
@@ -144,6 +144,7 @@ class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog):
self.edit_tags)
QObject.connect(self.remove_series_button, SIGNAL('clicked()'),
self.remove_unused_series)
+ self.connect(self.swap_button, SIGNAL('clicked()'), self.swap_title_author)
self.timeout = float(Settings().get('network timeout', 5))
self.title.setText(db.title(row))
isbn = db.isbn(self.id, index_is_id=True)
@@ -192,7 +193,12 @@ class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog):
pm.loadFromData(cover)
if not pm.isNull():
self.cover.setPixmap(pm)
-
+
+ def swap_title_author(self):
+ title = self.title.text()
+ self.title.setText(self.authors.text())
+ self.authors.setText(title)
+ self.author_sort.setText('')
def cover_dropped(self):
self.cover_changed = True
diff --git a/src/calibre/gui2/dialogs/metadata_single.ui b/src/calibre/gui2/dialogs/metadata_single.ui
index 9ffc494a62..82dbfebb71 100644
--- a/src/calibre/gui2/dialogs/metadata_single.ui
+++ b/src/calibre/gui2/dialogs/metadata_single.ui
@@ -5,8 +5,8 @@
0
0
- 668
- 663
+ 796
+ 715
@@ -41,7 +41,7 @@
Meta information
-
+
-
@@ -62,6 +62,26 @@
+ -
+
+
+ Swap the author and title
+
+
+ ...
+
+
+
+ :/images/swap.svg:/images/swap.svg
+
+
+
+ 16
+ 16
+
+
+
+
-
@@ -95,7 +115,7 @@
- -
+
-
Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles.
@@ -115,7 +135,7 @@
- -
+
-
Rating of this book. 0-5 stars
@@ -147,7 +167,7 @@
- -
+
-
Change the publisher of this book
@@ -167,7 +187,7 @@
- -
+
-
-
@@ -208,7 +228,7 @@
- -
+
-
5
@@ -254,7 +274,7 @@
- -
+
-
false
@@ -289,7 +309,7 @@
- -
+
-
@@ -300,11 +320,16 @@
Comments
-
- -
-
-
-
+
+
+
+ 9
+ 39
+ 354
+ 557
+
+
+
-
@@ -316,7 +341,7 @@
-
+
-
@@ -364,7 +389,7 @@
- :/images/plus.svg:/images/plus.svg
+ :/images/add_book.svg:/images/add_book.svg
@@ -398,9 +423,6 @@
-
-
- groupBox_4
-
diff --git a/src/calibre/gui2/images/add_book.svg b/src/calibre/gui2/images/add_book.svg
new file mode 100644
index 0000000000..a2b1a1901d
--- /dev/null
+++ b/src/calibre/gui2/images/add_book.svg
@@ -0,0 +1,2404 @@
+
+
+
diff --git a/src/calibre/gui2/images/swap.svg b/src/calibre/gui2/images/swap.svg
new file mode 100644
index 0000000000..aa62316b34
--- /dev/null
+++ b/src/calibre/gui2/images/swap.svg
@@ -0,0 +1,722 @@
+
+
+
diff --git a/src/calibre/gui2/main.ui b/src/calibre/gui2/main.ui
index e38b3833f6..a5f7c2ddcc 100644
--- a/src/calibre/gui2/main.ui
+++ b/src/calibre/gui2/main.ui
@@ -440,7 +440,7 @@
- :/images/plus.svg:/images/plus.svg
+ :/images/add_book.svg:/images/add_book.svg
Add books