~muscardinus/awn-extras/mail-rewrite

« back to all changes in this revision

Viewing changes to applets/maintained/mail/mail.py

  • Committer: Grega Podlesek
  • Date: 2010-04-19 23:41:00 UTC
  • Revision ID: grega.podlesek@gmail.com-20100419234100-rgsjw1kdvp43dzyn
mail: we now check the mail every few minutes, timout can be set via the Preferences dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        self.__main_dialog = self.MainDialog(self)
64
64
 
65
65
        ## tmp ##
 
66
        ## end of tmp ##
66
67
        self.update_accounts()
67
 
        ## end of tmp ##
 
68
        self.__timer = applet.timing.register(self.update_accounts,
 
69
                                        self.applet.settings["timeout"] * 60)
68
70
 
69
71
 
70
72
    # == Applet Icon == #
106
108
        # that should be called on setting change.
107
109
        binder = self.applet.settings.get_binder(prefs)
108
110
        binder.bind("theme", "combobox_theme", key_callback=self.applet.theme.theme)
 
111
        binder.bind("timeout", "spinbutton_delay", key_callback=self.set_timeout)
109
112
        self.applet.settings.load_bindings(binder)
110
113
 
111
114
        # = Account settings = #
272
275
    def save_tokens(self):
273
276
        self.applet.settings["key_tokens"] = self.accounts.keys()
274
277
 
 
278
    def set_timeout(self, timeout):
 
279
        self.__timer.change_interval(timeout * 60)
275
280
 
276
281
    class MainDialog:
277
282