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