def notebook_page_switched(self, notebook, widget, arg):
# Automatically check for new games (not a good idea)
#~ if (widget.get_name() == 'goglib_tab') and (self.last_active_tab == 'gogcom_tab'):
#~ if self.goglib_offline_mode:
#~ if goglib_authorized:
#~ os.execl(sys.executable, sys.executable, *sys.argv)
#~ else:
#~ for i in range (self.notebook.get_n_pages()):
#~ try:
#~ if self.notebook.get_nth_page(i) == self.unauthorized_grid:
#~ if goglib_authorized:
#~ os.execl(sys.executable, sys.executable, *sys.argv)
#~ except:
#~ pass
#~ if (self.last_active_tab == 'gogcom_tab') and goglib_authorized:
#~ self.check_for_new_games()
if self.last_active_tab == 'settings_tab':
self.config_save()
if widget.get_name() != 'goglib_tab':
self.button_update_goglib.set_visible(False)
self.button_online_status.set_visible(False)
else:
self.button_online_status.set_visible(True)
if not self.goglib_offline_mode:
self.button_update_goglib.set_visible(True)
self.last_active_tab = widget.get_name()
评论列表
文章目录