home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 February / maximum-cd-2011-02.iso / DiscContents / digsby_setup85.exe / lib / plugins / provider_jabber / jabber_gui.pyo (.txt) < prev   
Encoding:
Python Compiled Bytecode  |  2010-11-24  |  2.9 KB  |  55 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. import hooks
  5. import wx
  6. import gui.controls as controls
  7. import gui.toolbox as toolbox
  8. import digsby_service_editor.default_ui as default_ui
  9.  
  10. def construct_advanced_subpanel_im(panel, SP, MSP, MSC):
  11.     MSC.info.pop('more_details', None)
  12.     hooks.first('digsby.services.edit.advanced.construct_sub.im', impl = 'digsby_service_editor', panel = panel, SP = SP, MSP = MSP, MSC = MSC)
  13.     encryption = dict(radio = controls.RadioPanel(panel, [
  14.         'Use TLS if Possible',
  15.         'Require TLS',
  16.         'Force SSL',
  17.         'No Encryption']))
  18.     encryption['radio'].SetValue(getattr(SP, 'encryption', MSC.info.defaults.encryption))
  19.     sz = panel.controls['advanced_sz']
  20.     hsz = wx.BoxSizer(wx.HORIZONTAL)
  21.     l_sz = wx.BoxSizer(wx.VERTICAL)
  22.     default_ui.ezadd(l_sz, encryption['radio'], flag = wx.EXPAND | wx.ALIGN_CENTER_HORIZONTAL)
  23.     hsz.Add(l_sz, flag = wx.EXPAND | wx.LEFT, border = 10)
  24.     r_sz = wx.BoxSizer(wx.VERTICAL)
  25.     ignore_ssl_warnings = dict(check = wx.CheckBox(panel, -1, 'Ignore SSL Warnings'))
  26.     ignore_ssl_warnings['check'].Value = getattr(SP, 'ignore_ssl_warnings', MSC.info.defaults.ignore_ssl_warnings)
  27.     default_ui.ezadd(r_sz, ignore_ssl_warnings['check'], flag = wx.EXPAND | wx.ALL)
  28.     allow_plaintext = dict(check = wx.CheckBox(panel, -1, 'Allow Plaintext Login'))
  29.     allow_plaintext['check'].Value = getattr(SP, 'allow_plaintext', MSC.info.defaults.allow_plaintext)
  30.     default_ui.ezadd(r_sz, allow_plaintext['check'], flag = wx.EXPAND | wx.ALL)
  31.     hsz.Add(r_sz, flag = wx.EXPAND | wx.RIGHT, border = 0)
  32.     default_ui.ezadd(sz, hsz, (sz.row, 0), (4, 4), flag = wx.EXPAND | wx.ALL)
  33.     sz.row += 4
  34.     panel.controls.update(encryption = encryption, ignore_ssl_warnings = ignore_ssl_warnings, allow_plaintext = allow_plaintext)
  35.     return True
  36.  
  37.  
  38. def extract_advanced_subpanel_im(panel, info, SP, MSP, MSC):
  39.     hooks.first('digsby.services.edit.advanced.extract_sub.im', impl = 'digsby_service_editor', panel = panel, info = info, SP = SP, MSP = MSP, MSC = MSC)
  40.     info['encryption'] = panel.controls['encryption']['radio'].GetValue()
  41.     info['ignore_ssl_warnings'] = panel.controls['ignore_ssl_warnings']['check'].Value
  42.     info['allow_plaintext'] = panel.controls['allow_plaintext']['check'].Value
  43.     return True
  44.  
  45.  
  46. def delete_account_dialog(parent = None, SP = None):
  47.     import jabber
  48.     JabberDeleteConfirmBox = JabberDeleteConfirmBox
  49.     import gui.protocols.jabbergui
  50.     message = _('Are you sure you want to delete account "%s"?') % SP.name
  51.     caption = _('Delete Account')
  52.     msgbox = JabberDeleteConfirmBox(SP.get_component('im'), message, parent, title = caption)
  53.     return msgbox
  54.  
  55.