code: def LoadState( self, config_parser ):
          
          if not config_parser:
              return
          if (
              not config_parser.has_section( 'window' ) or (
                  config_parser.has_option( 'window','maximized' ) and 
                  config_parser.getboolean( 'window', 'maximized' )
              )
          ):
              self.Maximize(True)
          try:
              width,height,x,y = [
                  config_parser.getint( 'window',key )
                  for key in ['width','height','x','y']
              ]
              self.SetPosition( (x,y))
              self.SetSize( (width,height))
          except ConfigParser.NoSectionError, err:
              # the file isn't written yet, so don't even warn...
              pass
          except Exception, err:
              # this is just convenience, if it breaks in *any* way, ignore it...
              log.error(
                  "Unable to load window preferences, ignoring: %s", traceback.format_exc()
              )
  
          try:
              font_size = config_parser.getint('window', 'font_size')
          except Exception:
              pass # use the default, by default
          else:
              font = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
              font.SetPointSize(font_size)
              for ctrl in self.ProfileListControls:
                  ctrl.SetFont(font)
          
          for control in self.ProfileListControls:
              control.LoadState( config_parser )
          
          self.config = config_parser
          wx.EVT_CLOSE( self, self.OnCloseWindow )
docs: Set our window state from the given config_parser instance