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

about: finetuning PyQt port

- use paths module to get thg resources
- hide context help button in title bar
- make dialog resizeable

Changeset 03b5685d1c6b

Parent 3ac24d4074f5

by Johan Samyn

Changes to 6 files · Browse files at 03b5685d1c6b Showing diff from parent 3ac24d4074f5 Diff from another changeset...

 
13
14
15
16
 
17
18
19
20
 
21
22
23
 
36
37
38
 
39
40
41
42
 
43
44
 
45
46
47
48
 
 
49
50
51
 
13
14
15
 
16
17
18
19
 
20
21
22
23
 
36
37
38
39
40
41
42
43
44
45
 
46
47
48
49
 
50
51
52
53
54
@@ -13,11 +13,11 @@
   import os, sys, urllib2   -from PyQt4.QtCore import PYQT_VERSION_STR, QT_VERSION_STR +from PyQt4.QtCore import PYQT_VERSION_STR, QT_VERSION_STR, Qt  from PyQt4.QtGui import QIcon, QPixmap, QDialog    from tortoisehg.hgqt.i18n import _ -from tortoisehg.util import version, hglib, shlib +from tortoisehg.util import version, hglib, shlib, paths    def make_version(tuple):   vers = ".".join([str(x) for x in tuple]) @@ -36,16 +36,19 @@
    def __init__(self, parent=None):   super(AboutDialog, self).__init__(parent) + self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)     self._qui = Ui_AboutDialog()   self._qui.setupUi(self)   + iconfile = paths.get_tortoise_icon('thg_logo.ico')   icon = QIcon() - icon.addPixmap(QPixmap("icons/thg_logo.ico"), QIcon.Normal, QIcon.Off) + icon.addPixmap(QPixmap(iconfile), QIcon.Normal, QIcon.Off)   self.setWindowIcon(icon)   self.setWindowTitle(_('About TortoiseHg'))   - self._qui.logo_label.setPixmap(QPixmap("icons/thg_logo_92x50.png")) + thglogofile = paths.get_tortoise_icon('thg_logo_92x50.png') + self._qui.logo_label.setPixmap(QPixmap(thglogofile))     thgv = version.version()   if '+' in thgv:
 
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
247
248
 
251
252
253
254
 
255
256
257
258
259
260
261
262
263
264
265
266
 
272
273
274
275
276
 
 
277
278
279
280
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
282
283
 
288
289
290
291
292
 
 
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
 
 
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
 
335
336
337
338
 
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
 
249
250
251
 
252
253
254
255
256
257
258
 
 
 
259
260
261
 
267
268
269
 
 
270
271
272
273
 
 
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
 
299
300
301
 
 
302
303
304
305
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
306
307
308
309
310
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
313
314
 
