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

csinfo: add 'expandable' option to SummaryPanel

Changeset d28448f4f877

Parent 5d47fa12d6fc

by Yuki KODAMA

Changes to 5 files · Browse files at d28448f4f877 Showing diff from parent 5d47fa12d6fc Diff from another changeset...

 
9
10
11
12
13
 
 
14
15
16
17
18
19
20
 
21
22
23
 
474
475
476
 
477
478
 
479
480
481
 
486
487
488
489
 
 
 
 
 
 
 
 
 
 
 
 
 
490
491
492
 
501
502
503
 
 
 
504
505
506
 
9
10
11
 
 
12
13
14
15
16
17
18
19
 
20
21
22
23
 
474
475
476
477
478
479
480
481
482
483
 
488
489
490
 
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
 
515
516
517
518
519
520
521
522
523
@@ -9,15 +9,15 @@
 import os  import binascii   -from PyQt4.QtCore import Qt -from PyQt4.QtGui import QWidget, QLabel, QHBoxLayout +from PyQt4.QtCore import Qt, QSize +from PyQt4.QtGui import QWidget, QLabel, QHBoxLayout, QPushButton    from mercurial import patch, util, error  from mercurial.node import hex    from tortoisehg.util import hglib, paths  from tortoisehg.hgqt.i18n import _ -from tortoisehg.hgqt import qtlib +from tortoisehg.hgqt import qtlib, icon    PANEL_DEFAULT = ('rev', 'summary', 'user', 'dateage', 'branch', 'tags',   'transplant', 'p4', 'svn') @@ -474,8 +474,10 @@
    hbox = QHBoxLayout()   hbox.setMargin(0) + hbox.setSpacing(0)   self.setLayout(hbox)   self.revlabel = None + self.expand_btn = None     def update(self, target=None, style=None, custom=None, repo=None):   if not SummaryBase.update(self, target, custom, repo): @@ -486,7 +488,19 @@
    if self.revlabel is None:   self.revlabel = QLabel() - self.layout().addWidget(self.revlabel) + self.layout().addWidget(self.revlabel, alignment=Qt.AlignTop) + + if 'expandable' in self.csstyle and self.csstyle['expandable']: + if self.expand_btn is None: + self.expand_btn = qtlib.PMButton() + self.expand_btn.clicked.connect(lambda: self.update()) + margin = QHBoxLayout() + margin.setMargin(3) + margin.addWidget(self.expand_btn, alignment=Qt.AlignTop) + self.layout().insertLayout(0, margin) + self.expand_btn.setShown(True) + elif self.expand_btn is not None: + self.expand_btn.setHidden(True)     if 'selectable' in self.csstyle:   sel = self.csstyle['selectable'] @@ -501,6 +515,9 @@
    # build info   contents = self.csstyle.get('contents', ()) + if 'expandable' in self.csstyle and self.expand_btn is not None \ + and self.expand_btn.is_collapsed(): + contents = contents[0:1]     if 'margin' in self.csstyle:   margin = self.csstyle['margin']
Added image
Added image
 
18
19
20
 
 
21
22
 
18
19
20
21
22
23
24
@@ -18,5 +18,7 @@
  <file>icons/clean.svg</file>   <file>icons/mqdiff.svg</file>   <file>icons/mqpatch.svg</file> + <file>icons/plus.png</file> + <file>icons/minus.png</file>   </qresource>  </RCC>
 
2
3
4
5
 
6
7
8
 
2937
2938
2939
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2940
2941
2942
 
13144
13145
13146
 
 
 
 
 
 
 
 
 
 
 
 
13147
13148
13149
 
13171
13172
13173
 
 
 
 
13174
13175
13176
 
13223
13224
13225
 
 
 
 
13226
13227
13228
13229
13230
 
13231
 
 
13232
13233
13234
 
 
13235
13236
13237
13238
13239
13240
 
 
 
 
13241
13242
13243
 
 
13244
13245
13246
13247
13248
 
 
 
 
13249
13250
13251
 
2
3
4
 
5
6
7
8
 
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
 
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
 
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
 
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
 
