From 8b43c212e47eb855505c873ac537342fdc220f30 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 1 Sep 2005 13:58:20 +0000 Subject: [PATCH] [andreasvc] make 52 x 52 for avatars customizable --- src/common/config.py | 4 +++- src/tabbed_chat_window.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/config.py b/src/common/config.py index 67a55a88a..d407e98a9 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -117,7 +117,7 @@ class Config: 'send_on_ctrl_enter': [opt_bool, False], # send on ctrl+enter 'show_roster_on_startup': [opt_bool, True], 'key_up_lines': [opt_int, 25], # how many lines to store for key up - 'version': [ opt_str, '0.8' ], + 'version': [ opt_str, '0.8.1' ], 'always_compact_view': [opt_bool, False], # initial compact view state 'search_engine': [opt_str, 'http://www.google.com/search?&q=%s&sourceid=gajim'], 'dictionary_url': [opt_str, 'WIKTIONARY'], # by default use wiktionary @@ -146,6 +146,8 @@ class Config: 'tabs_always_visible': [opt_bool, False], # show tab if one tab? 'tabs_border': [opt_bool, False], # border if one tab? 'tabs_close_button': [opt_bool, True], # close button in tab? + 'avatar_width': [opt_int, 52], + 'avatar_height': [opt_int, 52], } __options_per_key = { diff --git a/src/tabbed_chat_window.py b/src/tabbed_chat_window.py index 05e10ca81..a2ba3286b 100644 --- a/src/tabbed_chat_window.py +++ b/src/tabbed_chat_window.py @@ -212,7 +212,9 @@ timestamp, contact): pixbuf = pixbufloader.get_pixbuf() pixbufloader.close() - scaled_buf = pixbuf.scale_simple(52, 52, gtk.gdk.INTERP_HYPER) + w = gajim.config.get('avatar_width') + h = gajim.config.get('avatar_height') + scaled_buf = pixbuf.scale_simple(w, h, gtk.gdk.INTERP_HYPER) x = None if self.xmls.has_key(vcard['jid']): x = self.xmls[vcard['jid']]