Fixed regex so that we should get the username in TweetPane, so new tweets won't increment the unread count if they are from the user herself
This commit is contained in:
parent
5eaf159865
commit
3e411e6e1d
1
TODO
1
TODO
|
@ -17,4 +17,3 @@ bugs:
|
||||||
* "ValueError: list.remove(x): x not in list" when trying to close a tab (error recurred after adding conversation support). Tabs can be reordered, then closed, as a workaround.
|
* "ValueError: list.remove(x): x not in list" when trying to close a tab (error recurred after adding conversation support). Tabs can be reordered, then closed, as a workaround.
|
||||||
* Links must be right-clicked on to activate - can't left-click on the link directly. This seems to be a pygtk issue
|
* Links must be right-clicked on to activate - can't left-click on the link directly. This seems to be a pygtk issue
|
||||||
* Sometimes tweets are posted when we display 'failed to post tweet'... need to differentiate between kinds of errors... or something.
|
* Sometimes tweets are posted when we display 'failed to post tweet'... need to differentiate between kinds of errors... or something.
|
||||||
* Some posts by the user are still being counted as unread when they show up...
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class TweetPane(gtk.ScrolledWindow):
|
||||||
# If the username is encoded in the tweet pane's name, we really want
|
# If the username is encoded in the tweet pane's name, we really want
|
||||||
# to use it instead, since it may not match the current api's name
|
# to use it instead, since it may not match the current api's name
|
||||||
if re.search(r'(^| ).*/', list_name):
|
if re.search(r'(^| ).*/', list_name):
|
||||||
self.username = re.sub(r'(list: | )(.*?)/.*$', r'\2', list_name)
|
self.username = re.sub(r'(list: | )?(.*?)/.*$', r'\2', list_name)
|
||||||
else:
|
else:
|
||||||
self.username = username
|
self.username = username
|
||||||
|
|
||||||
|
@ -471,7 +471,7 @@ class TweetBox(gtk.HBox):
|
||||||
new_text = re.sub(r'"([^;]*?)( |$)', r'"\1\2', new_text)
|
new_text = re.sub(r'"([^;]*?)( |$)', r'"\1\2', new_text)
|
||||||
if gtk.gtk_version[0] > 2 or (gtk.gtk_version[0] == 2 and gtk.gtk_version[1] >= 18):
|
if gtk.gtk_version[0] > 2 or (gtk.gtk_version[0] == 2 and gtk.gtk_version[1] >= 18):
|
||||||
# Make URLs into links
|
# Make URLs into links
|
||||||
new_text = re.sub(r"(http://.*?)([^0-9a-zA-Z.~/-_]|$)", r'<a href="\1">\1</a>\2', new_text)
|
new_text = re.sub(r"(http://.*?)([^0-9a-zA-Z.~/_-]|$)", r'<a href="\1">\1</a>\2', new_text)
|
||||||
# Make @ or # refs into links, to be used internally
|
# Make @ or # refs into links, to be used internally
|
||||||
new_text = re.sub(r'@(.*?)([^0-9a-zA-Z_]|$)', self._make_user_link, new_text)
|
new_text = re.sub(r'@(.*?)([^0-9a-zA-Z_]|$)', self._make_user_link, new_text)
|
||||||
new_text = re.sub(r'#(.*?)([^0-9a-zA-Z_-]|$)', self._make_hashtag_link, new_text)
|
new_text = re.sub(r'#(.*?)([^0-9a-zA-Z_-]|$)', self._make_hashtag_link, new_text)
|
||||||
|
|
Reference in New Issue
Block a user