home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
- import wx
- from gui.pref.prefcontrols import *
- from gui.accountslist import IMAccountsList, EmailList, SocialList
- from logging import getLogger
- log = getLogger('pg_accounts')
- from gui.pref.prefstrings import accounts as _
- account_options = [
- ('panel', _('Show in contact list')),
- ('systray', _('Show icon in tray')),
- ('both', _('Show both'))]
- from gui.uberwidgets.PrefPanel import PrefPanel
-
- def panel(panel, sizer, addgroup, exithooks):
- manager = profile.account_manager
- accts = IMAccountsList(panel, manager.accounts)
- emailaccts = EmailList(panel, manager.emailaccounts)
- socaccts = SocialList(panel, manager.socialaccounts)
- im = PrefPanel(panel, accts, _('IM Accounts'), (_('Add IM Account'),), (lambda b: accts.addmenu.PopupMenu(b.ScreenRect)))
- email = PrefPanel(panel, emailaccts, _('Email Accounts'), (_('Add Email Account'),), (lambda b: emailaccts.addmenu.PopupMenu(b.ScreenRect)))
- social = PrefPanel(panel, socaccts, _('Social Networks'), (_('Add Social Network'),), (lambda b: socaccts.addmenu.PopupMenu(b.ScreenRect)))
- bottom = wx.GridSizer(2, 1)
- email_sizer = HSizer()
- emailradio = PrefPanel(panel, RadioBox('buddylist.show_email_as', account_options), _('Where to Show'))
- email_sizer.AddMany([
- (email, 1, wx.EXPAND),
- (emailradio, 0, wx.EXPAND | wx.LEFT, 6)])
- bottom.Add(email_sizer, 1, wx.EXPAND | BOTTOM, 2)
- soc_radio = PrefPanel(panel, RadioBox('buddylist.show_social_as', account_options), _('Where to Show'))
- soc_sizer = HSizer()
- soc_sizer.AddMany([
- (social, 1, wx.EXPAND),
- (soc_radio, 0, wx.EXPAND | LEFT, 6)])
- bottom.Add(soc_sizer, 1, wx.EXPAND | TOP, 1)
- sizer.AddMany([
- (im, 1, wx.EXPAND | BOTTOM, 3),
- (bottom, 1, wx.EXPAND)])
-
- def onclose():
- accts.on_close()
- socaccts.on_close()
- emailaccts.on_close()
-
- panel.on_close = onclose
- return panel
-
-