home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 June / maximum-cd-2009-06.iso / DiscContents / digsby_setup.exe / lib / gui / pref / pg_accounts.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-02-26  |  2.6 KB  |  49 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. import wx
  5. from gui.pref.prefcontrols import *
  6. from gui.accountslist import IMAccountsList, EmailList, SocialList
  7. from logging import getLogger
  8. log = getLogger('pg_accounts')
  9. from gui.pref.prefstrings import accounts as _
  10. account_options = [
  11.     ('panel', _('Show in contact list')),
  12.     ('systray', _('Show icon in tray')),
  13.     ('both', _('Show both'))]
  14. from gui.uberwidgets.PrefPanel import PrefPanel
  15.  
  16. def panel(panel, sizer, addgroup, exithooks):
  17.     manager = profile.account_manager
  18.     accts = IMAccountsList(panel, manager.accounts)
  19.     emailaccts = EmailList(panel, manager.emailaccounts)
  20.     socaccts = SocialList(panel, manager.socialaccounts)
  21.     im = PrefPanel(panel, accts, _('IM Accounts'), (_('Add IM Account'),), (lambda b: accts.addmenu.PopupMenu(b.ScreenRect)))
  22.     email = PrefPanel(panel, emailaccts, _('Email Accounts'), (_('Add Email Account'),), (lambda b: emailaccts.addmenu.PopupMenu(b.ScreenRect)))
  23.     social = PrefPanel(panel, socaccts, _('Social Networks'), (_('Add Social Network'),), (lambda b: socaccts.addmenu.PopupMenu(b.ScreenRect)))
  24.     bottom = wx.GridSizer(2, 1)
  25.     email_sizer = HSizer()
  26.     emailradio = PrefPanel(panel, RadioBox('buddylist.show_email_as', account_options), _('Where to Show'))
  27.     email_sizer.AddMany([
  28.         (email, 1, wx.EXPAND),
  29.         (emailradio, 0, wx.EXPAND | wx.LEFT, 6)])
  30.     bottom.Add(email_sizer, 1, wx.EXPAND | BOTTOM, 2)
  31.     soc_radio = PrefPanel(panel, RadioBox('buddylist.show_social_as', account_options), _('Where to Show'))
  32.     soc_sizer = HSizer()
  33.     soc_sizer.AddMany([
  34.         (social, 1, wx.EXPAND),
  35.         (soc_radio, 0, wx.EXPAND | LEFT, 6)])
  36.     bottom.Add(soc_sizer, 1, wx.EXPAND | TOP, 1)
  37.     sizer.AddMany([
  38.         (im, 1, wx.EXPAND | BOTTOM, 3),
  39.         (bottom, 1, wx.EXPAND)])
  40.     
  41.     def onclose():
  42.         accts.on_close()
  43.         socaccts.on_close()
  44.         emailaccts.on_close()
  45.  
  46.     panel.on_close = onclose
  47.     return panel
  48.  
  49.