First stab at implementing hyperlinks. Should work in gtk 2.18+, but can't test right now.

This commit is contained in:
Anna 2010-04-09 22:03:21 -04:00
parent 140b99d47d
commit 12faf53b63

View File

@ -207,7 +207,10 @@ class TweetBox(gtk.VBox):
self.header.set_markup(user.name + " (" + user.screen_name + ") " + timestring)
# and the text
self.text.set_markup(status.text)
new_text = status.text
new_text = re.sub('& ', '& ', new_text)
link_text = re.sub(r"(http://.*?)( |$)", r'<a href="\1">\1</a>\2', new_text)
self.text.set_markup(new_text)
def on_reply_clicked(self, widget):