315
316
@@ -1,248 +1,246 @@
 <?xml version="1.0" encoding="UTF-8"?>  <ui version="4.0"> - <author>Johan Samyn &lt;johan.samyn@gmail.com&gt;</author>   <class>AboutDialog</class>   <widget class="QDialog" name="AboutDialog">   <property name="geometry">   <rect>   <x>0</x>   <y>0</y> - <width>324</width> - <height>277</height> + <width>327</width> + <height>306</height>   </rect>   </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>324</width> - <height>241</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>99999</width> - <height>99999</height> - </size> - </property>   <property name="windowTitle"> - <string>About TortoiseHg</string> - </property> - <property name="whatsThis"> - <string/> - </property> - <property name="locale"> - <locale language="English" country="UnitedStates"/> + <string>Dialog</string>   </property>   <property name="modal">   <bool>true</bool>   </property> - <widget class="QLabel" name="name_version_label"> - <property name="geometry"> - <rect> - <x>10</x> - <y>75</y> - <width>301</width> - <height>20</height> - </rect> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string notr="true">TortoiseHg (version %s)</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="libs_label"> - <property name="geometry"> - <rect> - <x>10</x> - <y>100</y> - <width>301</width> - <height>20</height> - </rect> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - <weight>50</weight> - <bold>false</bold> - </font> - </property> - <property name="text"> - <string>with Mercurial-%s, Python-%s, PyQt4-%s, Qt-%s</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="download_label"> - <property name="geometry"> - <rect> - <x>10</x> - <y>180</y> - <width>301</width> - <height>20</height> - </rect> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - <weight>50</weight> - <bold>false</bold> - </font> - </property> - <property name="text"> - <string>A new version of TortoisHg is ready for download!</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="copyright_label"> - <property name="geometry"> - <rect> - <x>10</x> - <y>130</y> - <width>301</width> - <height>20</height> - </rect> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - <weight>50</weight> - <bold>false</bold> - </font> - </property> - <property name="text"> - <string>Copyright 2008-2010 Steve Borho and others</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QPushButton" name="close_button"> - <property name="geometry"> - <rect> - <x>235</x> - <y>240</y> - <width>75</width> - <height>23</height> - </rect> - </property> - <property name="text"> - <string>&amp;Close</string> - </property> - </widget> - <widget class="QPushButton" name="license_button"> - <property name="geometry"> - <rect> - <x>15</x> - <y>240</y> - <width>75</width> - <height>23</height> - </rect> - </property> - <property name="text"> - <string>&amp;License</string> - </property> - </widget> - <widget class="QLabel" name="download_url_label"> - <property name="geometry"> - <rect> - <x>10</x> - <y>200</y> - <width>301</width> - <height>20</height> - </rect> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - <weight>50</weight> - <bold>false</bold> - </font> - </property> - <property name="mouseTracking"> - <bool>true</bool> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <property name="text"> - <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; + <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0"> + <item> + <layout class="QVBoxLayout" name="info_vlayout"> + <item> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="logo_label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>92</width> + <height>50</height> + </size> + </property> + <property name="text"> + <string>thg logo</string> + </property> + <property name="scaledContents"> + <bool>false</bool> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_6"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="name_version_label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <pointsize>14</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>TortoiseHg (version %s)</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="libs_label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>with Mercurial-%s, Python-%s, PyQt4-%s, Qt-%s</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_8"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="copyright_label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Copyright 2008-2010 Steve Borho and others</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="courtesy_label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Several icons are courtesy of the TortoiseSVN project</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_9"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="download_label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>A new version of TortoiseHg is ready for download!</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="download_url_label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="mouseTracking"> + <bool>true</bool> + </property> + <property name="text"> + <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;  &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;  p, li { white-space: pre-wrap; }  &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;  &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://thg_download_url&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://thg-download-url&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="openExternalLinks"> - <bool>false</bool> - </property> - </widget> - <widget class="QLabel" name="courtesy_label"> - <property name="geometry"> - <rect> - <x>10</x> - <y>150</y> - <width>301</width> - <height>20</height> - </rect> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - <weight>50</weight> - <bold>false</bold> - </font> - </property> - <property name="text"> - <string>Several icons are courtesy of the TortoiseSVN project</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="logo_label"> - <property name="geometry"> - <rect> - <x>116</x> - <y>16</y> - <width>92</width> - <height>50</height> - </rect> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="text"> - <string/> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_10"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="button_hlayout"> + <item> + <widget class="QPushButton" name="license_button"> + <property name="text"> + <string>&amp;License</string> + </property> + </widget> + </item> + <item> + <spacer name="button_hspacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="close_button"> + <property name="text"> + <string>&amp;Close</string> + </property> + </widget> + </item> + </layout> + </item> + </layout>   <action name="actionVisitDownloadSite">   <property name="checkable">   <bool>true</bool> @@ -251,16 +249,13 @@
  <string>visitDownloadSite</string>   </property>   </action> - <action name="actionshowLicense"> + <action name="actionShowLicense">   <property name="checkable">   <bool>true</bool>   </property>   <property name="text">   <string>showLicense</string>   </property> - <property name="toolTip"> - <string>showLicense</string> - </property>   </action>   </widget>   <resources/> @@ -272,12 +267,28 @@
  <slot>close()</slot>   <hints>   <hint type="sourcelabel"> - <x>272</x> - <y>251</y> + <x>261</x> + <y>253</y>   </hint>   <hint type="destinationlabel"> - <x>161</x> - <y>117</y> + <x>242</x> + <y>258</y> + </hint> + </hints> + </connection> + <connection> + <sender>license_button</sender> + <signal>clicked()</signal> + <receiver>AboutDialog</receiver> + <slot>actionShowLicense()</slot> + <hints> + <hint type="sourcelabel"> + <x>49</x> + <y>250</y> + </hint> + <hint type="destinationlabel"> + <x>92</x> + <y>258</y>   </hint>   </hints>   </connection> @@ -288,51 +299,18 @@
  <slot>actionVisitDownloadSite()</slot>   <hints>   <hint type="sourcelabel"> - <x>208</x> - <y>215</y> + <x>134</x> + <y>208</y>   </hint>   <hint type="destinationlabel"> - <x>205</x> - <y>241</y> - </hint> - </hints> - </connection> - <connection> - <sender>license_button</sender> - <signal>clicked()</signal> - <receiver>AboutDialog</receiver> - <slot>actionShowLicense()</slot> - <hints> - <hint type="sourcelabel"> - <x>47</x> - <y>254</y> - </hint> - <hint type="destinationlabel"> - <x>123</x> - <y>254</y> + <x>50</x> + <y>219</y>   </hint>   </hints>   </connection>   </connections> - <designerdata> - <property name="gridDeltaX"> - <number>5</number> - </property> - <property name="gridDeltaY"> - <number>5</number> - </property> - <property name="gridSnapX"> - <bool>true</bool> - </property> - <property name="gridSnapY"> - <bool>true</bool> - </property> - <property name="gridVisible"> - <bool>true</bool> - </property> - </designerdata>   <slots> + <slot>actionShowLicense()</slot>   <slot>actionVisitDownloadSite()</slot> - <slot>actionShowLicense()</slot>   </slots>  </ui>
 
