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: extend function to add extra UI for config

Not only 'Sync' page, other pages can have extra UI.

Changeset 61d1fe8d9075

Parent d65ed437a85e

by Yuki KODAMA

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

 
658
659
660
661
 
662
663
664
 
930
931
932
933
 
934
935
936
 
1079
1080
1081
1082
 
1083
1084
1085
1086
1087
1088
1089
 
 
 
 
1090
1091
1092
 
658
659
660
 
661
662
663
664
 
930
931
932
 
933
934
935
936
 
1079
1080
1081
 
1082
1083
1084
1085
1086
1087
 
 
1088
1089
1090
1091
1092
1093
1094
@@ -658,7 +658,7 @@
  self.add_page(_('Repository Explorer'), 'log', _log_info,   'menulog.ico')   self.add_page(_('Synchronize'), 'sync', _paths_info, 'menusynch.ico', - path=True) + extra=True)   self.add_page(_('Web Server'), 'web', _web_info, 'proxy.ico')   self.add_page(_('Proxy'), 'proxy', _proxy_info, 'general.ico')   self.add_page(_('Email'), 'email', _email_info, gtk.STOCK_GOTO_LAST) @@ -930,7 +930,7 @@
  self._testpathbutton.set_sensitive(repo_available and path_selected)   self._defaultpathbutton.set_sensitive(not default_path and path_selected)   - def fill_path_frame(self, frvbox): + def fill_sync_frame(self, frvbox):   # insert padding   frvbox.pack_start(gtk.VBox(), False, False, 2)   @@ -1079,14 +1079,16 @@
  elif currow:   combo.set_active(currow)   - def add_page(self, label, name, info, icon=None, path=False): + def add_page(self, label, name, info, icon=None, extra=False):   # setup page   frame = gtk.VBox()   frame.show()     vbox, widgets = self.fill_frame(frame, info) - if path: - self.fill_path_frame(vbox) + if extra: + func = getattr(self, 'fill_%s_frame' % name, None) + if func: + func(vbox)     # add to notebook   pagenum = self.notebook.append_page(frame)