def testStatusIconError(self): status_icon = StatusIcon() fetcher = GMailFeedFetcher("username", "password") mb_monitor = MailboxMonitor(status_icon, "TEST", 30, fetcher.fetchmail) mb_monitor.start()
def main(): """Main function""" args = _parse_cmdline() if args.debug: logging.set_level(logging.DEBUG) elif args.quiet: logging.set_level(logging.NONE) else: logging.set_level(logging.INFO) if args.file: config.load(args.file) else: config.load() logging.info("Mailindicator started.") mailboxes = config.mailboxes monitors = [] if len(mailboxes) > 0: status_icon = StatusIcon() for mailbox in mailboxes: mb_monitor = MailboxMonitor(status_icon, mailbox.label, mailbox.sleep_time, mailbox.fetcher.fetchmail) mb_monitor.start() monitors.append(mb_monitor) status_icon.set_monitors(monitors) Gdk.threads_init() Gtk.main()