diff -r 1a86766ed19a -r 7679d1d3671a Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py --- a/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Sat Jan 28 12:39:43 2017 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Sat Jan 28 14:22:00 2017 +0100 @@ -26,6 +26,8 @@ from .Ui_SvnLogBrowserDialog import Ui_SvnLogBrowserDialog +import UI.PixmapCache + class SvnLogBrowserDialog(QWidget, SvnDialogMixin, Ui_SvnLogBrowserDialog): """ @@ -47,6 +49,9 @@ self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) + self.upButton.setIcon(UI.PixmapCache.getIcon("1uparrow.png")) + self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow.png")) + self.filesTree.headerItem().setText(self.filesTree.columnCount(), "") self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder) @@ -68,6 +73,11 @@ 'R': self.tr('Replaced'), } + self.__logTreeNormalFont = self.logTree.font() + self.__logTreeNormalFont.setBold(False) + self.__logTreeBoldFont = self.logTree.font() + self.__logTreeBoldFont.setBold(True) + self.client = self.vcs.getClient() self.client.callback_cancel = \ self._clientCancelCallback @@ -427,6 +437,19 @@ self.diffPreviousButton.setEnabled( current != self.logTree.topLevelItem( self.logTree.topLevelItemCount() - 1)) + + # Highlight the current entry using a bold font + for col in range(self.logTree.columnCount()): + current and current.setFont(col, self.__logTreeBoldFont) + previous and previous.setFont(col, self.__logTreeNormalFont) + + # set the state of the up and down buttons + self.upButton.setEnabled( + current is not None and + self.logTree.indexOfTopLevelItem(current) > 0) + self.downButton.setEnabled( + current is not None and + int(current.text(0)) > 1) @pyqtSlot() def on_logTree_itemSelectionChanged(self): @@ -586,3 +609,25 @@ int(self.stopCheckBox.isChecked())) self.nextButton.setEnabled(True) self.limitSpinBox.setEnabled(True) + + @pyqtSlot() + def on_upButton_clicked(self): + """ + Private slot to move the current item up one entry. + """ + itm = self.logTree.itemAbove(self.logTree.currentItem()) + if itm: + self.logTree.setCurrentItem(itm) + + @pyqtSlot() + def on_downButton_clicked(self): + """ + Private slot to move the current item down one entry. + """ + itm = self.logTree.itemBelow(self.logTree.currentItem()) + if itm: + self.logTree.setCurrentItem(itm) + else: + # load the next bunch and try again + self.on_nextButton_clicked() + self.on_downButton_clicked()