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:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
 
 
 
 
 
 
95
 
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
 
 
 
 
 
 
 
 
218
219
220
221
222
223
224
225
226
227
228
229
230
231
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
 <?xml version="1.0" encoding="UTF-8"?>  <ui version="4.0">   <class>MainWindow</class>   <widget class="QMainWindow" name="MainWindow">   <property name="geometry">   <rect>   <x>0</x>   <y>0</y>   <width>671</width>   <height>669</height>   </rect>   </property>   <property name="windowTitle">   <string>MainWindow</string>   </property>   <property name="windowIcon">   <iconset resource="workbench.qrc">   <normaloff>:/icons/log.svg</normaloff>:/icons/log.svg</iconset>   </property>   <widget class="QWidget" name="centralwidget">   <layout class="QHBoxLayout" name="horizontalLayout">   <property name="spacing">   <number>0</number>   </property>   <property name="margin">   <number>0</number>   </property>   <item>   <widget class="QSplitter" name="reporegistry_splitter">   <property name="orientation">   <enum>Qt::Horizontal</enum>   </property>   <widget class="RepoRegistryView" name="reporegistry" native="true">   <property name="sizePolicy">   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">   <horstretch>0</horstretch>   <verstretch>0</verstretch>   </sizepolicy>   </property>   </widget>   <widget class="QTabWidget" name="repoTabsWidget">   <property name="sizePolicy">   <sizepolicy hsizetype="Expanding" vsizetype="Expanding">   <horstretch>1</horstretch>   <verstretch>0</verstretch>   </sizepolicy>   </property>   <property name="currentIndex">   <number>0</number>   </property>   <property name="documentMode">   <bool>true</bool>   </property>   <property name="tabsClosable">   <bool>true</bool>   </property>   <property name="movable">   <bool>true</bool>   </property>   <widget class="QWidget" name="firstRepoTab">   <attribute name="title">   <string>repo1</string>   </attribute>   </widget>   </widget>   </widget>   </item>   </layout>   </widget>   <widget class="QMenuBar" name="menubar">   <property name="geometry">   <rect>   <x>0</x>   <y>0</y>   <width>671</width>   <height>19</height>   </rect>   </property>   <widget class="QMenu" name="menuFile">   <property name="title">   <string>&amp;File</string>   </property>   <addaction name="actionOpen_repository"/>   <addaction name="actionRefresh"/>   <addaction name="separator"/>   <addaction name="actionQuit"/>   </widget>   <widget class="QMenu" name="menuHelp">   <property name="title">   <string>&amp;Help</string>   </property>   <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"/>   <widget class="QToolBar" name="toolBar_edit">   <property name="enabled">   <bool>true</bool>   </property>   <property name="windowTitle">   <string>Edit toolbar</string>   </property>   <attribute name="toolBarArea">   <enum>TopToolBarArea</enum>   </attribute>   <attribute name="toolBarBreak">   <bool>false</bool>   </attribute>   <addaction name="actionRefresh"/>   <addaction name="separator"/>   <addaction name="actionBack"/>   <addaction name="actionForward"/>   <addaction name="separator"/>   </widget>   <widget class="QToolBar" name="toolBar_treefilters">   <property name="enabled">   <bool>true</bool>   </property>   <property name="windowTitle">   <string>Filter toolbar</string>   </property>   <attribute name="toolBarArea">   <enum>TopToolBarArea</enum>   </attribute>   <attribute name="toolBarBreak">   <bool>false</bool>   </attribute>   </widget>   <widget class="QToolBar" name="toolBar_diff">   <property name="windowTitle">   <string>Diff toolbar</string>   </property>   <attribute name="toolBarArea">   <enum>TopToolBarArea</enum>   </attribute>   <attribute name="toolBarBreak">   <bool>false</bool>   </attribute>   </widget>   <widget class="QToolBar" name="toolBar_help">   <property name="windowTitle">   <string>Help toolbar</string>   </property>   <attribute name="toolBarArea">   <enum>TopToolBarArea</enum>   </attribute>   <attribute name="toolBarBreak">   <bool>false</bool>   </attribute>   <addaction name="actionHelp"/>   </widget>   <action name="actionOpen_repository">   <property name="text">   <string>&amp;Open repository</string>   </property>   <property name="shortcut">   <string>Ctrl+O</string>   </property>   </action>   <action name="actionRefresh">   <property name="text">   <string>&amp;Refresh</string>   </property>   <property name="shortcut">   <string>Ctrl+R</string>   </property>   </action>   <action name="actionQuit">   <property name="text">   <string>E&amp;xit</string>   </property>   <property name="iconText">   <string>Exit</string>   </property>   <property name="toolTip">   <string>Exit</string>   </property>   <property name="shortcut">   <string notr="true"/>   </property>   </action>   <action name="actionAbout">   <property name="text">   <string>About</string>   </property>   </action>   <action name="actionDisplayAllBranches">   <property name="text">   <string>displayAllBranches</string>   </property>   </action>   <action name="actionHelp">   <property name="text">   <string>Help</string>   </property>   </action>   <action name="actionBack">   <property name="icon">   <iconset resource="workbench.qrc">   <normaloff>:/icons/back.svg</normaloff>:/icons/back.svg</iconset>   </property>   <property name="text">   <string>Back</string>   </property>   </action>   <action name="actionForward">   <property name="icon">   <iconset resource="workbench.qrc">   <normaloff>:/icons/forward.svg</normaloff>:/icons/forward.svg</iconset>   </property>   <property name="text">   <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>   <class>RepoRegistryView</class>   <extends>QWidget</extends>   <header>reporegistry.h</header>   <container>1</container>   </customwidget>   </customwidgets>   <resources>   <include location="workbench.qrc"/>   </resources>   <connections/>  </ui>
 
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