|
|
|
@ -41,6 +41,15 @@ _log = logging.getLogger('ui.pygtk')
|
|
|
|
|
|
|
|
|
|
URL_RE = re.compile(r'(https?://[^\s\n\r]+)', re.I) |
|
|
|
|
|
|
|
|
|
MESSAGE_FORMAT = '%s' \ |
|
|
|
|
'<b>%s</b>' \ |
|
|
|
|
'<small>(%s' \ |
|
|
|
|
'%s' \ |
|
|
|
|
'</small>:' \ |
|
|
|
|
'%s\n' \ |
|
|
|
|
'%s\n' \ |
|
|
|
|
'<small>%s</small>' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
|
|
|
|
# Helper Functions (not related to objects or that don't need direct access to |
|
|
|
@ -578,15 +587,18 @@ class Interface(object):
|
|
|
|
|
else: |
|
|
|
|
read_status = '' |
|
|
|
|
|
|
|
|
|
if data.favourited: |
|
|
|
|
favourited = '★' |
|
|
|
|
else: |
|
|
|
|
favourited = '☆' |
|
|
|
|
|
|
|
|
|
if data.reposted_by: |
|
|
|
|
markup = '<b>%s</b> <small>(%s — <i>reposted by %s</i>)' \ |
|
|
|
|
'</small>:%s\n%s\n<small>%s</small>' % \ |
|
|
|
|
(data.name, username, data.reposted_by, read_status, |
|
|
|
|
message, time) |
|
|
|
|
reposted_message = ' — <i>reposted by %s</i>' |
|
|
|
|
else: |
|
|
|
|
markup = '<b>%s</b> <small>(%s)</small>:%s\n%s\n' \ |
|
|
|
|
'<small>%s</small>' % \ |
|
|
|
|
(data.name, username, read_status, message, time) |
|
|
|
|
reposted_message = '' |
|
|
|
|
|
|
|
|
|
markup = MESSAGE_FORMAT % (favourited, data.name, username, |
|
|
|
|
reposted_message, read_status, message, time) |
|
|
|
|
|
|
|
|
|
cell.set_property('markup', markup) |
|
|
|
|
|
|
|
|
@ -1216,8 +1228,9 @@ class Interface(object):
|
|
|
|
|
metavar='MINUTES', |
|
|
|
|
default=5, |
|
|
|
|
conflict_group='interface') |
|
|
|
|
options.add_option('--use-statusicon', |
|
|
|
|
options.add_option('--disable-statusicon', |
|
|
|
|
group=self.NAMESPACE, |
|
|
|
|
action='store_false', |
|
|
|
|
option='statusicon', |
|
|
|
|
default=True, |
|
|
|
|
conflict_group='interface') |
|
|
|
|