Mercurial > libervia-backend
diff frontends/wix/profile.py @ 43:8a438a6ff587
Wix: added avatar in profile
- plugin XEP-0054: added getProfileFile bridge method
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 21 Dec 2009 15:11:50 +1100 |
parents | 874de3020e1c |
children | a5b5fb5fc9fd |
line wrap: on
line diff
--- a/frontends/wix/profile.py Mon Dec 21 13:22:11 2009 +1100 +++ b/frontends/wix/profile.py Mon Dec 21 15:11:50 2009 +1100 @@ -37,7 +37,8 @@ 'birthday' : 'Birthday', 'phone' : 'Phone #', 'website' : 'Website', - 'email' : 'E-mail' + 'email' : 'E-mail', + 'avatar' : 'Avatar' } self.ctl_list = {} # usefull to access ctrl, key = (name) @@ -69,6 +70,15 @@ sizer.Add(label) self.ctl_list[field] = wx.TextCtrl(generaltab, -1, value, style = flags) sizer.Add(self.ctl_list[field], 1, flag = wx.EXPAND) + #Avatar + if data.has_key('avatar'): + filename = self.host.bridge.getAvatarFile(data['avatar']) + label=wx.StaticText(generaltab, -1, self.name_dict['avatar']+": ") + sizer.Add(label) + img = wx.Image(filename).ConvertToBitmap() + self.ctl_list['avatar'] = wx.StaticBitmap(generaltab, -1, img) + sizer.Add(self.ctl_list['avatar'], 0) + self.notebook.AddPage(generaltab, "General")