Fixed source field sometimes showing up as broken HTML...
This commit is contained in:
parent
d7893fce37
commit
9f239e8c37
2
TODO
2
TODO
|
@ -15,8 +15,6 @@ features:
|
||||||
|
|
||||||
bugs:
|
bugs:
|
||||||
|
|
||||||
* Searches and Direct Messages have no names, only screen names (may not be fixable without considerable tweaks to python-twitter?)
|
|
||||||
* Search results have html-escaped character strings
|
|
||||||
* "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
|
||||||
* If an @ appears anywhere in a status update, links after it try to resolve to user: links... need to work on my regexes
|
* If an @ appears anywhere in a status update, links after it try to resolve to user: links... need to work on my regexes
|
||||||
|
|
|
@ -270,6 +270,7 @@ class GetUserLists(ApiThread):
|
||||||
lists = self.api.GetUserLists()
|
lists = self.api.GetUserLists()
|
||||||
except (HTTPError, URLError) as exception:
|
except (HTTPError, URLError) as exception:
|
||||||
print 'debug: GetUserLists had error: ' + str(exception.code)
|
print 'debug: GetUserLists had error: ' + str(exception.code)
|
||||||
|
sleep(5)
|
||||||
done = False
|
done = False
|
||||||
|
|
||||||
self.sig_proxy.emit('lists-ready', lists, None)
|
self.sig_proxy.emit('lists-ready', lists, None)
|
||||||
|
|
|
@ -410,8 +410,13 @@ class TweetBox(gtk.HBox):
|
||||||
|
|
||||||
# Set the header
|
# Set the header
|
||||||
if status.source is not None:
|
if status.source is not None:
|
||||||
self.app_url = re.sub(r'.*<a href=\"(.*?)\".*', r'\1', status.source)
|
source = status.source
|
||||||
app_name = re.sub(r'.*<a.*?>(.*)</a>.*', r'\1', status.source)
|
if re.match(r'<', source):
|
||||||
|
metalabel = gtk.Label()
|
||||||
|
metalabel.set_markup(status.source)
|
||||||
|
source = metalabel.get_text()
|
||||||
|
self.app_url = re.sub(r'.*<a href=\"(.*?)\".*', r'\1', source)
|
||||||
|
app_name = re.sub(r'.*<a.*?>(.*)</a>.*', r'\1', source)
|
||||||
self.app_button.set_label(app_name)
|
self.app_button.set_label(app_name)
|
||||||
self.app_button.show()
|
self.app_button.show()
|
||||||
self.via_label.show()
|
self.via_label.show()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from threading import RLock
|
from threading import RLock
|
||||||
from urllib2 import URLError,urlopen
|
from urllib2 import HTTPError,URLError,urlopen
|
||||||
import gtk
|
import gtk
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user