diff --git a/src/check_for_new_version.py b/src/check_for_new_version.py index 3128a75f9..82710c976 100644 --- a/src/check_for_new_version.py +++ b/src/check_for_new_version.py @@ -1,4 +1,4 @@ -## common/check_for_new_version.py +## check_for_new_version.py ## ## Gajim Team: ## - Yann Le Boulanger diff --git a/src/common/logger.py b/src/common/logger.py index c56843c24..a867fefb2 100644 --- a/src/common/logger.py +++ b/src/common/logger.py @@ -62,6 +62,7 @@ class Logger: if not msg: msg = '' + msg = helpers.to_one_line(msg) if len(jid.split('/')) > 1: ji, nick = jid.split('/', 1) diff --git a/src/dialogs.py b/src/dialogs.py index 89488dac5..a8a2f7d01 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -22,6 +22,8 @@ import gtk.glade import gobject import os +import gtkgui_helpers.py + from vcard import VcardWindow from gajim_themes_window import GajimThemesWindow from advanced import AdvancedConfigurationWindow @@ -592,12 +594,8 @@ class RosterTooltip(gtk.Window): str_status += ' - ' + status status_label = gtk.Label(str_status) status_label.set_alignment(00, 0) - self.table.attach(status_label, 3, 4, self.current_row, self.current_row + 1, - gtk.EXPAND | gtk.FILL, 0, 0, 0) - - def escape_entities(self, text): - # escapes markup entities - return text.replace('&', '&').replace('>','>').replace('<','<') + self.table.attach(status_label, 3, 4, self.current_row, + self.current_row + 1, gtk.EXPAND | gtk.FILL, 0, 0, 0) def populate(self, contacts): if not contacts or len(contacts) == 0: @@ -645,9 +643,9 @@ class RosterTooltip(gtk.Window): info = '' + prim_contact.jid + '' info += '\n' + _('Name: ') + '' + \ - self.escape_entities(prim_contact.name) + gtkgui_helpers.escape_for_pango_markup(prim_contact.name) info += '\n' + _('Subscription: ') + '' + \ - self.escape_entities(prim_contact.sub) + gtkgui_helpers.escape_for_pango_markup(prim_contact.sub) if prim_contact.keyID: keyID = None @@ -657,7 +655,7 @@ class RosterTooltip(gtk.Window): keyID = prim_contact.keyID[8:] if keyID: info += '\n' + _('OpenPGP: ') + \ - '' + self.escape_entities(keyID ) + '' + gtkgui_helpers.escape_for_pango_markup(keyID) single_line, resource_str, multiple_resource= '', '', False num_resources = 0 @@ -676,7 +674,7 @@ class RosterTooltip(gtk.Window): else: # only one resource if contact.resource: info += '\n' + _('Resource: ') + \ - '' + self.escape_entities(contact.resource) + ' (' + str(contact.priority) + ')' + '' + gtkgui_helpers.escape_for_pango_markup(contact.resource) + ' (' + str(contact.priority) + ')' if contact.show: info += '\n' + _('Status: ') + \ '' + helpers.get_uf_show(contact.show) @@ -684,7 +682,7 @@ class RosterTooltip(gtk.Window): status = contact.status.strip() if status != '': # escape markup entities. Is it posible to have markup in status? - info += ' - ' + self.escape_entities(status) + info += ' - ' + gtkgui_helpers.escape_for_pango_markup(status) self.account.set_markup(info) diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 2cf848c15..6050b8872 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -10008,8 +10008,8 @@ Custom