Changeset f27379e5794e…
Parent 6ca3feb3d434…
by
Changes to 2 files · Browse files at f27379e5794e Showing diff from parent 6ca3feb3d434 Diff from another changeset...
|
|
@@ -0,0 +1,526 @@ + <?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="32"
+ height="32"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.48.1 "
+ version="1.0"
+ inkscape:export-filename="E:\src\thg\borho\icons\tortoise\clone.ico"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="status-check.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient7818"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#363f96;stop-opacity:1;"
+ offset="0"
+ id="stop7820" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient7414"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop7416" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient7624">
+ <stop
+ id="stop7626"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ style="stop-color:#a1d9da;stop-opacity:0.0173913;"
+ offset="0.28999999"
+ id="stop7628" />
+ <stop
+ id="stop7630"
+ offset="1"
+ style="stop-color:#43b3b6;stop-opacity:0.56521738;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4339">
+ <stop
+ style="stop-color:#c9b188;stop-opacity:1;"
+ offset="0"
+ id="stop4341" />
+ <stop
+ id="stop7632"
+ offset="0.5"
+ style="stop-color:#745c34;stop-opacity:1;" />
+ <stop
+ style="stop-color:#2f2424;stop-opacity:1;"
+ offset="1"
+ id="stop4343" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4299">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop4301" />
+ <stop
+ id="stop7622"
+ offset="0.08510638"
+ style="stop-color:#a1d9da;stop-opacity:0.0173913;" />
+ <stop
+ style="stop-color:#43b3b6;stop-opacity:0.56521738;"
+ offset="1"
+ id="stop4303" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3258">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3262" />
+ <stop
+ id="stop3264"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3244">
+ <stop
+ style="stop-color:#fce94f;stop-opacity:1;"
+ offset="0"
+ id="stop3246" />
+ <stop
+ id="stop3252"
+ offset="0.5"
+ style="stop-color:#fffce0;stop-opacity:1;" />
+ <stop
+ style="stop-color:#fceb50;stop-opacity:1;"
+ offset="1"
+ id="stop3248" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3244"
+ id="linearGradient3295"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(123.42857,334.07648)"
+ x1="10"
+ y1="13.0625"
+ x2="4.4375"
+ y2="13" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3258"
+ id="linearGradient3297"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9294606,0,0,0.9470405,124.13397,334.79144)"
+ x1="18.748869"
+ y1="13.0625"
+ x2="14.660361"
+ y2="13.046666" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3244"
+ id="linearGradient4317"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(123.42857,334.07648)"
+ x1="10"
+ y1="13.0625"
+ x2="4.4375"
+ y2="13" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3258"
+ id="linearGradient4319"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9294606,0,0,0.9470405,124.13397,334.79144)"
+ x1="18.748869"
+ y1="13.0625"
+ x2="14.660361"
+ y2="13.046666" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4299"
+ id="radialGradient4327"
+ gradientUnits="userSpaceOnUse"
+ cx="10.59375"
+ cy="10.59375"
+ fx="10.59375"
+ fy="10.59375"
+ r="8" />
+ <mask
+ maskUnits="userSpaceOnUse"
+ id="mask7610">
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path7612"
+ sodipodi:cx="12.5"
+ sodipodi:cy="12.5"
+ sodipodi:rx="7.5"
+ sodipodi:ry="7.5"
+ d="M 20,12.5 A 7.5,7.5 0 1 1 5,12.5 A 7.5,7.5 0 1 1 20,12.5 z"
+ transform="matrix(1.2187731,0,0,1.2187731,124.42745,321.67955)" />
+ </mask>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414"
+ id="linearGradient7418"
+ x1="144.16807"
+ y1="340.29114"
+ x2="153.49656"
+ y2="340.29114"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414"
+ id="linearGradient7514"
+ gradientUnits="userSpaceOnUse"
+ x1="144.16807"
+ y1="340.29114"
+ x2="153.49656"
+ y2="340.29114" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414-9"
+ id="linearGradient7514-2"
+ gradientUnits="userSpaceOnUse"
+ x1="144.16808"
+ y1="340.29114"
+ x2="153.49657"
+ y2="340.29114" />
+ <linearGradient
+ id="linearGradient7414-9"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#030e6f;stop-opacity:1;"
+ offset="0"
+ id="stop7416-6" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient7532"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop7534" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414-9"
+ id="linearGradient7512-2"
+ gradientUnits="userSpaceOnUse"
+ x1="144.16808"
+ y1="340.29114"
+ x2="153.49657"
+ y2="340.29114" />
+ <linearGradient
+ id="linearGradient7537"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop7539" />
+ </linearGradient>
+ <linearGradient
+ y2="340.29114"
+ x2="153.49657"
+ y1="340.29114"
+ x1="144.16808"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient7544-9"
+ xlink:href="#linearGradient7414-9-9"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient7414-9-9"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#121180;stop-opacity:1;"
+ offset="0"
+ id="stop7416-6-9" />
+ </linearGradient>
+ <linearGradient
+ y2="340.29114"
+ x2="153.49657"
+ y1="340.29114"
+ x1="144.16808"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient7593"
+ xlink:href="#linearGradient7414-9-9"
+ inkscape:collect="always" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414-9"
+ id="linearGradient7610"
+ gradientUnits="userSpaceOnUse"
+ x1="144.16808"
+ y1="340.29114"
+ x2="153.49657"
+ y2="340.29114" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414-7"
+ id="linearGradient7514-4"
+ gradientUnits="userSpaceOnUse"
+ x1="144.16808"
+ y1="340.29114"
+ x2="153.49657"
+ y2="340.29114" />
+ <linearGradient
+ id="linearGradient7414-7"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#030e6f;stop-opacity:1;"
+ offset="0"
+ id="stop7416-2" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient7647"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop7649" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414-7"
+ id="linearGradient7512-27"
+ gradientUnits="userSpaceOnUse"
+ x1="144.16808"
+ y1="340.29114"
+ x2="153.49657"
+ y2="340.29114" />
+ <linearGradient
+ id="linearGradient7652"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop7654" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414-7"
+ id="linearGradient7696"
+ gradientUnits="userSpaceOnUse"
+ x1="144.16808"
+ y1="340.29114"
+ x2="153.49657"
+ y2="340.29114" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414-7"
+ id="linearGradient7712"
+ gradientUnits="userSpaceOnUse"
+ x1="144.16808"
+ y1="340.29114"
+ x2="153.49657"
+ y2="340.29114" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7414-7-2"
+ id="linearGradient7712-3"
+ gradientUnits="userSpaceOnUse"
+ x1="144.16808"
+ y1="340.29114"
+ x2="153.49657"
+ y2="340.29114" />
+ <linearGradient
+ id="linearGradient7414-7-2"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#030e6f;stop-opacity:1;"
+ offset="0"
+ id="stop7416-2-2" />
+ </linearGradient>
+ <linearGradient
+ y2="340.29114"
+ x2="153.49657"
+ y1="340.29114"
+ x1="144.16808"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient7593-0"
+ xlink:href="#linearGradient7414-9-9-0"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient7414-9-9-0"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#121180;stop-opacity:1;"
+ offset="0"
+ id="stop7416-6-9-8" />
+ </linearGradient>
+ <linearGradient
+ y2="340.29114"
+ x2="153.49657"
+ y1="340.29114"
+ x1="144.16808"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient10729"
+ xlink:href="#linearGradient7414-9-9-0"
+ inkscape:collect="always" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3170"
+ id="linearGradient3176"
+ x1="56.50333"
+ y1="99.284218"
+ x2="72.847733"
+ y2="115.6289"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ id="linearGradient3170">
+ <stop
+ style="stop-color:#f35656;stop-opacity:1;"
+ offset="0"
+ id="stop3172" />
+ <stop
+ style="stop-color:#e40f0f;stop-opacity:1;"
+ offset="1"
+ id="stop3174" />
+ </linearGradient>
+ <linearGradient
+ y2="115.6289"
+ x2="72.847733"
+ y1="99.284218"
+ x1="56.50333"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11220"
+ xlink:href="#linearGradient3170"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="340.29114"
+ x2="153.49657"
+ y1="340.29114"
+ x1="144.16808"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient7593-9"
+ xlink:href="#linearGradient7414-9-9-8"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient7414-9-9-8"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#121180;stop-opacity:1;"
+ offset="0"
+ id="stop7416-6-9-2" />
+ </linearGradient>
+ <linearGradient
+ y2="340.29114"
+ x2="153.49657"
+ y1="340.29114"
+ x1="144.16808"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11253"
+ xlink:href="#linearGradient7414-9-9-8"
+ inkscape:collect="always" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="12.97099"
+ inkscape:cx="-1.9560382"
+ inkscape:cy="20.598566"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:grid-points="false"
+ showgrid="true"
+ inkscape:window-width="1680"
+ inkscape:window-height="1003"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1"
+ inkscape:snap-global="false">
+ <inkscape:grid
+ id="GridFromPre046Settings"
+ type="xygrid"
+ originx="0px"
+ originy="0px"
+ spacingx="1px"
+ spacingy="1px"
+ color="#0000ff"
+ empcolor="#0000ff"
+ opacity="0.2"
+ empopacity="0.4"
+ empspacing="4"
+ visible="true"
+ enabled="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+ <dc:title />
+ <dc:date>2008-05-05</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Peer Sommerlund</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:description>Icon for TortoiseHg dialog "Datamine"</dc:description>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/publicdomain/">
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="New Vector"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-123.42857,-334.07648)"
+ style="display:inline">
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:#363f96;fill-opacity:0.97076021;stroke:none;stroke-width:0.71499997;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path7792"
+ sodipodi:cx="6.3217998"
+ sodipodi:cy="-6.4704638"
+ sodipodi:rx="5.4737535"
+ sodipodi:ry="4.1631365"
+ d="m 11.795553,-6.4704638 c 0,0.058825 -0.0016,0.1176425 -0.0049,0.1764141"
+ transform="translate(123.42857,334.07648)"
+ sodipodi:start="0"
+ sodipodi:end="0.042387974"
+ sodipodi:open="true" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none"
+ d="m 129.67769,351.5307 8.8622,6.98604 12.02176,-16.79791"
+ id="path4093"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+</svg>
|
|
|
@@ -110,6 +110,14 @@ self.statusfilter = StatusFilterButton(
statustext=st, types=StatusType.preferredOrder)
+ self.checkAllTT = _('Check all files')
+ self.checkNoneTT = _('Uncheck all files')
+ self.checkAllNoneBtn = QToolButton()
+ self.checkAllNoneBtn.setCheckable(True)
+ self.checkAllNoneBtn.setToolTip(self.checkAllTT)
+ self.checkAllNoneBtn.setIcon(qtlib.geticon('status-check'))
+ self.checkAllNoneBtn.clicked.connect(self.checkAllNone)
+
self.filelistToolbar = QToolBar(_('Status File List Toolbar'))
self.filelistToolbar.setIconSize(QSize(16,16))
hbox.addWidget(self.filelistToolbar)
@@ -117,6 +125,8 @@ self.filelistToolbar.addSeparator()
self.filelistToolbar.addWidget(self.statusfilter)
self.filelistToolbar.addSeparator()
+ self.filelistToolbar.addWidget(self.checkAllNoneBtn)
+ self.filelistToolbar.addSeparator()
self.filelistToolbar.addWidget(self.refreshBtn)
self.actions = wctxactions.WctxActions(self.repo, self)
tv = WctxFileTree(self.repo)
@@ -134,22 +144,6 @@ vbox.addWidget(cpb)
cpb.clicked.connect(clearPattern)
- self.countlbl = QLabel()
- self.allbutton = QToolButton()
- self.allbutton.setText(_('All', 'files'))
- self.allbutton.setToolTip(_('Check all files'))
- self.allbutton.clicked.connect(self.checkAll)
- self.nonebutton = QToolButton()
- self.nonebutton.setText(_('None', 'files'))
- self.nonebutton.setToolTip(_('Uncheck all files'))
- self.nonebutton.clicked.connect(self.checkNone)
- hcbox = QHBoxLayout()
- vbox.addLayout(hcbox)
- hcbox.addWidget(self.allbutton)
- hcbox.addWidget(self.nonebutton)
- hcbox.addStretch(1)
- hcbox.addWidget(self.countlbl)
-
tv.setItemsExpandable(False)
tv.setRootIsDecorated(False)
tv.sortByColumn(COL_STATUS, Qt.AscendingOrder)
@@ -193,6 +187,14 @@ self.split = split
self.diffvbox = vbox
+ def checkAllNone(self):
+ if self.checkAllNoneBtn.isChecked():
+ self.checkAll()
+ self.checkAllNoneBtn.setToolTip(self.checkNoneTT)
+ else:
+ self.checkNone()
+ self.checkAllNoneBtn.setToolTip(self.checkAllTT)
+
def getTitle(self):
if self.pats:
return _('%s - status (selection filtered)') % self.repo.displayname
@@ -236,8 +238,7 @@ else:
self.reselection = None
- self.allbutton.setEnabled(False)
- self.nonebutton.setEnabled(False)
+ self.checkAllNoneBtn.setEnabled(False)
self.refreshBtn.setEnabled(False)
self.progress.emit(*cmdui.startProgress(_('Refresh'), _('status')))
self.refthread = StatusThread(self.repo, self.pctx, self.pats, self.opts)
@@ -250,8 +251,7 @@
def reloadComplete(self):
self.refthread.wait()
- self.allbutton.setEnabled(True)
- self.nonebutton.setEnabled(True)
+ self.checkAllNoneBtn.setEnabled(True)
self.refreshBtn.setEnabled(True)
self.progress.emit(*cmdui.stopProgress(_('Refresh')))
if self.refthread.wctx is not None:
@@ -331,8 +331,9 @@ model.setFilter(match)
def updateCheckCount(self):
- text = _('Checked count: %d') % len(self.getChecked())
- self.countlbl.setText(text)
+ model = self.tv.model()
+ if model:
+ model.checkCount = len(self.getChecked())
def checkAll(self):
model = self.tv.model()
@@ -524,6 +525,7 @@
def __init__(self, wctx, ms, pctx, savechecks, opts, checked, parent):
QAbstractTableModel.__init__(self, parent)
+ self.checkCount = 0
rows = []
nchecked = {}
excludes = [f.strip() for f in opts.get('ciexclude', '').split(',')]
@@ -621,6 +623,8 @@ return Qt.Unchecked
elif role == Qt.DisplayRole:
return QVariant("")
+ elif role == Qt.ToolTipRole:
+ return QVariant(_('Checked count: %d') % self.checkCount)
elif role == Qt.DisplayRole:
return QVariant(self.rows[index.row()][index.column()])
elif role == Qt.TextColorRole:
|
Loading...