Пример #1
0
 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()
Пример #2
0
    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()

            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()
Пример #3
0
 def on_app_shutdown(self, app):
     '''Dump profile content to disk'''
     if self.profile:
         gutil.dump_profile(self.profile)