~ibelieve/contributor-console/1.0

« back to all changes in this revision

Viewing changes to contributor_console/view_pane.py

  • Committer: Michael Spencer
  • Date: 2012-12-13 17:35:36 UTC
  • Revision ID: spencers1993@gmail.com-20121213173536-6tgbwma1ur4wht0x
Added panel switching menu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
        index = self.toolbar.get_children().index(button)
84
84
        pane = self.panes.get_children()[index]
85
85
        
86
 
        self.switch_to_pane(pane)
 
86
        self.button_switch_to_pane(pane)
87
87
 
88
88
    # Function based on code taken from Ask Ubuntu answer
89
 
    def switch_to_pane(self, pane):
 
89
    def button_switch_to_pane(self, pane):        
90
90
        # hide all pages
91
91
        for child in self.panes.get_children():
92
92
            child.hide()
93
93
        # show the single page that is active
94
94
        pane.show()
 
95
 
 
96
    # Function based on code taken from Ask Ubuntu answer
 
97
    def switch_to_pane(self, pane):        
 
98
        self.toolbar.get_children()[self.panes.get_children().index(pane)].set_active(True)