1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Angel Ezquerra  committed a107899

icons: Add most missing workbench context menu icons

Three of the new icons are based on public domain icons:
hg-compress: Is the same as the package-x-generic.svg from the Tango theme
hg-purge: Based upon http://commons.wikimedia.org/wiki/File:Trash_Can.svg
hg-tranplant: Based upon http://www.openclipart.org/detail/48151

  • Participants
  • Parent commits 9f91e40
  • Branches stable

Comments (0)

Files changed (13)

File icons/scalable/actions/hg-bisect-bad-good.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-bisect-good-bad.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-bisect.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-compress.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-export.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-import.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-purge.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-recover.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-transplant.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-undo.svg

View file
  • Ignore whitespace
Added
New image

File icons/scalable/actions/hg-verify.svg

View file
  • Ignore whitespace
Added
New image

File tortoisehg/hgqt/repowidget.py

View file
  • Ignore whitespace
 from tortoisehg.util import shlib, hglib
 
 from tortoisehg.hgqt.i18n import _
+from tortoisehg.hgqt import qtlib
 from tortoisehg.hgqt.qtlib import geticon, getfont, QuestionMsgBox, InfoMsgBox
 from tortoisehg.hgqt.qtlib import CustomPrompt, SharedWidget, DemandWidget
 from tortoisehg.hgqt.repomodel import HgRepoListModel
             (None, isctx, _('Visual diff...'), 'visualdiff', self.visualDiffRevision),
             (None, isrev, _('Diff to local...'), 'ldiff', self.visualDiffToLocal),
             (None, fixed, _('Merge with...'), 'hg-merge', self.mergeWithRevision),
-            (None, isctx, _('Browse at rev...'), None, self.manifestRevision),
+            (None, isctx, _('Browse at rev...'), 'hg-annotate', self.manifestRevision),
             (None, fixed, _('Tag...'), 'hg-tag', self.tagToRevision),
             (None, fixed, _('Bookmark...'), 'bookmark', self.bookmarkRevision),
             (None, fixed, _('Backout...'), 'hg-revert', self.backoutToRevision),
-            (None, isrev, _('Export patch'), None, self.exportRevisions),
+            (None, isrev, _('Export patch'), 'hg-export', self.exportRevisions),
             (None, isrev, _('Email patch...'), 'mail-forward', self.emailRevision),
             (None, isrev, _('Archive...'), 'hg-archive', self.archiveRevision),
             (None, isctx, _('Copy patch'), 'copy-patch', self.copyPatch),
             (None, isrev, _('Copy hash'), 'copy-hash', self.copyHash),
-            ('transplant', fixed, _('Transplant to local'), None,
+            ('transplant', fixed, _('Transplant to local'), 'hg-transplant',
                 self.transplantRevision),
             ('rebase', None, None, None, None),
             ('rebase', fixed, _('Rebase...'), None, self.rebaseRevision),
             dlg.exec_()
 
         menu = QMenu(self)
-        for name, cb in (
-                (_('Visual Diff...'), diffPair),
-                (_('Export Pair'), exportPair),
-                (_('Email Pair...'), emailPair),
-                (_('Export DAG Range'), exportDagRange),
-                (_('Email DAG Range...'), emailDagRange),
-                (_('Bisect - Good, Bad...'), bisectNormal),
-                (_('Bisect - Bad, Good...'), bisectReverse),
-                (_('Compress History...'), compressDlg)
+        for name, cb, icon in (
+                (_('Visual Diff...'), diffPair, 'visualdiff'),
+                (_('Export Pair'), exportPair, 'hg-export'),
+                (_('Email Pair...'), emailPair, 'mail-forward'),
+                (_('Export DAG Range'), exportDagRange, 'hg-export'),
+                (_('Email DAG Range...'), emailDagRange, 'mail-forward'),
+                (_('Bisect - Good, Bad...'), bisectNormal, 'hg-bisect-good-bad'),
+                (_('Bisect - Bad, Good...'), bisectReverse, 'hg-bisect-bad-good'),
+                (_('Compress History...'), compressDlg, 'hg-compress')
                 ):
             a = QAction(name, self)
+            if icon:
+                a.setIcon(qtlib.geticon(icon))
             a.triggered.connect(cb)
             menu.addAction(a)
         if 'reviewboard' in self.repo.extensions():
         def emailSel():
             run.email(self.repo.ui, rev=self.menuselection, repo=self.repo)
         menu = QMenu(self)
-        for name, cb in (
-                (_('Export Selected'), exportSel),
-                (_('Email Selected...'), emailSel),
+        for name, cb, icon in (
+                (_('Export Selected'), exportSel, 'hg-export'),
+                (_('Email Selected...'), emailSel, 'mail-forward'),
                 ):
             a = QAction(name, self)
+            if icon:
+                a.setIcon(qtlib.geticon(icon))
             a.triggered.connect(cb)
             menu.addAction(a)
         if 'reviewboard' in self.repo.extensions():

File tortoisehg/hgqt/workbench.py

View file
  • Ignore whitespace
 
         newaction(_("Web Server"), self.serve, enabled='repoopen',
                   menu='repository', icon='proxy')
-        newaction(_("Bisect"), self._repofwd('bisect'),
+        newaction(_("Bisect"), self._repofwd('bisect'), icon='hg-bisect',
                   enabled='repoopen', menu='repository')
         newseparator(menu='repository')
         newaction(_("Shelve"), self._repofwd('shelve'), icon='shelve',
                   enabled='repoopen', menu='repository')
-        newaction(_("Import"), self._repofwd('thgimport'),
+        newaction(_("Import"), self._repofwd('thgimport'), icon='hg-import',
                   enabled='repoopen', menu='repository')
         newseparator(menu='repository')
         newaction(_("Verify"), self._repofwd('verify'), enabled='repoopen',
-                  menu='repository')
-        newaction(_("Recover"), self._repofwd('recover'), enabled='repoopen',
-                  menu='repository')
+                  icon='hg-verify', menu='repository')
+        newaction(_("Recover"), self._repofwd('recover'), icon='hg-recover',
+                  enabled='repoopen', menu='repository')
         newseparator(menu='repository')
         newaction(_("Resolve"), self._repofwd('resolve'), icon='hg-merge',
                   enabled='repoopen', menu='repository')
         newaction(_("Rollback/Undo"), self._repofwd('rollback'),
-                  enabled='repoopen', menu='repository')
+                  icon='hg-undo', enabled='repoopen', menu='repository')
         newaction(_("Purge"), self._repofwd('purge'), enabled='repoopen',
-                  menu='repository')
+                  icon='hg-purge', menu='repository')
         newseparator(menu='repository')
         newaction(_("Explore"), self.explore, shortcut='Shift+Ctrl+S',
                   icon='system-file-manager', enabled='repoopen',