|
|
|
@ -39,7 +39,6 @@ from mitterlib.ui.helpers import timesince
|
|
|
|
|
# Constants |
|
|
|
|
|
|
|
|
|
_log = logging.getLogger('ui.pygtk') |
|
|
|
|
|
|
|
|
|
URL_RE = re.compile(r'(https?://[^\s\n\r]+)', re.I) |
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
|
|
|
@ -52,14 +51,16 @@ N_ = t.ngettext
|
|
|
|
|
# ---------------------------------------------------------------------- |
|
|
|
|
# String with the format to the message |
|
|
|
|
# ---------------------------------------------------------------------- |
|
|
|
|
MESSAGE_FORMAT = '%(favourite_star)s' \ |
|
|
|
|
'<b>%(full_name)s</b> ' \ |
|
|
|
|
'<small>(%(username)s' \ |
|
|
|
|
'%(message_type)s' \ |
|
|
|
|
')</small>:' \ |
|
|
|
|
'%(read_status)s\n' \ |
|
|
|
|
'%(message)s\n' \ |
|
|
|
|
'<small>%(message_age)s</small>' |
|
|
|
|
MESSAGE_FORMAT = ('%(favourite_star)s' |
|
|
|
|
'<b>%(full_name)s</b> ' |
|
|
|
|
'<small>(%(username)s' |
|
|
|
|
'%(message_type)s' |
|
|
|
|
')</small>:' |
|
|
|
|
'%(read_status)s ' |
|
|
|
|
'%(protected_status)s ' |
|
|
|
|
'\n' |
|
|
|
|
'%(message)s\n' |
|
|
|
|
'<small>%(message_age)s</small>') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
|
|
|
@ -626,6 +627,12 @@ class Interface(object):
|
|
|
|
|
info.append(_(' — <i>in reply to %s</i>') % |
|
|
|
|
(data.parent_owner)) |
|
|
|
|
|
|
|
|
|
if data.protected: |
|
|
|
|
message_values['protected_status'] = ( |
|
|
|
|
self._options[self.NAMESPACE]['protected_char']) |
|
|
|
|
else: |
|
|
|
|
message_values['protected_status'] = '' |
|
|
|
|
|
|
|
|
|
message_values['message_type'] = ''.join(info) |
|
|
|
|
markup = MESSAGE_FORMAT % (message_values) |
|
|
|
|
|
|
|
|
@ -1570,3 +1577,11 @@ class Interface(object):
|
|
|
|
|
metavar='CHAR', |
|
|
|
|
default='☆', |
|
|
|
|
is_cmd_option=False) |
|
|
|
|
options.add_option( |
|
|
|
|
group=self.NAMESPACE, |
|
|
|
|
option='protected_char', |
|
|
|
|
help='String to be used to indicate that a message is ' \ |
|
|
|
|
'protected/private.', |
|
|
|
|
metavar='CHAR', |
|
|
|
|
default=_('<small>(protected)</small>'), |
|
|
|
|
is_cmd_option=False) |
|
|
|
|