diff --git a/src/common/config.py b/src/common/config.py
index 007e7e624..066740915 100644
--- a/src/common/config.py
+++ b/src/common/config.py
@@ -222,6 +222,18 @@ class Config:
'roster_avatar_height': [opt_int, 32],
'tooltip_avatar_width': [opt_int, 125],
'tooltip_avatar_height': [opt_int, 125],
+ 'tooltip_status_online_color': [opt_color, '#73D216'],
+ 'tooltip_status_free_for_chat_color': [opt_color, '#3465A4'],
+ 'tooltip_status_away_color': [opt_color, '#EDD400'],
+ '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'],
'vcard_avatar_width': [opt_int, 200],
'vcard_avatar_height': [opt_int, 200],
'notification_preview_message': [opt_bool, True, _('Preview new messages in notification popup?')],
diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py
index 9c6776e77..c34fa344f 100644
--- a/src/common/connection_handlers.py
+++ b/src/common/connection_handlers.py
@@ -2024,7 +2024,7 @@ ConnectionJingle, ConnectionIBBytestream):
def _StreamCB(self, con, obj):
log.debug('StreamCB')
gajim.nec.push_incoming_event(StreamReceivedEvent(None,
- conn=self, stanza=iq_obj))
+ conn=self, stanza=obj))
def _register_handlers(self, con, con_type):
# try to find another way to register handlers in each class
diff --git a/src/tooltips.py b/src/tooltips.py
index 7adf9fa37..109d7b4c8 100644
--- a/src/tooltips.py
+++ b/src/tooltips.py
@@ -181,18 +181,21 @@ class BaseTooltip:
semantics. Color palette is the Tango.
"""
formatted = "%s"
+ color = None
if status.startswith(Q_("?user status:Available")):
- status = formatted % ('#73D216', status)
+ color = gajim.config.get('tooltip_status_online_color')
elif status.startswith(_("Free for Chat")):
- status = formatted % ('#3465A4', status)
+ color = gajim.config.get('tooltip_status_free_for_chat_color')
elif status.startswith(_("Away")):
- status = formatted % ('#EDD400', status)
+ color = gajim.config.get('tooltip_status_away_color')
elif status.startswith(_("Busy")):
- status = formatted % ('#F57900', status)
+ color = gajim.config.get('tooltip_status_busy_color')
elif status.startswith(_("Not Available")):
- status = formatted % ('#CC0000', status)
+ color = gajim.config.get('tooltip_status_na_color')
elif status.startswith(_("Offline")):
- status = formatted % ('#555753', status)
+ color = gajim.config.get('tooltip_status_offline_color')
+ if color:
+ status = formatted % (color, status)
return status
@staticmethod
@@ -202,14 +205,17 @@ class BaseTooltip:
it's semantics. Color palette is the Tango.
"""
formatted = "%s"
+ color = None
if affiliation.startswith(Q_("?Group Chat Contact Affiliation:None")):
- affiliation = formatted % ('#555753', affiliation)
+ color = gajim.conig.get('tooltip_affiliation_none_color')
elif affiliation.startswith(_("Member")):
- affiliation = formatted % ('#73D216', affiliation)
+ color = gajim.conig.get('tooltip_affiliation_member_color')
elif affiliation.startswith(_("Administrator")):
- affiliation = formatted % ('#F57900', affiliation)
+ color = gajim.conig.get('tooltip_affiliation_administrator_color')
elif affiliation.startswith(_("Owner")):
- affiliation = formatted % ('#CC0000', affiliation)
+ color = gajim.conig.get('tooltip_affiliation_owner_color')
+ if color:
+ affiliation = formatted % (color, affiliation)
return affiliation
class StatusTable:
@@ -493,9 +499,9 @@ class RosterTooltip(NotificationAreaTooltip):
gobject.markup_escape_text(prim_contact.get_shown_name())\
+ ''
if gajim.config.get('mergeaccounts'):
- name_markup += u" (" + \
- gobject.markup_escape_text(prim_contact.account.name) \
- + ')'
+ name_markup += u" (%s)" % (
+ gajim.config.get('tooltip_account_name_color'),
+ gobject.markup_escape_text(prim_contact.account.name))
if self.account and helpers.jid_is_blocked(self.account,
prim_contact.jid):
@@ -528,7 +534,8 @@ class RosterTooltip(NotificationAreaTooltip):
iconset = gajim.config.get('iconset')
if not iconset:
iconset = 'dcraven'
- file_path = os.path.join(helpers.get_iconset_path(iconset), '16x16')
+ file_path = os.path.join(helpers.get_iconset_path(iconset),
+ '16x16')
contact_keys = sorted(contacts_dict.keys())
contact_keys.reverse()
@@ -641,7 +648,9 @@ class RosterTooltip(NotificationAreaTooltip):
# is no meaningful difference between last activity time and
# current time.
if diff.days > 0 or diff.seconds > 0:
- cs = "%s"
+ cs = "" % gajim.config.get(
+ 'tooltip_idle_color')
+ cs += '%s'
properties.append((str(), None))
properties.append(((cs % _("Idle since %s")) % formatted, None))
properties.append(((cs % _("Idle for %s")) % str(diff), None))