Exemplo n.º 1
0
    def on_button_quote_clicked(self, textbuffer):
        quote_format = SETTINGS_TWITTER.get_string('quote-format')
        text = quote_format.format(user=self.entry.get('user_name'), 
                                   status=self.entry.get('status_body'))

        textbuffer.delete(textbuffer.get_start_iter(), textbuffer.get_end_iter(),)
        textbuffer.insert_at_cursor(text)
        textbuffer.place_cursor(textbuffer.get_start_iter())
Exemplo n.º 2
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')
Exemplo n.º 3
0
    def on_button_quote_clicked(self, textbuffer):
        quote_format = SETTINGS_TWITTER.get_string('quote-format')
        text = quote_format.format(user=self.entry.get('user_name'),
                                   status=self.entry.get('status_body'))

        textbuffer.delete(
            textbuffer.get_start_iter(),
            textbuffer.get_end_iter(),
        )
        textbuffer.insert_at_cursor(text)
        textbuffer.place_cursor(textbuffer.get_start_iter())