This commit is contained in:
Kovid Goyal 2015-10-28 20:29:48 +05:30
parent 853b1f6012
commit 2e4927d02e

View File

@ -14,7 +14,7 @@ from functools import partial
from PyQt5.Qt import (QPushButton, QFrame, QMenu, QInputDialog, from PyQt5.Qt import (QPushButton, QFrame, QMenu, QInputDialog,
QDialog, QVBoxLayout, QDialogButtonBox, QSize, QStackedWidget, QWidget, QDialog, QVBoxLayout, QDialogButtonBox, QSize, QStackedWidget, QWidget,
QLabel, Qt, pyqtSignal, QIcon, QTreeWidget, QGridLayout, QTreeWidgetItem, QLabel, Qt, pyqtSignal, QIcon, QTreeWidget, QGridLayout, QTreeWidgetItem,
QToolButton, QItemSelectionModel, QCursor, QKeySequence) QToolButton, QItemSelectionModel, QCursor, QKeySequence, QSizePolicy)
from calibre.ebooks.oeb.polish.container import get_container, AZW3Container from calibre.ebooks.oeb.polish.container import get_container, AZW3Container
from calibre.ebooks.oeb.polish.toc import ( from calibre.ebooks.oeb.polish.toc import (
@ -624,6 +624,7 @@ class TOCView(QWidget): # {{{
l.addWidget(b, col, 1) l.addWidget(b, col, 1)
self.default_msg = _('Double click on an entry to change the text') self.default_msg = _('Double click on an entry to change the text')
self.hl = hl = QLabel(self.default_msg) self.hl = hl = QLabel(self.default_msg)
hl.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Preferred)
l.addWidget(hl, col, 2, 1, -1) l.addWidget(hl, col, 2, 1, -1)
self.item_view = i = ItemView(self, self.prefs) self.item_view = i = ItemView(self, self.prefs)
self.item_view.delete_item.connect(self.delete_current_item) self.item_view.delete_item.connect(self.delete_current_item)