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

Merge with stable

Changeset fc19db55e9e5

Parents d1cf7a5e80fb

Parents a78eaffcd448

by Steve Borho

Changes to 2 files · Browse files at fc19db55e9e5 Showing diff from parent d1cf7a5e80fb a78eaffcd448 Diff from another changeset...

 
1664
1665
1666
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1667
1668
1669
 
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
 
 
1685
1686
1687
 
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
 
 
1719
1720
1721
 
2859
2860
2861
 
 
 
 
 
 
 
 
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
 
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
 
1696
1697
1698
 
 
 
 
 
 
 
 
 
 
 
1699
1700
1701
1702
1703
 
1708
1709
1710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1711
1712
1713
1714
1715
 
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
 
 
 
 
 
 
 
2869
2870
2871
@@ -1664,6 +1664,31 @@
  midpane.pack_start(self.graphview)   midpane.show_all()   + def addoptionpane(widget, name): + def wrapframe(widget): + frame = gtk.Frame() + frame.set_shadow_type(gtk.SHADOW_ETCHED_IN) + frame.add(widget) + return frame + paned = gtk.HPaned() + paned.add1(wrapframe(widget)) + paned.add2(wrapframe(midpane)) + + # register signal handler + tbname = name + 'tb' + def notify(paned, gparam): + if not hasattr(self, tbname): + return + pos = paned.get_position() + if self.cmd_get_active(name): + if pos < 140: + paned.set_position(140) + else: + if pos != 0: + paned.set_position(0) + paned.connect('notify::position', notify) + return paned +   # pbranch widget   if 'pbranch' in self.exs:   # create PBranchWidget @@ -1671,17 +1696,8 @@
  self, self.repo, self.stbar, accelgroup, self.tooltips)   self.pbranchwidget.connect('patch-selected', self.pbranch_selected)   self.pbranchwidget.connect('repo-invalidated', self.repo_invalidated) - - def wrapframe(widget): - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_ETCHED_IN) - frame.add(widget) - return frame - self.pbranchpaned = gtk.HPaned() - self.pbranchpaned.add1(wrapframe(self.pbranchwidget)) - self.pbranchpaned.add2(wrapframe(midpane)) - - midpane = self.pbranchpaned + midpane = addoptionpane(self.pbranchwidget, 'pbranch') + self.pbranchpaned = midpane     # MQ widget   if 'mq' in self.exs: @@ -1692,30 +1708,8 @@
  self.mqwidget.connect('repo-invalidated', self.repo_invalidated)   self.mqwidget.connect('files-dropped', self.files_dropped)   self.mqwidget.connect('close-mq', lambda *a: self.enable_mqpanel(False)) - - def wrapframe(widget): - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_ETCHED_IN) - frame.add(widget) - return frame - self.mqpaned = gtk.HPaned() - self.mqpaned.add1(wrapframe(self.mqwidget)) - self.mqpaned.add2(wrapframe(midpane)) - - # register signal handler - def notify(paned, gparam): - if not hasattr(self, 'mqtb'): - return - pos = paned.get_position() - if self.cmd_get_active('mq'): - if pos < 140: - paned.set_position(140) - else: - if pos != 0: - paned.set_position(0) - self.mqpaned.connect('notify::position', notify) - - midpane = self.mqpaned + midpane = addoptionpane(self.mqwidget, 'mq') + self.mqpaned = midpane     # Add ChangeSet instance to bottom half of vpane   self.changeview.graphview = self.graphview @@ -2859,18 +2853,19 @@
  return   if enable is None:   enable = self.setting_pbranchvis and self.pbranchwidget.has_patch() + + # set the state of PBranch toolbutton + self.cmd_handler_block_by_func('pbranch', self.pbranch_clicked) + self.cmd_set_active('pbranch', enable) + self.cmd_handler_unblock_by_func('pbranch', self.pbranch_clicked) + self.cmd_set_sensitive('pbranch', self.pbranchwidget.has_pbranch()) + + # show/hide pbranch pane   oldpos = self.pbranchpaned.get_position()   self.pbranchpaned.set_position(enable and self.setting_pbranchhpos or 0)   if not enable and oldpos:   self.setting_pbranchhpos = oldpos   - # set the state of PBranch toolbutton - if hasattr(self, 'pbranchtb'): - self.pbranchtb.handler_block_by_func(self.pbranch_clicked) - self.cmd_set_active('pbranch', enable) - self.pbranchtb.handler_unblock_by_func(self.pbranch_clicked) - self.cmd_set_sensitive('pbranch', self.pbranchwidget.has_pbranch()) -   def pbranch_clicked(self, widget, data=None):   self.enable_pbranchpanel(widget.get_active())  
 
561
562
563
564
 
 
 
 
565
566
567
 
561
562
563
 
564
565
566
567
568
569
570
@@ -561,7 +561,10 @@
    def has_patch(self):   """ return True if pbranch extension is in use on repo """ - return self.has_pbranch() and self.pgraph() != [] + if not self.has_pbranch(): + return False + g = self.pgraph() + return len(self.pbranch.patchonlygraph(g.mgr, g)._nodes) > 0     def is_patch(self, branch_name):   """ return True if branch is a patch. This excludes root branches