Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0, 2.0.1, and 2.0.2

stable workbench: use getmenuicon() for actions that are not in toolbars

Changeset 812d53b97fd2

Parent 96470f7e9e59

by Steve Borho

Changes to one file · Browse files at 812d53b97fd2 Showing diff from parent 96470f7e9e59 Diff from another changeset...

 
15
16
17
18
 
19
20
21
22
23
24
 
73
74
75
76
 
77
78
79
 
148
149
150
151
 
 
 
 
152
153
154
 
191
192
193
194
 
195
196
197
 
202
203
204
205
 
206
207
208
 
219
220
221
222
 
223
 
224
225
226
 
575
576
577
578
 
579
580
581
 
676
677
678
679
 
680
681
682
 
15
16
17
 
18
19
 
 
20
21
22
 
71
72
73
 
74
75
76
77
 
146
147
148
 
149
150
151
152
153
154
155
 
192
193
194
 
195
196
197
198
 
203
204
205
 
206
207
208
209
 
220
221
222
 
223
224
225
226
227
228
 
577
578
579
 
580
581
582
583
 
678
679
680
 
681
682
683
684
@@ -15,10 +15,8 @@
   from tortoisehg.util import paths, hglib   -from tortoisehg.hgqt import repomodel, thgrepo, cmdui +from tortoisehg.hgqt import repomodel, thgrepo, cmdui, qtlib  from tortoisehg.hgqt.i18n import _ -from tortoisehg.hgqt.qtlib import geticon, getfont -from tortoisehg.hgqt.qtlib import InfoMsgBox, WarningMsgBox  from tortoisehg.hgqt.repowidget import RepoWidget  from tortoisehg.hgqt.reporegistry import RepoRegistryView  from tortoisehg.hgqt.logcolumns import ColumnSelectDialog @@ -73,7 +71,7 @@
  desktopgeom = qApp.desktop().availableGeometry()   self.resize(desktopgeom.size() * 0.8)   - self.setWindowIcon(geticon('hg-log')) + self.setWindowIcon(qtlib.geticon('hg-log'))     self.repoTabsWidget = tw = QTabWidget()   tw.setDocumentMode(True) @@ -148,7 +146,10 @@
  else:   action.triggered.connect(slot)   if icon: - action.setIcon(geticon(icon)) + if toolbar: + action.setIcon(qtlib.geticon(icon)) + else: + action.setIcon(qtlib.getmenuicon(icon))   if shortcut:   action.setShortcut(keysequence(shortcut))   if tooltip: @@ -191,7 +192,7 @@
  a = self.reporegistry.toggleViewAction()   a.setText(_('Show Repository Registry'))   a.setShortcut('Ctrl+Shift+O') - a.setIcon(geticon('thg-reporegistry')) + a.setIcon(qtlib.geticon('thg-reporegistry'))   self.docktbar.addAction(a)   self.menuView.addAction(a)   @@ -202,7 +203,7 @@
  a = self.log.toggleViewAction()   a.setText(_('Show Output &Log'))   a.setShortcut('Ctrl+L') - a.setIcon(geticon('thg-console')) + a.setIcon(qtlib.geticon('thg-console'))   self.docktbar.addAction(a)   self.menuView.addAction(a)   @@ -219,8 +220,9 @@
  def addtaskview(icon, label, data=None):   if data is None:   data = len(self.actionGroupTaskView.actions()) - a = newaction(label, icon=icon, checkable=True, data=data, + a = newaction(label, icon=None, checkable=True, data=data,   enabled='repoopen', menu='view') + a.setIcon(qtlib.geticon(icon))   self.actionGroupTaskView.addAction(a)   self.tasktbar.addAction(a)   return a @@ -575,7 +577,7 @@
  repo = thgrepo.repository(path=path)   self.addRepoTab(repo)   except RepoError: - WarningMsgBox(_('Failed to open repository'), + qtlib.WarningMsgBox(_('Failed to open repository'),   _('%s is not a valid repository') % path)     def goto(self, root, rev): @@ -676,7 +678,7 @@
  finally:   os.chdir(cwd)   else: - InfoMsgBox(_('No shell configured'), + qtlib.InfoMsgBox(_('No shell configured'),   _('A terminal shell must be configured'))     def editSettings(self):