Mercurial > libervia-backend
comparison frontends/src/wix/profile.py @ 587:952322b1d490
Remove trailing whitespaces.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 18 Jan 2013 17:55:34 +0100 |
parents | ca13633d3b6b |
children | 84a6e83157c2 |
comparison
equal
deleted
inserted
replaced
586:6a718ede8be1 | 587:952322b1d490 |
---|---|
45 self.sizer = wx.BoxSizer(wx.VERTICAL) | 45 self.sizer = wx.BoxSizer(wx.VERTICAL) |
46 self.notebook=wx.Notebook(self, -1) | 46 self.notebook=wx.Notebook(self, -1) |
47 self.sizer.Add(self.notebook, 1, flag=wx.EXPAND) | 47 self.sizer.Add(self.notebook, 1, flag=wx.EXPAND) |
48 self.SetSizer(self.sizer) | 48 self.SetSizer(self.sizer) |
49 self.SetAutoLayout(True) | 49 self.SetAutoLayout(True) |
50 | 50 |
51 #events | 51 #events |
52 self.Bind(wx.EVT_CLOSE, self.onClose, self) | 52 self.Bind(wx.EVT_CLOSE, self.onClose, self) |
53 | 53 |
54 self.MakeModal() | 54 self.MakeModal() |
55 self.showData(data) | 55 self.showData(data) |
56 self.Show() | 56 self.Show() |
57 | 57 |
58 def showData(self, data): | 58 def showData(self, data): |
59 flags = wx.TE_READONLY | 59 flags = wx.TE_READONLY |
60 | 60 |
61 #General tab | 61 #General tab |
62 generaltab = wx.Panel(self.notebook) | 62 generaltab = wx.Panel(self.notebook) |
63 sizer = wx.FlexGridSizer(cols=2) | 63 sizer = wx.FlexGridSizer(cols=2) |
64 sizer.AddGrowableCol(1) | 64 sizer.AddGrowableCol(1) |
65 generaltab.SetSizer(sizer) | 65 generaltab.SetSizer(sizer) |
66 generaltab.SetAutoLayout(True) | 66 generaltab.SetAutoLayout(True) |
67 for field in ['fullname','nick', 'birthday', 'phone', 'website', 'email']: | 67 for field in ['fullname','nick', 'birthday', 'phone', 'website', 'email']: |
68 value = data[field] if data.has_key(field) else '' | 68 value = data[field] if data.has_key(field) else '' |
69 label=wx.StaticText(generaltab, -1, self.name_dict[field]+": ") | 69 label=wx.StaticText(generaltab, -1, self.name_dict[field]+": ") |
70 sizer.Add(label) | 70 sizer.Add(label) |
71 self.ctl_list[field] = wx.TextCtrl(generaltab, -1, value, style = flags) | 71 self.ctl_list[field] = wx.TextCtrl(generaltab, -1, value, style = flags) |
72 sizer.Add(self.ctl_list[field], 1, flag = wx.EXPAND) | 72 sizer.Add(self.ctl_list[field], 1, flag = wx.EXPAND) |
78 img = wx.Image(filename).ConvertToBitmap() | 78 img = wx.Image(filename).ConvertToBitmap() |
79 self.ctl_list['avatar'] = wx.StaticBitmap(generaltab, -1, img) | 79 self.ctl_list['avatar'] = wx.StaticBitmap(generaltab, -1, img) |
80 sizer.Add(self.ctl_list['avatar'], 0) | 80 sizer.Add(self.ctl_list['avatar'], 0) |
81 | 81 |
82 | 82 |
83 | 83 |
84 self.notebook.AddPage(generaltab, _("General")) | 84 self.notebook.AddPage(generaltab, _("General")) |
85 | 85 |
86 | 86 |
87 def onClose(self, event): | 87 def onClose(self, event): |
88 """Close event""" | 88 """Close event""" |