Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

reporegistry: hoist verification prompt up into reporegistry, more cleanup

The repotreeitem file is now very focused on item management, and the model
code is very focused on the model hierarchy

Changeset 95146b968419

Parent 6b7b41fb566e

by Steve Borho

Changes to 2 files · Browse files at 95146b968419 Showing diff from parent 6b7b41fb566e Diff from another changeset...

 
184
185
186
187
 
 
 
 
 
 
188
189
190
 
184
185
186
 
187
188
189
190
191
192
193
194
195
@@ -184,7 +184,12 @@
  return   s = self.selitem   if not s.internalPointer().okToDelete(self): - return + labels = [(QMessageBox.Yes, _('&Delete')), + (QMessageBox.No, _('Cancel'))] + if not qtlib.QuestionMsgBox(_('Confirm Delete'), + _("Delete Group '%s' and all its entries?")% + self.name, labels=labels, parent=self): + return   m = self.model()   row = s.row()   parent = s.parent()
 
7
8
9
10
 
11
12
13
14
15
16
17
18
 
118
119
120
121
122
123
124
125
126
127
128
129
 
134
135
136
137
 
138
139
140
 
261
262
263
264
265
266
267
268
269
270
 
 
271
272
273
 
7
8
9
 
10
11
12
13
14
 
15
16
17
 
117
118
119
 
 
 
 
 
 
120
121
122
 
127
128
129
 
130
131
132
133
 
254
255
256
 
 
 
 
 
 
 
257
258
259
260
261
@@ -7,12 +7,11 @@
   import sys, os   -from mercurial import node, error +from mercurial import node    from tortoisehg.util import hglib  from tortoisehg.hgqt.i18n import _  from tortoisehg.hgqt import qtlib, thgrepo -from tortoisehg.hgqt.settings import SettingsDialog    from PyQt4.QtCore import *  from PyQt4.QtGui import * @@ -118,12 +117,6 @@
  self.dump(xw)   xw.writeEndElement()   - def open(self, reuse=False): - pass - - def openAll(self): - pass -   def details(self):   return ''   @@ -134,7 +127,7 @@
  return ri   return None   - def okToDelete(self, parentWidget): + def okToDelete(self):   return True     @@ -261,13 +254,8 @@
  self.name = a.value('', 'name').toString()   RepoTreeItem.undump(self, xr)   - def okToDelete(self, parentWidget): - labels = [(QMessageBox.Yes, _('&Delete')), - (QMessageBox.No, _('Cancel'))] - return qtlib.QuestionMsgBox( - _('Confirm Delete'), - _("Delete Group '%s' and all its entries?") % self.name, - labels=labels, parent=parentWidget) + def okToDelete(self): + return False      class AllRepoGroupItem(RepoTreeItem):