remove checks and code for < 2.6
This commit is contained in:
parent
fcc4a6a0ce
commit
788a4dc7a1
|
@ -401,11 +401,6 @@ _('Contact names must be of the form "user@servername".')).get_response()
|
||||||
class AboutDialog:
|
class AboutDialog:
|
||||||
'''Class for about dialog'''
|
'''Class for about dialog'''
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
if gtk.pygtk_version < (2, 6, 0) or gtk.gtk_version < (2, 6, 0):
|
|
||||||
InformationDialog(_('Gajim - a GTK+ Jabber client'),
|
|
||||||
_('Version %s') % gajim.version)
|
|
||||||
return
|
|
||||||
|
|
||||||
dlg = gtk.AboutDialog()
|
dlg = gtk.AboutDialog()
|
||||||
dlg.set_name('Gajim')
|
dlg.set_name('Gajim')
|
||||||
dlg.set_version(gajim.version)
|
dlg.set_version(gajim.version)
|
||||||
|
|
|
@ -1121,9 +1121,8 @@ class Interface:
|
||||||
for account in gajim.config.get_per('accounts'):
|
for account in gajim.config.get_per('accounts'):
|
||||||
gajim.connections[account] = common.connection.Connection(account)
|
gajim.connections[account] = common.connection.Connection(account)
|
||||||
|
|
||||||
if gtk.pygtk_version >= (2, 6, 0):
|
gtk.about_dialog_set_email_hook(self.on_launch_browser_mailer, 'mail')
|
||||||
gtk.about_dialog_set_email_hook(self.on_launch_browser_mailer, 'mail')
|
gtk.about_dialog_set_url_hook(self.on_launch_browser_mailer, 'url')
|
||||||
gtk.about_dialog_set_url_hook(self.on_launch_browser_mailer, 'url')
|
|
||||||
self.windows = {'logs':{}}
|
self.windows = {'logs':{}}
|
||||||
|
|
||||||
for a in gajim.connections:
|
for a in gajim.connections:
|
||||||
|
|
|
@ -392,17 +392,12 @@ class GroupchatWindow(chat.Chat):
|
||||||
st += ' (' + status + ')'
|
st += ' (' + status + ')'
|
||||||
self.print_conversation(st, room_jid)
|
self.print_conversation(st, room_jid)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def set_subject(self, room_jid, subject):
|
def set_subject(self, room_jid, subject):
|
||||||
self.subjects[room_jid] = subject
|
self.subjects[room_jid] = subject
|
||||||
name_label = self.name_labels[room_jid]
|
name_label = self.name_labels[room_jid]
|
||||||
full_subject = None
|
full_subject = None
|
||||||
|
|
||||||
if gtk.gtk_version < (2, 6, 0) or gtk.pygtk_version < (2, 6, 0):
|
subject = gtkgui_helpers.reduce_chars_newlines(subject, 0, 2)
|
||||||
subject = gtkgui_helpers.reduce_chars_newlines(subject, 80, 2)
|
|
||||||
else:
|
|
||||||
subject = gtkgui_helpers.reduce_chars_newlines(subject, 0, 2)
|
|
||||||
subject = gtkgui_helpers.escape_for_pango_markup(subject)
|
subject = gtkgui_helpers.escape_for_pango_markup(subject)
|
||||||
name_label.set_markup(
|
name_label.set_markup(
|
||||||
'<span weight="heavy" size="x-large">%s</span>\n%s' % (room_jid, subject))
|
'<span weight="heavy" size="x-large">%s</span>\n%s' % (room_jid, subject))
|
||||||
|
|
|
@ -139,12 +139,9 @@ class StatusTable:
|
||||||
status = status.strip()
|
status = status.strip()
|
||||||
if status != '':
|
if status != '':
|
||||||
# make sure 'status' is unicode before we send to to reduce_chars...
|
# make sure 'status' is unicode before we send to to reduce_chars...
|
||||||
if type(status) == str:
|
if isinstance(status, str):
|
||||||
status = unicode(status, encoding='utf-8')
|
status = unicode(status, encoding='utf-8')
|
||||||
if gtk.gtk_version < (2, 6, 0) or gtk.pygtk_version < (2, 6, 0):
|
status = gtkgui_helpers.reduce_chars_newlines(status, 0, 1)
|
||||||
status = gtkgui_helpers.reduce_chars_newlines(status, 50, 1)
|
|
||||||
else:
|
|
||||||
status = gtkgui_helpers.reduce_chars_newlines(status, 0, 1)
|
|
||||||
str_status += ' - ' + status
|
str_status += ' - ' + status
|
||||||
return gtkgui_helpers.escape_for_pango_markup(str_status)
|
return gtkgui_helpers.escape_for_pango_markup(str_status)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue