Exemplo n.º 1
0
 def populate_plugins(self):
     """
         Populate plugins treeview
     """
     
     for i in ALL_PLUGINS:
         plugin = get_plugin(i)
         plugin_name = get_plugin_name(plugin)
         plugin_enabled = self.daemon.plugin_is_enabled(i)
         
         if not plugin_name:
             plugin_name = i
         
         iter = self.ListStore.append((i, plugin_enabled, plugin_name))
         self.iters[plugin_name] = iter
Exemplo n.º 2
0
    def populate_plugins(self):
        """
            Populate plugins treeview
        """

        for i in ALL_PLUGINS:
            plugin = get_plugin(i)
            plugin_name = get_plugin_name(plugin)
            plugin_enabled = self.daemon.plugin_is_enabled(i)

            if not plugin_name:
                plugin_name = i

            iter = self.ListStore.append((i, plugin_enabled, plugin_name))
            self.iters[plugin_name] = iter
Exemplo n.º 3
0
 def update_plugin_descriptions(self):
     """
         Update all informations located in right panel
     """
     
     self.clear_entries()
     
     if len(self.ListStore) > 0:
         model_ = self.ListStore
         if self.treeview.get_cursor()[0]:
             index = self.treeview.get_cursor()[0][0]
         else:
             index = 0
         
         plugin_module_name = model_[index][0]
         plugin = get_plugin(plugin_module_name)
         
         plugin_name = get_plugin_name(plugin)
         plugin_description = get_plugin_description(plugin)
         plugin_author = get_plugin_author(plugin)
         plugin_copyright = get_plugin_copyright(plugin)
         plugin_site = get_plugin_site(plugin)
         
         self.title.set_markup("<big><big>%s</big></big>" % plugin_name)
         
         if plugin_description:
             self.description.set_text(plugin_description)
         
         if plugin_author:
             self.author.set_text(plugin_author)
         
         if plugin_copyright:
             self.copyright.set_text(plugin_copyright)
         
         if plugin_site:
             self.site.set_label(plugin_site)
             self.site.set_uri(plugin_site)
         
         self.preferences_button.set_sensitive(hasattr(plugin, "configure"))
Exemplo n.º 4
0
    def update_plugin_descriptions(self):
        """
            Update all informations located in right panel
        """

        self.clear_entries()

        if len(self.ListStore) > 0:
            model_ = self.ListStore
            if self.treeview.get_cursor()[0]:
                index = self.treeview.get_cursor()[0][0]
            else:
                index = 0

            plugin_module_name = model_[index][0]
            plugin = get_plugin(plugin_module_name)

            plugin_name = get_plugin_name(plugin)
            plugin_description = get_plugin_description(plugin)
            plugin_author = get_plugin_author(plugin)
            plugin_copyright = get_plugin_copyright(plugin)
            plugin_site = get_plugin_site(plugin)

            self.title.set_markup("<big><big>%s</big></big>" % plugin_name)

            if plugin_description:
                self.description.set_text(plugin_description)

            if plugin_author:
                self.author.set_text(plugin_author)

            if plugin_copyright:
                self.copyright.set_text(plugin_copyright)

            if plugin_site:
                self.site.set_label(plugin_site)
                self.site.set_uri(plugin_site)

            self.preferences_button.set_sensitive(hasattr(plugin, "configure"))