Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py

changeset 781
2f85b5573e62
parent 537
72b32daeb8d6
child 782
2c567a5ceade
diff -r f0f24d2f9eab -r 2f85b5573e62 Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Mon Dec 27 17:21:59 2010 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Mon Dec 27 19:21:17 2010 +0100
@@ -9,7 +9,7 @@
 
 import os
 
-from PyQt4.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, QSize
+from PyQt4.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, QSize, QPoint
 from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \
     QApplication, QCursor, QWidget, QLineEdit, QColor, QPixmap, \
     QPainter, QPen, QBrush, QIcon
@@ -294,7 +294,16 @@
         pen = QPen(pencolor)
         pen.setWidth(penradius)
         painter.setPen(pen)
-        painter.drawEllipse(dot_x, dot_y, radius, radius)
+        if self.commandMode in ("incoming", "outgoing"):
+            offset = radius // 2
+            painter.drawConvexPolygon(
+                QPoint(dot_x + offset, dot_y), 
+                QPoint(dot_x, dot_y + offset), 
+                QPoint(dot_x + offset, dot_y + 2 * offset), 
+                QPoint(dot_x + 2 * offset, dot_y + offset)
+            )
+        else:
+            painter.drawEllipse(dot_x, dot_y, radius, radius)
         painter.end()
         return QIcon(pix)
     
@@ -697,9 +706,15 @@
             self.logTree.setCurrentItem(self.logTree.topLevelItem(0))
             self.__started = False
         
-        if noEntries < self.limitSpinBox.value() and not self.cancelled:
-            self.nextButton.setEnabled(False)
-            self.limitSpinBox.setEnabled(False)
+        if self.commandMode in ("incoming", "outgoing"):
+            self.commandMode = "log"    # switch to log mode
+            if self.__lastRev > 0:
+                self.nextButton.setEnabled(True)
+                self.limitSpinBox.setEnabled(True)
+        else:
+            if noEntries < self.limitSpinBox.value() and not self.cancelled:
+                self.nextButton.setEnabled(False)
+                self.limitSpinBox.setEnabled(False)
         
         # update the log filters
         self.__filterLogsEnabled = False

eric ide

mercurial