[andreasvc] make 52 x 52 for avatars customizable

This commit is contained in:
Nikos Kouremenos 2005-09-01 13:58:20 +00:00
parent 5bd4ad4da6
commit 8b43c212e4
2 changed files with 6 additions and 2 deletions

View File

@ -117,7 +117,7 @@ class Config:
'send_on_ctrl_enter': [opt_bool, False], # send on ctrl+enter 'send_on_ctrl_enter': [opt_bool, False], # send on ctrl+enter
'show_roster_on_startup': [opt_bool, True], 'show_roster_on_startup': [opt_bool, True],
'key_up_lines': [opt_int, 25], # how many lines to store for key up '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 'always_compact_view': [opt_bool, False], # initial compact view state
'search_engine': [opt_str, 'http://www.google.com/search?&q=%s&sourceid=gajim'], 'search_engine': [opt_str, 'http://www.google.com/search?&q=%s&sourceid=gajim'],
'dictionary_url': [opt_str, 'WIKTIONARY'], # by default use wiktionary '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_always_visible': [opt_bool, False], # show tab if one tab?
'tabs_border': [opt_bool, False], # border if one tab? 'tabs_border': [opt_bool, False], # border if one tab?
'tabs_close_button': [opt_bool, True], # close button in tab? 'tabs_close_button': [opt_bool, True], # close button in tab?
'avatar_width': [opt_int, 52],
'avatar_height': [opt_int, 52],
} }
__options_per_key = { __options_per_key = {

View File

@ -212,7 +212,9 @@ timestamp, contact):
pixbuf = pixbufloader.get_pixbuf() pixbuf = pixbufloader.get_pixbuf()
pixbufloader.close() 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 x = None
if self.xmls.has_key(vcard['jid']): if self.xmls.has_key(vcard['jid']):
x = self.xmls[vcard['jid']] x = self.xmls[vcard['jid']]