230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248 |
# Notebook tab has been clicked (receives numeric page_num), but *NOT* yet changed (visually).
def channel_switch(self, notebook, page, page_num=0, *args):
self.current_channel = notebook.get_menu_label_text(notebook.get_nth_page(page_num))
__print__(dbg.UI, "main.channel_switch():", "set current_channel :=", self.current_channel)
self.update_title()
# if first selected, load current category
__print__(dbg.STAT, "TRY", "main.channel_switch(): ", self.current_channel + ".first_show()")
try: self.channel().first_show()
except: __print__(dbg.INIT, ".first_show() initialization error")
# Invoked from the menu instead, uses module name instead of numeric tab id
def channel_switch_by_name(self, name):
self.notebook_channels.set_current_page(self.channel_names.index(name))
# Mirror selected channel tab into main window title
def update_title(self): |
<
<
|
<
| 230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245 |
# Notebook tab has been clicked (receives numeric page_num), but *NOT* yet changed (visually).
def channel_switch(self, notebook, page, page_num=0, *args):
self.current_channel = notebook.get_menu_label_text(notebook.get_nth_page(page_num))
__print__(dbg.UI, "main.channel_switch():", "set current_channel :=", self.current_channel)
self.update_title()
# if first selected, load current category
self.channel().first_show()
# Invoked from the menu instead, uses module name instead of numeric tab id
def channel_switch_by_name(self, name):
self.notebook_channels.set_current_page(self.channel_names.index(name))
# Mirror selected channel tab into main window title
def update_title(self): |