Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

workbench: add a "View" menu

with toggle entry "Show paths" and hide the "Path" column
in the reporegistry by default

Changeset b83e2c2f6953

Parent 03b5685d1c6b

by Adrian Buehlmann

Changes to 4 files · Browse files at b83e2c2f6953 Showing diff from parent 03b5685d1c6b Diff from another changeset...

 
241
242
243
 
244
245
246
 
253
254
255
 
 
 
 
 
 
 
241
242
243
244
245
246
247
 
254
255
256
257
258
259
260
261
262
@@ -241,6 +241,7 @@
  tv.setIndentation(10)   tv.setFirstColumnSpanned(0, QModelIndex(), True)   + self.tview.setColumnHidden(1, True)   QtCore.QTimer.singleShot(0, self.expand)     def expand(self): @@ -253,3 +254,9 @@
    def openrepo(self, path):   self.openRepoSignal.emit(path) + + def showPaths(self, show): + self.tview.setColumnHidden(1, not show) + if show: + self.tview.resizeColumnToContents(0) + self.tview.resizeColumnToContents(1)
 
255
256
257
 
258
259
260
 
352
353
354
 
 
 
355
356
357
 
255
256
257
258
259
260
261
 
353
354
355
356
357
358
359
360
361
@@ -255,6 +255,7 @@
  connect(self.actionQuit, SIGNAL('triggered()'), self.close)   connect(self.actionBack, SIGNAL('triggered()'), self.back)   connect(self.actionForward, SIGNAL('triggered()'), self.forward) + connect(self.actionShowPaths, SIGNAL('toggled(bool)'), self.actionShowPathsToggled)   self.actionQuit.setIcon(geticon('quit'))   self.actionRefresh.setIcon(geticon('reload'))   @@ -352,6 +353,9 @@
  connect(self.actionOpen_repository, SIGNAL('triggered()'),   self.openRepository)   + def actionShowPathsToggled(self, show): + self.reporegistry.showPaths(show) +   def back(self):   w = self.repoTabsWidget.currentWidget()   if w:
 
92
93
94
 
 
 
 
 
 
95
 
96
97
98
 
215
216
217
 
 
 
 
 
 
 
 
218
219
220
 
92
93
94
95
96
97
98
99
100
101
102
103
104
105
 
222
223
224
225
226
227
228
229
230
231
232
233
234
235
@@ -92,7 +92,14 @@
  <addaction name="actionAbout"/>   <addaction name="actionHelp"/>   </widget> + <widget class="QMenu" name="menuView"> + <property name="title"> + <string>View</string> + </property> + <addaction name="actionShowPaths"/> + </widget>   <addaction name="menuFile"/> + <addaction name="menuView"/>   <addaction name="menuHelp"/>   </widget>   <widget class="QStatusBar" name="statusbar"/> @@ -215,6 +222,14 @@
  <string>Forward</string>   </property>   </action> + <action name="actionShowPaths"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>Show paths</string> + </property> + </action>   </widget>   <customwidgets>   <customwidget>
 
2
3
4
5
 
6
7
8
 
54
55
56
 
 
57
58
59
 
95
96
97
 
 
 
98
99
100
101
102
103
 
104
 
105
106
107
 
119
120
121
 
122
123
124
 
135
136
137
 
138
139
140
 
2
3
4
 
5
6
7
8
 
54
55
56
57
58
59
60
61
 
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
 
126
127
128
129
130
131
132
 
143
144
145
146
147
148
149
@@ -2,7 +2,7 @@
   # Form implementation generated from reading ui file 'C:\Users\adi\hgrepos\thg-qt\tortoisehg\hgqt\workbench.ui'  # -# Created: Sun May 16 15:17:17 2010 +# Created: Tue May 18 01:00:57 2010  # by: PyQt4 UI code generator 4.7.3  #  # WARNING! All changes made in this file will be lost! @@ -54,6 +54,8 @@
  self.menuFile.setObjectName("menuFile")   self.menuHelp = QtGui.QMenu(self.menubar)   self.menuHelp.setObjectName("menuHelp") + self.menuView = QtGui.QMenu(self.menubar) + self.menuView.setObjectName("menuView")   MainWindow.setMenuBar(self.menubar)   self.statusbar = QtGui.QStatusBar(MainWindow)   self.statusbar.setObjectName("statusbar") @@ -95,13 +97,18 @@
  icon2.addPixmap(QtGui.QPixmap(":/icons/forward.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)   self.actionForward.setIcon(icon2)   self.actionForward.setObjectName("actionForward") + self.actionShowPaths = QtGui.QAction(MainWindow) + self.actionShowPaths.setCheckable(True) + self.actionShowPaths.setObjectName("actionShowPaths")   self.menuFile.addAction(self.actionOpen_repository)   self.menuFile.addAction(self.actionRefresh)   self.menuFile.addSeparator()   self.menuFile.addAction(self.actionQuit)   self.menuHelp.addAction(self.actionAbout)   self.menuHelp.addAction(self.actionHelp) + self.menuView.addAction(self.actionShowPaths)   self.menubar.addAction(self.menuFile.menuAction()) + self.menubar.addAction(self.menuView.menuAction())   self.menubar.addAction(self.menuHelp.menuAction())   self.toolBar_edit.addAction(self.actionRefresh)   self.toolBar_edit.addSeparator() @@ -119,6 +126,7 @@
  self.repoTabsWidget.setTabText(self.repoTabsWidget.indexOf(self.firstRepoTab), QtGui.QApplication.translate("MainWindow", "repo1", None, QtGui.QApplication.UnicodeUTF8))   self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))   self.menuHelp.setTitle(QtGui.QApplication.translate("MainWindow", "&Help", None, QtGui.QApplication.UnicodeUTF8)) + self.menuView.setTitle(QtGui.QApplication.translate("MainWindow", "View", None, QtGui.QApplication.UnicodeUTF8))   self.toolBar_edit.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Edit toolbar", None, QtGui.QApplication.UnicodeUTF8))   self.toolBar_treefilters.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Filter toolbar", None, QtGui.QApplication.UnicodeUTF8))   self.toolBar_diff.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Diff toolbar", None, QtGui.QApplication.UnicodeUTF8)) @@ -135,6 +143,7 @@
  self.actionHelp.setText(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8))   self.actionBack.setText(QtGui.QApplication.translate("MainWindow", "Back", None, QtGui.QApplication.UnicodeUTF8))   self.actionForward.setText(QtGui.QApplication.translate("MainWindow", "Forward", None, QtGui.QApplication.UnicodeUTF8)) + self.actionShowPaths.setText(QtGui.QApplication.translate("MainWindow", "Show paths", None, QtGui.QApplication.UnicodeUTF8))    from reporegistry import RepoRegistryView  import workbench_rc