This commit is contained in:
Kovid Goyal 2014-01-30 12:16:25 +05:30
parent ec7d64195f
commit 4ac45ee354
2 changed files with 9 additions and 9 deletions

View File

@ -208,20 +208,20 @@ class Diff(Dialog):
l.addWidget(v, l.rowCount(), 0, 1, -1)
r = l.rowCount()
self.bn = b = QToolButton(self)
b.setIcon(QIcon(I('back.png')))
b.clicked.connect(partial(self.view.next_change, 1))
b.setToolTip(_('Go to next change'))
b.setText(_('&Next change')), b.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
l.addWidget(b, r, l.columnCount(), 1, 1)
self.bp = b = QToolButton(self)
b.setIcon(QIcon(I('forward.png')))
b.setIcon(QIcon(I('back.png')))
b.clicked.connect(partial(self.view.next_change, -1))
b.setToolTip(_('Go to previous change'))
b.setText(_('&Previous change')), b.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
l.addWidget(b, r, l.columnCount(), 1, 1)
self.bn = b = QToolButton(self)
b.setIcon(QIcon(I('forward.png')))
b.clicked.connect(partial(self.view.next_change, 1))
b.setToolTip(_('Go to next change'))
b.setText(_('&Next change')), b.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
l.addWidget(b, r, l.columnCount(), 1, 1)
self.search = s = HistoryLineEdit2(self)
s.initialize('diff_search_history')
l.addWidget(s, r, l.columnCount(), 1, 1)

View File

@ -27,7 +27,7 @@ from calibre.gui2 import info_dialog
from calibre.gui2.tweak_book import tprefs
from calibre.gui2.tweak_book.editor.text import PlainTextEdit, get_highlighter, default_font_family, LineNumbers
from calibre.gui2.tweak_book.editor.themes import THEMES, default_theme, theme_color
from calibre.utils.diff import get_sequence_matcher
from calibre.gui2.tweak_book.diff import get_sequence_matcher
Change = namedtuple('Change', 'ltop lbot rtop rbot kind')