Example #1
0
 def collect_data_thread(self):
     """
     Collects plugins info from NINJA-IDE webservice interface
     """
     #get availables OFICIAL plugins
     oficial_available = plugin_manager.available_oficial_plugins()
     #get availables COMMUNITIES plugins
     community_available = plugin_manager.available_community_plugins()
     #get locals plugins
     local_plugins = plugin_manager.local_plugins()
     updates = []
     #Check por update the already installed plugin
     for local_data in local_plugins:
         ava = None
         plug_oficial = _get_plugin(local_data["name"], oficial_available)
         plug_community = _get_plugin(local_data["name"],
             community_available)
         if plug_oficial:
             ava = plug_oficial
             oficial_available = [p for p in oficial_available
                     if unicode(p["name"]) != unicode(local_data["name"])]
         elif plug_community:
             ava = plug_community
             community_available = [p for p in community_available
                     if unicode(p["name"]) != unicode(local_data["name"])]
         #check versions
         if ava and float(ava["version"]) > float(local_data["version"]):
             #this plugin has an update
             updates.append(ava)
     #set manager attributes
     self._manager._oficial_available = oficial_available
     self._manager._community_available = community_available
     self._manager._locals = local_plugins
     self._manager._updates = updates
Example #2
0
 def collect_data_thread(self):
     """
     Collects plugins info from NINJA-IDE webservice interface
     """
     # get availables OFICIAL plugins
     oficial_available = plugin_manager.available_oficial_plugins()
     # get availables COMMUNITIES plugins
     community_available = plugin_manager.available_community_plugins()
     # get locals plugins
     local_plugins = plugin_manager.local_plugins()
     updates = []
     # Check por update the already installed plugin
     for local_data in local_plugins:
         ava = None
         plug_oficial = _get_plugin(local_data["name"], oficial_available)
         plug_community = _get_plugin(local_data["name"],
                                      community_available)
         if plug_oficial:
             ava = plug_oficial
             oficial_available = [
                 p for p in oficial_available
                 if p["name"] != local_data["name"]
             ]
         elif plug_community:
             ava = plug_community
             community_available = [
                 p for p in community_available
                 if p["name"] != local_data["name"]
             ]
         # check versions
         if ava:
             available_version = version.LooseVersion(str(ava["version"]))
         else:
             available_version = version.LooseVersion('0.0')
         local_version = version.LooseVersion(str(local_data["version"]))
         if available_version > local_version:
             # this plugin has an update
             updates.append(ava)
     # set manager attributes
     self._manager._oficial_available = oficial_available
     self._manager._community_available = community_available
     self._manager._locals = local_plugins
     self._manager._updates = updates
Example #3
0
 def reset_installed_plugins(self):
     """Reset all the installed plugins"""
     local_plugins = plugin_manager.local_plugins()
     plugins = _format_for_table(local_plugins)
     self._installedWidget.reset_table(plugins)
Example #4
0
 def reset_installed_plugins(self):
     local_plugins = plugin_manager.local_plugins()
     plugins = _format_for_table(local_plugins)
     self._installedWidget.reset_table(plugins)