Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.3, 2.0, and 2.0.1

stable mq: disable toolbar while cmdui.Runner is busy

Changeset 2a9c0a40db96

Parent c875c466b34e

by Steve Borho

Changes to one file · Browse files at 2a9c0a40db96 Showing diff from parent c875c466b34e Diff from another changeset...

 
20
21
22
23
24
25
26
27
 
71
72
73
74
 
75
76
77
 
227
228
229
 
230
231
232
 
238
239
240
 
241
242
243
 
247
248
249
 
250
251
252
 
256
257
258
 
259
260
261
 
265
266
267
 
268
269
270
 
276
277
278
 
279
280
281
 
309
310
311
 
312
313
314
 
329
330
331
 
332
333
334
 
337
338
339
 
340
341
342
 
420
421
422
 
423
424
425
 
431
432
433
 
434
435
436
 
648
649
650
 
651
652
653
 
20
21
22
 
 
23
24
25
 
69
70
71
 
72
73
74
75
 
225
226
227
228
229
230
231
 
237
238
239
240
241
242
243
 
247
248
249
250
251
252
253
 
257
258
259
260
261
262
263
 
267
268
269
270
271
272
273
 
279
280
281
282
283
284
285
 
313
314
315
316
317
318
319
 
334
335
336
337
338
339
340
 
343
344
345
346
347
348
349
 
427
428
429
430
431
432
433
 
439
440
441
442
443
444
445
 
657
658
659
660
661
662
663
@@ -20,8 +20,6 @@
 from tortoisehg.hgqt import qtlib, cmdui, rejects, commit, qscilib  from tortoisehg.hgqt import qqueue, fileview   -# TODO: Disable MQ toolbar while cmdui.Runner is busy -  class MQWidget(QWidget):   showMessage = pyqtSignal(unicode)   output = pyqtSignal(QString, QString) @@ -71,7 +69,7 @@
  layout.setContentsMargins(0, 0, 0, 0)   self.queueFrame.setLayout(layout)   - qtbarhbox = QHBoxLayout() + self.qtbar = qtbarhbox = QHBoxLayout()   qtbarhbox.setSpacing(5)   layout.addLayout(qtbarhbox, 0)   qtbarhbox.setContentsMargins(0, 0, 0, 0) @@ -227,6 +225,7 @@
    @pyqtSlot(int)   def onCommandFinished(self, ret): + self.qtbar.setEnabled(True)   self.repo.decrementBusyCount()   if ret is not 0:   pass # TODO: look for reject notifications @@ -238,6 +237,7 @@
  self.repo.incrementBusyCount()   cmdline = ['qpush', '-R', self.repo.root, '--all']   cmdline += self.getUserOptions('force', 'exact') + self.qtbar.setEnabled(False)   self.cmd.run(cmdline)     @pyqtSlot() @@ -247,6 +247,7 @@
  self.repo.incrementBusyCount()   cmdline = ['qpush', '-R', self.repo.root]   cmdline += self.getUserOptions('force', 'exact') + self.qtbar.setEnabled(False)   self.cmd.run(cmdline)     @pyqtSlot() @@ -256,6 +257,7 @@
  self.repo.incrementBusyCount()   cmdline = ['qpop', '-R', self.repo.root, '--all']   cmdline += self.getUserOptions('force') + self.qtbar.setEnabled(False)   self.cmd.run(cmdline)     @pyqtSlot() @@ -265,6 +267,7 @@
  self.repo.incrementBusyCount()   cmdline = ['qpop', '-R', self.repo.root]   cmdline += self.getUserOptions('force') + self.qtbar.setEnabled(False)   self.cmd.run(cmdline)     @pyqtSlot() @@ -276,6 +279,7 @@
  cmdline += self.getUserOptions('force')   cmdline += ['--move', '--', patch]   self.repo.incrementBusyCount() + self.qtbar.setEnabled(False)   self.cmd.run(cmdline)     @pyqtSlot() @@ -309,6 +313,7 @@
  if self.cmd.running():   return   self.repo.incrementBusyCount() + self.qtbar.setEnabled(False)   self.cmd.run(cmdline)     @pyqtSlot() @@ -329,6 +334,7 @@
  cmdline += self.getUserOptions('force')   cmdline += ['--', item._thgpatch]   self.repo.incrementBusyCount() + self.qtbar.setEnabled(False)   self.cmd.run(cmdline)     #@pyqtSlot(QListWidgetItem) @@ -337,6 +343,7 @@
  if self.cmd.running():   return   self.repo.incrementBusyCount() + self.qtbar.setEnabled(False)   self.cmd.run(['qrename', '-R', self.repo.root, '--',   item._thgpatch, hglib.fromunicode(item.text())])   @@ -420,6 +427,7 @@
  else:   cmdline += ['--exclude', self.repo.root]   self.repo.incrementBusyCount() + self.qtbar.setEnabled(False)   self.cmd.run(cmdline)     @pyqtSlot() @@ -431,6 +439,7 @@
  self.reload()   else:   self.repo.incrementBusyCount() + self.qtbar.setEnabled(False)   self.cmd.run(['qinit', '-c', '-R', self.repo.root])     @pyqtSlot() @@ -648,6 +657,7 @@
  cmdline = ['qselect', '-R', self.repo.root]   cmdline += newguards or ['--none']   self.repo.incrementBusyCount() + self.qtbar.setEnabled(False)   self.cmd.run(cmdline)     # Capture drop events, try to import into current patch queue