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

thgconfig: extract show_page() function to show config page

Changeset 10e86fd2a5d8

Parent 6f7f18b57a45

by Yuki KODAMA

Changes to one file · Browse files at 10e86fd2a5d8 Showing diff from parent 6f7f18b57a45 Diff from another changeset...

 
760
761
762
 
 
 
 
 
 
763
764
765
 
766
767
768
769
 
770
771
772
 
788
789
790
791
792
793
 
794
795
796
 
760
761
762
763
764
765
766
767
768
769
770
 
771
772
773
 
 
774
775
776
777
 
793
794
795
 
 
 
796
797
798
799
@@ -760,13 +760,18 @@
  page_num, info, vbox, widgets = self.pages[name]   self.notebook.set_current_page(page_num)   + def show_page(self, name): + '''Show page by activating treeview item''' + page_num = self.pages[name][0] + path = self.confmodel[page_num].path + self.confview.set_cursor(path) +   def focus_field(self, focusfield):   '''Set page and focus to requested datum''' - for page_num, info, vbox, widgets in self.pages.values(): + for name, (page_num, info, vbox, widgets) in self.pages.items():   for n, (label, cpath, values, tip) in enumerate(info):   if cpath == focusfield: - path = self.confmodel[page_num].path - self.confview.set_cursor(path) + self.show_page(name)   widgets[n].grab_focus()   return   @@ -788,9 +793,7 @@
  self.pathtree.get_column(0))   self.refresh_path_list()   # This method may be called from hgtk.sync, so ensure page is visible - page_num = self.pages['sync'][0] - path = self.confmodel[page_num].path - self.confview.set_cursor(path) + self.show_page('sync')   self.dirty_event()     def dirty_event(self, *args):