Beispiel #1
0
    def __init__(self):
        super(AccountListStore, self).__init__(
            str, str, str, str, str, GdkPixbuf.Pixbuf, object)

        self.save = SaveAccountListStore()
        for entry in self.save.load():
            self.append(entry)

        # Account migration from GSettings
        if len(self) < 1 and SETTINGS_TWITTER.get_string('user-name'):
            entry = ['Twitter',
                     SETTINGS_TWITTER.get_string('user-name'),
                     SETTINGS_TWITTER.get_string('access-token'),
                     SETTINGS_TWITTER.get_string('access-secret')]
            self.append(entry)

            SETTINGS_TWITTER.reset('user-name')
            SETTINGS_TWITTER.reset('access-token')
            SETTINGS_TWITTER.reset('access-secret')