1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Elson Wei  committed f7afe63

mq: add icon in front of the patch to highlight the patch

There are three types of icon:
1. Applied patch
2. Pushable guarded patch
3. Non-pushable guarded patch

  • Participants
  • Parent commits ca414c9
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/mq.py

View file
  • Ignore whitespace
                 f = item.font()
                 f.setBold(True)
                 item.setFont(f)
-            elif not repo.mq.pushable(idx)[0]: # guarded
-                f = item.font()
-                f.setItalic(True)
-                item.setFont(f)
+                item.setIcon(qtlib.geticon('hg-patch-applied'))
+            else:
+                pushable, why = repo.mq.pushable(idx)
+                if not pushable: # guarded
+                    f = item.font()
+                    f.setItalic(True)
+                    item.setFont(f)
+                    item.setIcon(qtlib.geticon('hg-patch-guarded'))
+                elif why:
+                    item.setIcon(qtlib.geticon('hg-patch-unguarded'))
             patchguards = repo.mq.seriesguards[idx]
             if patchguards:
                 for guard in patchguards: