Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

thgmq: remove 'statusbar' argument of the constructor

StatusBar has no relation with MQ feature. You can use
public functions of MQWidget to get status of MQ.

Changeset 2646915b629a

Parent b85fdc6490f3

by Yuki KODAMA

Changes to 2 files · Browse files at 2646915b629a Showing diff from parent b85fdc6490f3 Diff from another changeset...

 
941
942
943
 
 
 
 
 
 
 
 
 
 
 
 
 
944
945
946
 
1323
1324
1325
1326
 
1327
1328
1329
 
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
 
1336
1337
1338
 
1339
1340
1341
1342
@@ -941,6 +941,19 @@
  # refresh MQ widget if exists   if hasattr(self, 'mqwidget'):   self.mqwidget.refresh() + # update status messages + status_text = '' + idle_text = None + ntotal = self.mqwidget.get_num_patches() + if ntotal > 0: + ncount = self.mqwidget.get_num_applied() + status_text = _('%(count)d of %(total)d Patches applied') % { + 'count': ncount, 'total': ntotal} + if ncount > 0: + idle_text = _("Patch '%s' applied") % \ + self.mqwidget.get_qtip_patchname() + self.stbar.set_right3_text(status_text) + self.stbar.set_idle_text(idle_text)     # Remember options to next time reload_log is called   self.filteropts = opts @@ -1323,7 +1336,7 @@
  if 'mq' in self.exs:   # create MQWidget   self.mqwidget = thgmq.MQWidget( - self.repo, self.stbar, accelgroup, self.tooltips) + self.repo, accelgroup, self.tooltips)   self.mqwidget.connect('patch-selected', self.patch_selected)   self.mqwidget.connect('repo-invalidated', self.repo_invalidated)  
 
80
81
82
83
 
84
85
86
87
88
89
90
91
 
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
 
80
81
82
 
83
84
85
86
87
 
88
89
90
 
270
271
272
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
274
275
@@ -80,12 +80,11 @@
  str)) # patch name   }   - def __init__(self, repo, statusbar, accelgroup=None, tooltips=None): + def __init__(self, repo, accelgroup=None, tooltips=None):   gtk.VBox.__init__(self)     self.repo = repo   self.mqloaded = hasattr(repo, 'mq') - self.statusbar = statusbar     # top toolbar   tbar = gtklib.SlimToolbar(tooltips) @@ -271,21 +270,6 @@
  # update UI sensitives   self.update_sensitives()   - # report status - status_text = '' - idle_text = None - if self.has_mq(): - nser = len(self.repo.mq.series) - if nser: - napp = len(self.repo.mq.applied) - status_text = _('%(count)d of %(total)d Patches applied') % { - 'count': napp, 'total': nser} - if napp: - pn = self.get_qtip_patchname() - idle_text = _("Patch '%s' applied") % pn - self.statusbar.set_right3_text(status_text) - self.statusbar.set_idle_text(idle_text) -   def set_repo(self, repo):   self.repo = repo