mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Show the row number of the book being currently edited in the edit metadata dialog's title bar
This commit is contained in:
parent
9f1091c9a2
commit
5b97cbb2c8
@ -26,6 +26,8 @@ from calibre.gui2.custom_column_widgets import populate_metadata_page
|
|||||||
from calibre.utils.config import tweaks
|
from calibre.utils.config import tweaks
|
||||||
from calibre.ebooks.metadata.book.base import Metadata
|
from calibre.ebooks.metadata.book.base import Metadata
|
||||||
|
|
||||||
|
BASE_TITLE = _('Edit Metadata')
|
||||||
|
|
||||||
class MetadataSingleDialogBase(ResizableDialog):
|
class MetadataSingleDialogBase(ResizableDialog):
|
||||||
|
|
||||||
view_format = pyqtSignal(object, object)
|
view_format = pyqtSignal(object, object)
|
||||||
@ -77,7 +79,7 @@ class MetadataSingleDialogBase(ResizableDialog):
|
|||||||
ll.addSpacing(10)
|
ll.addSpacing(10)
|
||||||
|
|
||||||
self.setWindowIcon(QIcon(I('edit_input.png')))
|
self.setWindowIcon(QIcon(I('edit_input.png')))
|
||||||
self.setWindowTitle(_('Edit Metadata'))
|
self.setWindowTitle(BASE_TITLE)
|
||||||
|
|
||||||
self.create_basic_metadata_widgets()
|
self.create_basic_metadata_widgets()
|
||||||
|
|
||||||
@ -267,8 +269,11 @@ class MetadataSingleDialogBase(ResizableDialog):
|
|||||||
title = self.title.current_val
|
title = self.title.current_val
|
||||||
if len(title) > 50:
|
if len(title) > 50:
|
||||||
title = title[:50] + u'\u2026'
|
title = title[:50] + u'\u2026'
|
||||||
self.setWindowTitle(_('Edit Metadata') + ' - ' +
|
self.setWindowTitle(BASE_TITLE + ' - ' +
|
||||||
title)
|
title + ' - ' +
|
||||||
|
_(' [%(num)d of %(tot)d]')%dict(num=
|
||||||
|
self.current_row+1,
|
||||||
|
tot=len(self.row_list)))
|
||||||
|
|
||||||
def swap_title_author(self, *args):
|
def swap_title_author(self, *args):
|
||||||
title = self.title.current_val
|
title = self.title.current_val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user