parameters: (self)
return_statement: return self._list.GetItemCount()
docstring: Populates the list of plugins and sets the
          values of their states. Any successive calls to
          this function will clear the list and Repopulate it
          with current config values. Returns the number of
          items populated to the list
          @postcondition: list is populated with all plugins that are
                          currently loaded and sets the checkmarks accordingly
          @return: number of items added to list
docstring_summary: Populates the list of plugins and sets the
          values of their states. Any successive calls to
          this function will clear the list and Repopulate it
          with current config values. Returns the number of
          items populated to the list
          @postcondition: list is populated with all plugins that are
                          currently loaded and sets the checkmarks accordingly
          @return: number of items added to list
docstring_tokens: Populates the list of plugins and sets the values of their states . Any successive calls to this function will clear the list and Repopulate it with current config values . Returns the number of items populated to the list @postcondition : list is populated with all plugins that are currently loaded and sets the checkmarks accordingly @return : number of items added to list
function: def PopulateCtrl(self):
          """Populates the list of plugins and sets the
          values of their states. Any successive calls to
          this function will clear the list and Repopulate it
          with current config values. Returns the number of
          items populated to the list
          @postcondition: list is populated with all plugins that are
                          currently loaded and sets the checkmarks accordingly
          @return: number of items added to list
  
          """
          p_mgr = wx.GetApp().GetPluginManager()
          if self._list.GetItemCount():
              self._list.DeleteAllItems()
  
          p_mgr.ReInit()
          config = p_mgr.GetConfig()
          keys = sorted([ ed_txt.DecodeString(name)
                          for name in config.keys() ],
                        key=unicode.lower)
          uninstalled = Profile_Get('UNINSTALL_PLUGINS', default=list())
  
          with eclib.Freezer(self._list) as _tmp:
              for item in keys:
                  val = config[item]
                  mod = sys.modules.get(item)
                  dist = p_mgr.GetPluginDistro(item)
                  if dist is not None:
                      item = dist.project_name
                      version = dist.version
                  else:
                      version = str(getattr(mod, '__version__', _("Unknown")))
  
                  pdata = PluginData()
                  pdata.SetName(item)
                  desc = getattr(mod, '__doc__', None)
                  if not isinstance(desc, basestring):
                      desc = _("No Description Available")
                  pdata.SetDescription(desc.strip())
                  pdata.SetAuthor(getattr(mod, '__author__', _("Unknown")))
                  pdata.SetVersion(version)
                  pdata.SetDist(dist)
                  pbi = PBPluginItem(self._list, mod, pdata, None)
  
                  pbi.SetChecked(val)
                  util.Log("[pluginmgr][info] Adding %s to list" % item)
                  self._list.AppendItem(pbi)
                  if pbi.GetInstallPath() in uninstalled:
                      pbi.Enable(False)
  
          self._list.SendSizeEvent()
          return self._list.GetItemCount()
function_tokens: def PopulateCtrl ( self ) : p_mgr = wx . GetApp ( ) . GetPluginManager ( ) if self . _list . GetItemCount ( ) : self . _list . DeleteAllItems ( ) p_mgr . ReInit ( ) config = p_mgr . GetConfig ( ) keys = sorted ( [ ed_txt . DecodeString ( name ) for name in config . keys ( ) ] , key = unicode . lower ) uninstalled = Profile_Get ( 'UNINSTALL_PLUGINS' , default = list ( ) ) with eclib . Freezer ( self . _list ) as _tmp : for item in keys : val = config [ item ] mod = sys . modules . get ( item ) dist = p_mgr . GetPluginDistro ( item ) if dist is not None : item = dist . project_name version = dist . version else : version = str ( getattr ( mod , '__version__' , _ ( "Unknown" ) ) ) pdata = PluginData ( ) pdata . SetName ( item ) desc = getattr ( mod , '__doc__' , None ) if not isinstance ( desc , basestring ) : desc = _ ( "No Description Available" ) pdata . SetDescription ( desc . strip ( ) ) pdata . SetAuthor ( getattr ( mod , '__author__' , _ ( "Unknown" ) ) ) pdata . SetVersion ( version ) pdata . SetDist ( dist ) pbi = PBPluginItem ( self . _list , mod , pdata , None ) pbi . SetChecked ( val ) util . Log ( "[pluginmgr][info] Adding %s to list" % item ) self . _list . AppendItem ( pbi ) if pbi . GetInstallPath ( ) in uninstalled : pbi . Enable ( False ) self . _list . SendSizeEvent ( ) return self . _list . GetItemCount ( )