mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 20:16:11 +01:00
Fix #1896559 [feature request: edit book name of TOC blank](https://bugs.launchpad.net/calibre/+bug/1896559)
This commit is contained in:
parent
754ebf854b
commit
e9351ae870
1 changed files with 3 additions and 2 deletions
|
|
@ -163,6 +163,7 @@ def __init__(self, parent, prefs=None):
|
|||
f.la2 = la = QLabel('<b>'+_('&Name of the ToC entry:'))
|
||||
l.addWidget(la)
|
||||
self.name = QLineEdit(self)
|
||||
self.name.setPlaceholderText(_('(Untitled)'))
|
||||
la.setBuddy(self.name)
|
||||
l.addWidget(self.name)
|
||||
|
||||
|
|
@ -252,7 +253,7 @@ def __call__(self, item, where):
|
|||
self.current_item, self.current_where = item, where
|
||||
self.current_name = None
|
||||
self.current_frag = None
|
||||
self.name.setText(_('(Untitled)'))
|
||||
self.name.setText('')
|
||||
dest_index, frag = 0, None
|
||||
if item is not None:
|
||||
if where is None:
|
||||
|
|
@ -298,4 +299,4 @@ def update_dest_label(self, val):
|
|||
@property
|
||||
def result(self):
|
||||
return (self.current_item, self.current_where, self.current_name,
|
||||
self.current_frag, unicode_type(self.name.text()))
|
||||
self.current_frag, self.name.text().strip() or _('(Untitled)'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue