Commit ec233919 authored by Daniel Brötzmann's avatar Daniel Brötzmann

GCTooltip: Remove affiliation coloring

parent 4caf90be
......@@ -180,10 +180,6 @@ class Config:
'tooltip_status_busy_color': [opt_color, '#F57900'],
'tooltip_status_na_color': [opt_color, '#CC0000'],
'tooltip_status_offline_color': [opt_color, '#555753'],
'tooltip_affiliation_none_color': [opt_color, '#555753'],
'tooltip_affiliation_member_color': [opt_color, '#73D216'],
'tooltip_affiliation_administrator_color': [opt_color, '#F57900'],
'tooltip_affiliation_owner_color': [opt_color, '#CC0000'],
'tooltip_account_name_color': [opt_color, '#888A85'],
'tooltip_idle_color': [opt_color, '#888A85'],
'notification_preview_message': [opt_bool, True, _('Preview new messages in notification popup?')],
......
......@@ -220,8 +220,7 @@ class GCTooltip():
uf_affiliation = \
_('%(owner_or_admin_or_member)s of this group chat') \
% {'owner_or_admin_or_member': uf_affiliation}
uf_affiliation = self.colorize_affiliation(uf_affiliation)
self._ui.affiliation.set_markup(uf_affiliation)
self._ui.affiliation.set_text(uf_affiliation)
self._ui.affiliation.show()
# Avatar
......@@ -238,29 +237,10 @@ class GCTooltip():
app.plugin_manager.gui_extension_point(
'gc_tooltip_populate', self, contact, self._ui.tooltip_grid)
@staticmethod
def colorize_affiliation(affiliation):
"""
Color the affiliation of a MUC participant inside the tooltip by
it's semantics. Color palette is the Tango.
"""
formatted = "<span foreground='%s'>%s</span>"
color = None
if affiliation.startswith(Q_("?Group Chat Contact Affiliation:None")):
color = app.config.get('tooltip_affiliation_none_color')
elif affiliation.startswith(_("Member")):
color = app.config.get('tooltip_affiliation_member_color')
elif affiliation.startswith(_("Administrator")):
color = app.config.get('tooltip_affiliation_administrator_color')
elif affiliation.startswith(_("Owner")):
color = app.config.get('tooltip_affiliation_owner_color')
if color:
affiliation = formatted % (color, affiliation)
return affiliation
def destroy(self):
self._ui.tooltip_grid.destroy()
class RosterTooltip(StatusTable):
def __init__(self):
StatusTable.__init__(self)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment