def show_signin_dialog(self, auto_signin=True): self.profile = None signin = SigninDialog(self, auto_signin=auto_signin) signin.run() signin.destroy() if self.profile: self.init_notebook() self.notebook.connect('switch-page', self.on_notebook_switched) self.init_status_icon() self.init_notify() self.set_dark_theme(self.profile['use-dark-theme']) if self.profile['first-run']: self.profile['first-run'] = False preferences = PreferencesDialog(self) preferences.run() preferences.destroy() gutil.dump_profile(self.profile) for index, page in enumerate(self.notebook): page.first_run = True self.switch_page(self.home_page) self.update_avatar() else: self.quit()
def show_signin_dialog(self, auto_signin=True): self.profile = None signin = SigninDialog(self, auto_signin=auto_signin) signin.run() signin.destroy() if self.profile: self.init_notebook() self.notebook.connect('switch-page', self.on_notebook_switched) self.init_status_icon() self.init_notify() self.set_dark_theme(self.profile['use-dark-theme']) if self.profile['first-run']: self.profile['first-run'] = False preferences = PreferencesDialog(self) preferences.run() preferences.destroy() gutil.dump_profile(self.profile) self.home_page.load() self.switch_page(self.home_page) return self.quit()
def on_preferences_action_activated(self, action, params): if self.profile: dialog = PreferencesDialog(self) dialog.run() dialog.destroy() if self.profile: gutil.dump_profile(self.profile) if self.profile['use-status-icon'] and not self.status_icon: self.init_status_icon() self.set_dark_theme(self.profile['use-dark-theme'])