13264
13265
13266
13267
13268
 
 
13269
13270
13271
13272
 
 
 
 
13273
13274
13275
13276
13277
 
 
13278
13279
13280
 
 
 
 
13281
13282
13283
13284
13285
13286
13287
@@ -2,7 +2,7 @@
   # Resource object code  # -# Created: Mi 12. Mai 00:18:31 2010 +# Created: ? 5 19 18:11:55 2010  # by: The Resource Compiler for PyQt (Qt v4.6.2)  #  # WARNING! All changes made in this file will be lost! @@ -2937,6 +2937,20 @@
 \x69\x64\x3d\x22\x70\x61\x74\x68\x34\x30\x33\x37\x22\x20\x2f\x3e\  \x0a\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0a\x20\x20\x3c\x2f\x67\x3e\  \x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ +\x00\x00\x00\xbc\ +\x89\ +\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ +\x00\x00\x0b\x00\x00\x00\x0b\x08\x06\x00\x00\x00\xa9\xac\x77\x26\ +\x00\x00\x00\x83\x49\x44\x41\x54\x78\xda\x63\x64\x20\x01\x30\x82\ +\x88\x89\x13\x27\x66\x00\xa9\xe9\x78\xd4\x65\xe6\xe7\xe7\xcf\x80\ +\x29\xfe\x9f\x9d\x9d\x8d\x53\xe5\xd4\xa9\x53\x19\x80\x8a\x19\xb1\ +\x2a\xd6\x75\x2b\x63\xb8\xbc\xab\x0b\xb7\xe2\xcc\xac\x2c\xb8\xa4\ +\xbe\x7b\x39\xc3\xc5\x9d\x9d\x70\xfe\xf4\x69\xd3\x30\x15\x83\x14\ +\xa1\x03\x90\x26\x0c\xc5\x31\x31\xd1\x70\x05\x36\xa1\x6d\x0c\x47\ +\x56\x57\xc1\xf9\x4b\x96\x2c\x45\x55\x1c\x14\x14\x04\x97\x74\x8b\ +\xef\x67\xd8\xb5\xb0\x10\xce\x5f\xb7\x6e\x1d\x6e\xc5\xe8\x00\x5d\ +\x31\xf1\xe1\x4c\x2c\x00\x00\x7a\x06\x4a\x0c\x2c\x7d\x60\x4f\x00\ +\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\  \x00\x00\x7d\x6a\  \x3c\  \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ @@ -13144,6 +13158,18 @@
 \x3e\x21\x3c\x2f\x74\x73\x70\x61\x6e\x3e\x3c\x2f\x74\x65\x78\x74\  \x3e\x0a\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0a\x20\x20\x3c\x2f\x67\  \x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ +\x00\x00\x00\x9f\ +\x89\ +\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ +\x00\x00\x0b\x00\x00\x00\x0b\x08\x06\x00\x00\x00\xa9\xac\x77\x26\ +\x00\x00\x00\x66\x49\x44\x41\x54\x78\xda\x63\x64\x20\x01\x30\x82\ +\x88\x89\x13\x27\x66\x00\xa9\xe9\x78\xd4\x65\xe6\xe7\xe7\xcf\x80\ +\x29\xfe\x9f\x9d\x9d\x8d\x53\xe5\xd4\xa9\x53\x19\x80\x8a\x19\xc9\ +\x53\x9c\x99\x95\x05\x97\x64\x02\x0a\xff\xfb\xff\x1f\xce\x9f\x3e\ +\x6d\x1a\xa6\x62\x7d\xf7\x72\x0c\x53\x2f\xee\xec\xc4\x54\x1c\x13\ +\x13\x8d\xd3\x19\x4b\x96\x2c\x45\x55\x1c\x14\x14\x84\x53\xf1\xba\ +\x75\xeb\xc8\x57\x4c\x7c\x38\x13\x0b\x00\x5c\x1a\x41\x0c\x1f\x26\ +\xac\xa0\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\  "    qt_resource_name = "\ @@ -13171,6 +13197,10 @@
 \x0b\xd7\x54\x87\  \x00\x6c\  \x00\x65\x00\x66\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\ +\x00\x08\ +\x03\xc6\x59\xa7\ +\x00\x70\ +\x00\x6c\x00\x75\x00\x73\x00\x2e\x00\x70\x00\x6e\x00\x67\  \x00\x0c\  \x01\x3c\x05\x47\  \x00\x6d\ @@ -13223,29 +13253,35 @@
 \x0f\xc7\xd5\x87\  \x00\x6d\  \x00\x71\x00\x64\x00\x69\x00\x66\x00\x66\x00\x2e\x00\x73\x00\x76\x00\x67\ +\x00\x09\ +\x05\xc6\xbf\x47\ +\x00\x6d\ +\x00\x69\x00\x6e\x00\x75\x00\x73\x00\x2e\x00\x70\x00\x6e\x00\x67\  "    qt_resource_struct = "\  \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x12\x00\x00\x00\x02\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x14\x00\x00\x00\x02\  \x00\x00\x00\x10\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x01\x00\x00\xb7\x00\ +\x00\x00\x00\xe6\x00\x00\x00\x00\x00\x01\x00\x01\x7b\x8f\  \x00\x00\x00\x8a\x00\x00\x00\x00\x00\x01\x00\x00\xb6\x40\ -\x00\x00\x00\xd0\x00\x00\x00\x00\x00\x01\x00\x01\x7a\xcf\ -\x00\x00\x01\x2e\x00\x00\x00\x00\x00\x01\x00\x02\x8a\x94\ +\x00\x00\x01\x44\x00\x00\x00\x00\x00\x01\x00\x02\x8b\x54\ +\x00\x00\x01\xd8\x00\x00\x00\x00\x00\x01\x00\x03\x33\x26\  \x00\x00\x00\x26\x00\x00\x00\x00\x00\x01\x00\x00\x3d\x90\  \x00\x00\x00\x3e\x00\x00\x00\x00\x00\x01\x00\x00\x41\x9b\ -\x00\x00\x01\x92\x00\x00\x00\x00\x00\x01\x00\x02\xdf\x58\ -\x00\x00\x01\x18\x00\x00\x00\x00\x00\x01\x00\x02\x6b\x45\ -\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x01\x00\x01\x33\xae\ -\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x01\x00\x01\x9e\x6d\ +\x00\x00\x01\xa8\x00\x00\x00\x00\x00\x01\x00\x02\xe0\x18\ +\x00\x00\x01\x2e\x00\x00\x00\x00\x00\x01\x00\x02\x6c\x05\ +\x00\x00\x00\xbe\x00\x00\x00\x00\x00\x01\x00\x01\x34\x6e\ +\x00\x00\x00\xfa\x00\x00\x00\x00\x00\x01\x00\x01\x9f\x2d\  \x00\x00\x00\x54\x00\x00\x00\x00\x00\x01\x00\x00\x98\xf0\ -\x00\x00\x01\x48\x00\x00\x00\x00\x00\x01\x00\x02\xa6\x1c\ -\x00\x00\x01\x00\x00\x00\x00\x00\x00\x01\x00\x01\xbd\x3d\ +\x00\x00\x01\x5e\x00\x00\x00\x00\x00\x01\x00\x02\xa6\xdc\ +\x00\x00\x01\x16\x00\x00\x00\x00\x00\x01\x00\x01\xbd\xfd\  \x00\x00\x00\x74\x00\x00\x00\x00\x00\x01\x00\x00\xa9\x63\ -\x00\x00\x00\xba\x00\x00\x00\x00\x00\x01\x00\x01\x53\xad\ -\x00\x00\x01\x64\x00\x00\x00\x00\x00\x01\x00\x02\xc6\x1b\ -\x00\x00\x01\x7a\x00\x00\x00\x00\x00\x01\x00\x02\xd2\x72\ -\x00\x00\x01\xa8\x00\x00\x00\x00\x00\x01\x00\x02\xff\xc8\ +\x00\x00\x00\xd0\x00\x00\x00\x00\x00\x01\x00\x01\x54\x6d\ +\x00\x00\x01\x7a\x00\x00\x00\x00\x00\x01\x00\x02\xc6\xdb\ +\x00\x00\x01\x90\x00\x00\x00\x00\x00\x01\x00\x02\xd3\x32\ +\x00\x00\x01\xbe\x00\x00\x00\x00\x00\x01\x00\x03\x00\x88\  "    def qInitResources():