1
2
3
 
4
5
 
6
7
8
 
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
 
1
2
 
3
4
 
5
6
7
8
 
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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-   -# Form implementation generated from reading ui file 'about.ui' +# Form implementation generated from reading ui file 'tortoisehg/hgqt/about.ui'  # -# Created: Mon May 10 22:27:06 2010 +# Created: Mon May 17 22:21:59 2010  # by: PyQt4 UI code generator 4.7.3  #  # WARNING! All changes made in this file will be lost! @@ -12,116 +12,158 @@
 class Ui_AboutDialog(object):   def setupUi(self, AboutDialog):   AboutDialog.setObjectName("AboutDialog") - AboutDialog.resize(324, 277) + AboutDialog.resize(327, 306) + AboutDialog.setModal(True) + self.verticalLayout = QtGui.QVBoxLayout(AboutDialog) + self.verticalLayout.setObjectName("verticalLayout") + self.info_vlayout = QtGui.QVBoxLayout() + self.info_vlayout.setObjectName("info_vlayout") + self.label_5 = QtGui.QLabel(AboutDialog) + self.label_5.setText("") + self.label_5.setObjectName("label_5") + self.info_vlayout.addWidget(self.label_5) + self.logo_label = QtGui.QLabel(AboutDialog) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.logo_label.sizePolicy().hasHeightForWidth()) + self.logo_label.setSizePolicy(sizePolicy) + self.logo_label.setMinimumSize(QtCore.QSize(92, 50)) + self.logo_label.setScaledContents(False) + self.logo_label.setAlignment(QtCore.Qt.AlignCenter) + self.logo_label.setObjectName("logo_label") + self.info_vlayout.addWidget(self.logo_label) + self.label_6 = QtGui.QLabel(AboutDialog) + self.label_6.setText("") + self.label_6.setObjectName("label_6") + self.info_vlayout.addWidget(self.label_6) + self.name_version_label = QtGui.QLabel(AboutDialog)   sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)   sizePolicy.setHorizontalStretch(0)   sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(AboutDialog.sizePolicy().hasHeightForWidth()) - AboutDialog.setSizePolicy(sizePolicy) - AboutDialog.setMinimumSize(QtCore.QSize(324, 241)) - AboutDialog.setMaximumSize(QtCore.QSize(99999, 99999)) - AboutDialog.setWhatsThis("") - AboutDialog.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) - AboutDialog.setModal(True) - self.name_version_label = QtGui.QLabel(AboutDialog) - self.name_version_label.setGeometry(QtCore.QRect(10, 75, 301, 20)) + sizePolicy.setHeightForWidth(self.name_version_label.sizePolicy().hasHeightForWidth()) + self.name_version_label.setSizePolicy(sizePolicy)   font = QtGui.QFont()   font.setPointSize(14)   font.setWeight(75)   font.setBold(True)   self.name_version_label.setFont(font) - self.name_version_label.setText("TortoiseHg (version %s)")   self.name_version_label.setAlignment(QtCore.Qt.AlignCenter)   self.name_version_label.setObjectName("name_version_label") + self.info_vlayout.addWidget(self.name_version_label)   self.libs_label = QtGui.QLabel(AboutDialog) - self.libs_label.setGeometry(QtCore.QRect(10, 100, 301, 20)) - font = QtGui.QFont() - font.setPointSize(8) - font.setWeight(50) - font.setBold(False) - self.libs_label.setFont(font) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.libs_label.sizePolicy().hasHeightForWidth()) + self.libs_label.setSizePolicy(sizePolicy)   self.libs_label.setAlignment(QtCore.Qt.AlignCenter)   self.libs_label.setObjectName("libs_label") + self.info_vlayout.addWidget(self.libs_label) + self.label_8 = QtGui.QLabel(AboutDialog) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth()) + self.label_8.setSizePolicy(sizePolicy) + self.label_8.setText("") + self.label_8.setObjectName("label_8") + self.info_vlayout.addWidget(self.label_8) + self.copyright_label = QtGui.QLabel(AboutDialog) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.copyright_label.sizePolicy().hasHeightForWidth()) + self.copyright_label.setSizePolicy(sizePolicy) + self.copyright_label.setAlignment(QtCore.Qt.AlignCenter) + self.copyright_label.setObjectName("copyright_label") + self.info_vlayout.addWidget(self.copyright_label) + self.courtesy_label = QtGui.QLabel(AboutDialog) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.courtesy_label.sizePolicy().hasHeightForWidth()) + self.courtesy_label.setSizePolicy(sizePolicy) + self.courtesy_label.setAlignment(QtCore.Qt.AlignCenter) + self.courtesy_label.setObjectName("courtesy_label") + self.info_vlayout.addWidget(self.courtesy_label) + self.label_9 = QtGui.QLabel(AboutDialog) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_9.sizePolicy().hasHeightForWidth()) + self.label_9.setSizePolicy(sizePolicy) + self.label_9.setText("") + self.label_9.setObjectName("label_9") + self.info_vlayout.addWidget(self.label_9)   self.download_label = QtGui.QLabel(AboutDialog) - self.download_label.setGeometry(QtCore.QRect(10, 180, 301, 20)) - font = QtGui.QFont() - font.setPointSize(8) - font.setWeight(50) - font.setBold(False) - self.download_label.setFont(font) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.download_label.sizePolicy().hasHeightForWidth()) + self.download_label.setSizePolicy(sizePolicy)   self.download_label.setAlignment(QtCore.Qt.AlignCenter)   self.download_label.setObjectName("download_label") - self.copyright_label = QtGui.QLabel(AboutDialog) - self.copyright_label.setGeometry(QtCore.QRect(10, 130, 301, 20)) - font = QtGui.QFont() - font.setPointSize(8) - font.setWeight(50) - font.setBold(False) - self.copyright_label.setFont(font) - self.copyright_label.setAlignment(QtCore.Qt.AlignCenter) - self.copyright_label.setObjectName("copyright_label") + self.info_vlayout.addWidget(self.download_label) + self.download_url_label = QtGui.QLabel(AboutDialog) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.download_url_label.sizePolicy().hasHeightForWidth()) + self.download_url_label.setSizePolicy(sizePolicy) + self.download_url_label.setMouseTracking(True) + self.download_url_label.setAlignment(QtCore.Qt.AlignCenter) + self.download_url_label.setObjectName("download_url_label") + self.info_vlayout.addWidget(self.download_url_label) + self.label_10 = QtGui.QLabel(AboutDialog) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_10.sizePolicy().hasHeightForWidth()) + self.label_10.setSizePolicy(sizePolicy) + self.label_10.setText("") + self.label_10.setObjectName("label_10") + self.info_vlayout.addWidget(self.label_10) + self.verticalLayout.addLayout(self.info_vlayout) + self.button_hlayout = QtGui.QHBoxLayout() + self.button_hlayout.setObjectName("button_hlayout") + self.license_button = QtGui.QPushButton(AboutDialog) + self.license_button.setObjectName("license_button") + self.button_hlayout.addWidget(self.license_button) + spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.button_hlayout.addItem(spacerItem)   self.close_button = QtGui.QPushButton(AboutDialog) - self.close_button.setGeometry(QtCore.QRect(235, 240, 75, 23))   self.close_button.setObjectName("close_button") - self.license_button = QtGui.QPushButton(AboutDialog) - self.license_button.setGeometry(QtCore.QRect(15, 240, 75, 23)) - self.license_button.setObjectName("license_button") - self.download_url_label = QtGui.QLabel(AboutDialog) - self.download_url_label.setGeometry(QtCore.QRect(10, 200, 301, 20)) - font = QtGui.QFont() - font.setPointSize(8) - font.setWeight(50) - font.setBold(False) - self.download_url_label.setFont(font) - self.download_url_label.setMouseTracking(True) - self.download_url_label.setFrameShape(QtGui.QFrame.NoFrame) - self.download_url_label.setFrameShadow(QtGui.QFrame.Plain) - self.download_url_label.setText("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" + self.button_hlayout.addWidget(self.close_button) + self.verticalLayout.addLayout(self.button_hlayout) + self.actionVisitDownloadSite = QtGui.QAction(AboutDialog) + self.actionVisitDownloadSite.setCheckable(True) + self.actionVisitDownloadSite.setObjectName("actionVisitDownloadSite") + self.actionShowLicense = QtGui.QAction(AboutDialog) + self.actionShowLicense.setCheckable(True) + self.actionShowLicense.setObjectName("actionShowLicense") + + self.retranslateUi(AboutDialog) + QtCore.QObject.connect(self.close_button, QtCore.SIGNAL("clicked()"), AboutDialog.close) + QtCore.QObject.connect(self.license_button, QtCore.SIGNAL("clicked()"), AboutDialog.actionShowLicense) + QtCore.QObject.connect(self.download_url_label, QtCore.SIGNAL("linkActivated(QString)"), AboutDialog.actionVisitDownloadSite) + QtCore.QMetaObject.connectSlotsByName(AboutDialog) + + def retranslateUi(self, AboutDialog): + AboutDialog.setWindowTitle(QtGui.QApplication.translate("AboutDialog", "Dialog", None, QtGui.QApplication.UnicodeUTF8)) + self.logo_label.setText(QtGui.QApplication.translate("AboutDialog", "thg logo", None, QtGui.QApplication.UnicodeUTF8)) + self.name_version_label.setText(QtGui.QApplication.translate("AboutDialog", "TortoiseHg (version %s)", None, QtGui.QApplication.UnicodeUTF8)) + self.libs_label.setText(QtGui.QApplication.translate("AboutDialog", "with Mercurial-%s, Python-%s, PyQt4-%s, Qt-%s", None, QtGui.QApplication.UnicodeUTF8)) + self.copyright_label.setText(QtGui.QApplication.translate("AboutDialog", "Copyright 2008-2010 Steve Borho and others", None, QtGui.QApplication.UnicodeUTF8)) + self.courtesy_label.setText(QtGui.QApplication.translate("AboutDialog", "Several icons are courtesy of the TortoiseSVN project", None, QtGui.QApplication.UnicodeUTF8)) + self.download_label.setText(QtGui.QApplication.translate("AboutDialog", "A new version of TortoiseHg is ready for download!", None, QtGui.QApplication.UnicodeUTF8)) + self.download_url_label.setText(QtGui.QApplication.translate("AboutDialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"  "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"  "p, li { white-space: pre-wrap; }\n"  "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt; font-weight:400; font-style:normal;\">\n" -"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"http://thg_download_url\"><span style=\" text-decoration: underline; color:#0000ff;\">http://thg-download-url</span></a></p></body></html>") - self.download_url_label.setAlignment(QtCore.Qt.AlignCenter) - self.download_url_label.setOpenExternalLinks(False) - self.download_url_label.setObjectName("download_url_label") - self.courtesy_label = QtGui.QLabel(AboutDialog) - self.courtesy_label.setGeometry(QtCore.QRect(10, 150, 301, 20)) - font = QtGui.QFont() - font.setPointSize(8) - font.setWeight(50) - font.setBold(False) - self.courtesy_label.setFont(font) - self.courtesy_label.setAlignment(QtCore.Qt.AlignCenter) - self.courtesy_label.setObjectName("courtesy_label") - self.logo_label = QtGui.QLabel(AboutDialog) - self.logo_label.setGeometry(QtCore.QRect(116, 16, 92, 50)) - self.logo_label.setAutoFillBackground(True) - self.logo_label.setFrameShape(QtGui.QFrame.NoFrame) - self.logo_label.setText("") - self.logo_label.setAlignment(QtCore.Qt.AlignCenter) - self.logo_label.setObjectName("logo_label") - self.actionVisitDownloadSite = QtGui.QAction(AboutDialog) - self.actionVisitDownloadSite.setCheckable(True) - self.actionVisitDownloadSite.setObjectName("actionVisitDownloadSite") - self.actionshowLicense = QtGui.QAction(AboutDialog) - self.actionshowLicense.setCheckable(True) - self.actionshowLicense.setObjectName("actionshowLicense") +"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"http://thg_download_url\"><span style=\" text-decoration: underline; color:#0000ff;\">http://thg-download-url</span></a></p></body></html>", None, QtGui.QApplication.UnicodeUTF8)) + self.license_button.setText(QtGui.QApplication.translate("AboutDialog", "&License", None, QtGui.QApplication.UnicodeUTF8)) + self.close_button.setText(QtGui.QApplication.translate("AboutDialog", "&Close", None, QtGui.QApplication.UnicodeUTF8)) + self.actionVisitDownloadSite.setText(QtGui.QApplication.translate("AboutDialog", "visitDownloadSite", None, QtGui.QApplication.UnicodeUTF8)) + self.actionShowLicense.setText(QtGui.QApplication.translate("AboutDialog", "showLicense", None, QtGui.QApplication.UnicodeUTF8))   - self.retranslateUi(AboutDialog) - QtCore.QObject.connect(self.close_button, QtCore.SIGNAL("clicked()"), AboutDialog.close) - QtCore.QObject.connect(self.download_url_label, QtCore.SIGNAL("linkActivated(QString)"), AboutDialog.actionVisitDownloadSite) - QtCore.QObject.connect(self.license_button, QtCore.SIGNAL("clicked()"), AboutDialog.actionShowLicense) - QtCore.QMetaObject.connectSlotsByName(AboutDialog) - - def retranslateUi(self, AboutDialog): - AboutDialog.setWindowTitle(QtGui.QApplication.translate("AboutDialog", "About TortoiseHg", None, QtGui.QApplication.UnicodeUTF8)) - self.libs_label.setText(QtGui.QApplication.translate("AboutDialog", "with Mercurial-%s, Python-%s, PyQt4-%s, Qt-%s", None, QtGui.QApplication.UnicodeUTF8)) - self.download_label.setText(QtGui.QApplication.translate("AboutDialog", "A new version of TortoisHg is ready for download!", None, QtGui.QApplication.UnicodeUTF8)) - self.copyright_label.setText(QtGui.QApplication.translate("AboutDialog", "Copyright 2008-2010 Steve Borho and others", None, QtGui.QApplication.UnicodeUTF8)) - self.close_button.setText(QtGui.QApplication.translate("AboutDialog", "&Close", None, QtGui.QApplication.UnicodeUTF8)) - self.license_button.setText(QtGui.QApplication.translate("AboutDialog", "&License", None, QtGui.QApplication.UnicodeUTF8)) - self.courtesy_label.setText(QtGui.QApplication.translate("AboutDialog", "Several icons are courtesy of the TortoiseSVN project", None, QtGui.QApplication.UnicodeUTF8)) - self.actionVisitDownloadSite.setText(QtGui.QApplication.translate("AboutDialog", "visitDownloadSite", None, QtGui.QApplication.UnicodeUTF8)) - self.actionshowLicense.setText(QtGui.QApplication.translate("AboutDialog", "showLicense", None, QtGui.QApplication.UnicodeUTF8)) - self.actionshowLicense.setToolTip(QtGui.QApplication.translate("AboutDialog", "showLicense", None, QtGui.QApplication.UnicodeUTF8)) -
 
11
12
13
 
14
15
16
 
17
18
19
 
26
27
28
 
29
30
 
31
32
 
33
34
35
36
 
37
38
39
 
11
12
13
14
15
16
17
18
19
20
21
 
28
29
30
31
32
33
34
35
 
36
37
38
39
 
40
41
42
43
@@ -11,9 +11,11 @@
 TortoiseHg License dialog - PyQt4 version  """   +from PyQt4.QtCore import Qt  from PyQt4.QtGui import QDialog, QIcon, QPixmap    from tortoisehg.hgqt.i18n import _ +from tortoisehg.util import paths    try:   from tortoisehg.hgqt.license_ui import Ui_LicenseDialog @@ -26,14 +28,16 @@
  """Dialog for showing the TortoiseHg license"""   def __init__(self, parent=None):   super(LicenseDialog, self).__init__(parent) + self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)   self._qui = Ui_LicenseDialog()   self._qui.setupUi(self) + iconfile = paths.get_tortoise_icon('thg_logo.ico')   icon = QIcon() - icon.addPixmap(QPixmap("icons/thg_logo.ico"), QIcon.Normal, QIcon.Off) + icon.addPixmap(QPixmap(iconfile), QIcon.Normal, QIcon.Off)   self.setWindowIcon(icon)   self.setWindowTitle(_('License'))   try: - lic = open('COPYING.txt', 'rb').read() + lic = open(paths.get_license_path(), 'rb').read()   self._qui.licenseText.setPlainText(lic)   except (IOError):   pass
 
32
33
34
35
36
37
38
39
40
 
72
73
74
75
76
77
78
79
80
 
32
33
34
 
 
 
35
36
37
 
69
70
71
 
 
 
72
73
74
@@ -32,9 +32,6 @@
  <property name="whatsThis">   <string notr="true"/>   </property> - <property name="locale"> - <locale language="English" country="UnitedStates"/> - </property>   <property name="sizeGripEnabled">   <bool>false</bool>   </property> @@ -72,9 +69,6 @@
  </item>   <item>   <widget class="QPushButton" name="btnClose"> - <property name="locale"> - <locale language="English" country="UnitedStates"/> - </property>   <property name="text">   <string>&amp;Close</string>   </property>
 
1
2
3
 
4
5
 
6
7
8
 
21
22
23
24
25
26
27
 
37
38
39
40
41
42
43
 
1
2
 
3
4
 
5
6
7
8
 
21
22
23
 
24
25
26
 
36
37
38
 
39
40
41
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-   -# Form implementation generated from reading ui file 'license.ui' +# Form implementation generated from reading ui file 'tortoisehg/hgqt/license.ui'  # -# Created: Mon May 10 22:26:55 2010 +# Created: Mon May 17 22:22:10 2010  # by: PyQt4 UI code generator 4.7.3  #  # WARNING! All changes made in this file will be lost! @@ -21,7 +21,6 @@
  LicenseDialog.setSizePolicy(sizePolicy)   LicenseDialog.setMaximumSize(QtCore.QSize(16777215, 16777215))   LicenseDialog.setWhatsThis("None") - LicenseDialog.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))   LicenseDialog.setSizeGripEnabled(False)   LicenseDialog.setModal(True)   self.verticalLayout = QtGui.QVBoxLayout(LicenseDialog) @@ -37,7 +36,6 @@
  spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)   self.horizontalLayout.addItem(spacerItem)   self.btnClose = QtGui.QPushButton(LicenseDialog) - self.btnClose.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))   self.btnClose.setFlat(False)   self.btnClose.setObjectName("btnClose")   self.horizontalLayout.addWidget(self.btnClose)