From 7db777868eadebef78038cc7b2bd04a2835365dc Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Sat, 4 Nov 2006 00:27:56 +0000 Subject: [PATCH] Revert [7334] --- data/glade/preferences_window.glade | 54 ----------------------------- src/common/config.py | 1 - src/config.py | 20 ++--------- src/roster_window.py | 7 ---- 4 files changed, 3 insertions(+), 79 deletions(-) diff --git a/data/glade/preferences_window.glade b/data/glade/preferences_window.glade index 2138464ff..687f4121f 100644 --- a/data/glade/preferences_window.glade +++ b/data/glade/preferences_window.glade @@ -309,7 +309,6 @@ False - 0 @@ -317,59 +316,6 @@ True - - - - True - False - 12 - - - - True - _Roster Font: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - roster_fontbutton - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - True - - - - - - True - True - True - True - False - False - True - - - - 0 - False - True - - - - - diff --git a/src/common/config.py b/src/common/config.py index 1270f48f9..845c9916c 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -162,7 +162,6 @@ class Config: 'file_transfers_port': [opt_int, 28011], 'ft_override_host_to_send': [opt_str, '', _('Overrides the host we send for File Transfer in case of address translation/port forwarding.')], 'conversation_font': [opt_str, ''], - 'roster_font': [opt_str, ''], 'use_kib_mib': [opt_bool, False, _('IEC standard says KiB = 1024 bytes, KB = 1000 bytes.')], 'notify_on_all_muc_messages': [opt_bool, False], 'trayicon_notification_on_events': [opt_bool, True, _('Notify of events in the system trayicon.')], diff --git a/src/config.py b/src/config.py index 48737f17e..e8cc34f96 100644 --- a/src/config.py +++ b/src/config.py @@ -268,16 +268,6 @@ class PreferencesWindow: else: fontbutton.set_font_name(font) - #Font for roster - roster_font = gajim.config.get('roster_font') - # try to set default font for the current desktop env - if roster_font == '': - roster_font = gtkgui_helpers.get_default_font() - if roster_font is None: - roster_font = 'Sans 10' - gajim.config.set('roster_font', roster_font) - self.xml.get_widget('roster_fontbutton').set_font_name(roster_font) - # on new message only_in_roster = True if gajim.config.get('notify_on_new_message'): @@ -747,20 +737,19 @@ class PreferencesWindow: self.update_text_tags() gajim.interface.save_config() - def on_preference_widget_font_set(self, widget, config_name): + def on_preference_widget_font_set(self, widget, text): if widget: font = widget.get_font_name() else: font = '' - gajim.config.set(config_name, font) + gajim.config.set(text, font) self.update_text_font() gajim.interface.save_config() def update_text_font(self): - '''Update text font in Opened Chat Windows and in roster''' + '''Update text font in Opened Chat Windows''' for win in gajim.interface.msg_win_mgr.windows(): win.update_font() - gajim.interface.roster.update_font() def on_incoming_msg_colorbutton_color_set(self, widget): self.on_preference_widget_color_set(widget, 'inmsgcolor') @@ -786,9 +775,6 @@ class PreferencesWindow: font_widget.set_sensitive(True) self.on_preference_widget_font_set(font_widget, 'conversation_font') - def on_roster_fontbutton_font_set(self, widget): - self.on_preference_widget_font_set(widget, 'roster_font') - def on_reset_colors_button_clicked(self, widget): for i in ('inmsgcolor', 'outmsgcolor', 'statusmsgcolor', 'urlmsgcolor'): gajim.config.set(i, gajim.interface.default_values[i]) diff --git a/src/roster_window.py b/src/roster_window.py index 0bceee161..ebdca8e7e 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -21,7 +21,6 @@ import os import sys import time import urllib -import pango import common.sleepy import history_window @@ -1049,11 +1048,6 @@ class RosterWindow: if ctrl.type_id == message_control.TYPE_GC: ctrl.update_ui() - def update_font(self): - '''update the font used inthe roster''' - font = pango.FontDescription(gajim.config.get('roster_font')) - self.tree.modify_font(font) - def draw_roster(self): '''clear and draw roster''' # clear the model, only if it is not empty @@ -4166,7 +4160,6 @@ _('If "%s" accepts this request you will know his or her status.') % jid) self.collapsed_rows = gajim.config.get('collapsed_rows').split('\t') self.tooltip = tooltips.RosterTooltip() - self.update_font() self.draw_roster() ## Music Track notifications