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

stable thgconfig: give flexibility for layout of config page

If extra argument is True, fill_frame() function doesn't build
config page completely. So you can get ability of more flexible
layout for custom widgets.

Changeset 0f9464e27435

Parent 61d1fe8d9075

by Yuki KODAMA

Changes to one file · Browse files at 0f9464e27435 Showing diff from parent 61d1fe8d9075 Diff from another changeset...

 
930
931
932
933
 
 
 
 
934
935
 
936
937
938
939
 
940
941
942
 
1002
1003
1004
1005
 
1006
1007
1008
1009
1010
1011
 
 
1012
1013
1014
 
1030
1031
1032
1033
 
1034
1035
1036
 
1084
1085
1086
1087
 
1088
1089
1090
1091
 
1092
1093
1094
 
930
931
932
 
933
934
935
936
937
 
938
939
940
941
 
942
943
944
945
 
1005
1006
1007
 
1008
1009
1010
1011
1012
1013
 
1014
1015
1016
1017
1018
 
1034
1035
1036
 
1037
1038
1039
1040
 
1088
1089
1090
 
1091
1092
1093
1094
 
1095
1096
1097
1098
@@ -930,13 +930,16 @@
  self._testpathbutton.set_sensitive(repo_available and path_selected)   self._defaultpathbutton.set_sensitive(not default_path and path_selected)   - def fill_sync_frame(self, frvbox): + def fill_sync_frame(self, parent, table): + # add table + parent.pack_start(table, False, False) +   # insert padding - frvbox.pack_start(gtk.VBox(), False, False, 2) + parent.pack_start(gtk.VBox(), False, False, 2)     # paths frame   frame = gtk.Frame(_('Remote repository paths')) - frvbox.pack_start(frame, True, True, 2) + parent.pack_start(frame, True, True, 2)   vbox = gtk.VBox()   vbox.set_border_width(4)   frame.add(vbox) @@ -1002,13 +1005,14 @@
  text = ' '.join(tooltip.splitlines())   self.descbuffer.set_text(text)   - def fill_frame(self, frame, info): + def fill_frame(self, frame, info, build=True):   widgets = []     table = gtklib.LayoutTable()     vbox = gtk.VBox() - vbox.pack_start(table, False, False) + if build: + vbox.pack_start(table, False, False)     scrolled = gtk.ScrolledWindow()   scrolled.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) @@ -1030,7 +1034,7 @@
  table.add_row(label + ':', combo, padding=False)   self.tooltips.set_tip(combo, tooltip)   - return vbox, widgets + return vbox, table, widgets     def refresh_vlist(self):   for page_num, info, vbox, widgets in self.pages.values(): @@ -1084,11 +1088,11 @@
  frame = gtk.VBox()   frame.show()   - vbox, widgets = self.fill_frame(frame, info) + vbox, table, widgets = self.fill_frame(frame, info, not extra)   if extra:   func = getattr(self, 'fill_%s_frame' % name, None)   if func: - func(vbox) + func(vbox, table)     # add to notebook   pagenum = self.notebook.append_page(frame)