def on_update(self, widget=None, download=False, clear=False): '''called when the liststore need to be changed''' self.removable_list = {} self.removable_list['plugin'] = {} if self.first or download or clear: self.clear_all() self.append(False, '<b>' + _('Installed') + '</b>', 'installed', True, False) pluginmanager = get_pluginmanager() for name, plugin in pluginmanager.get_plugins(): is_active = pluginmanager.plugin_is_active(name) path = plugin.path if path.startswith(self.config_dir.base_dir) and not is_active: self.removable_list['plugin'][name] = path self.append( is_active, self.prettify_name( name, description=pluginmanager.plugin_description(name)), name, path=path) ExtensionDownloadList.on_update(self, widget, download, clear)
def on_cursor_changed(self, list_view, type_='plugin'): '''called when a row is selected''' name = self.get_selected_name(self.list_view) pluginmanager = get_pluginmanager() self.config_button.set_sensitive( pluginmanager.plugin_configurable(name)) ExtensionDownloadList.on_cursor_changed(self, list_view, type_, self.config_button)
def on_cursor_changed(self, list_view, type_='plugin'): '''called when a row is selected''' name = self.get_selected_name(self.list_view) pluginmanager = get_pluginmanager() self.config_button.set_sensitive(pluginmanager.plugin_configurable(name)) ExtensionDownloadList.on_cursor_changed(self, list_view, type_, self.config_button)
def __init__(self, session, init_path): ExtensionDownloadList.__init__( self, session, 'plugins', e3.common.Collections.PluginsCollection, init_path) self.config_button = gtk.Button(stock=gtk.STOCK_PREFERENCES) self.config_button.connect('clicked', self.on_config) self.no_button.set_property('no-show-all', True) self.buttonbox.pack_start(self.config_button, fill=False) self.on_cursor_changed(self.list_view)
def on_update(self, widget=None, download=False, clear=False): if self.first or download or clear: self.clear_all() self.append(False, '<b>Installed</b>', 'installed', True, False) pluginmanager = get_pluginmanager() for name in pluginmanager.get_plugins(): self.append(pluginmanager.plugin_is_active(name), self.list_store.prettify_name(name, pluginmanager.plugin_description(name)), name) ExtensionDownloadList.on_update(self, widget, download, clear)
def __init__(self, session, init_path): ExtensionDownloadList.__init__(self, session, 'plugins', e3.common.Collections.PluginsCollection, init_path) self.config_dir = e3.common.ConfigDir('emesene2') self.config_button = gtk.Button(stock=gtk.STOCK_PREFERENCES) self.config_button.connect('clicked', self.on_config) self.no_button.set_property('no-show-all', True) self.buttonbox.pack_start(self.config_button, fill=False) self.on_cursor_changed(self.list_view)
def on_update(self, widget=None, download=False, clear=False): '''called when the liststore need to be changed''' self.removable_list = {} self.removable_list['plugin'] = {} if self.first or download or clear: self.clear_all() self.append(False, _('Installed'), 'installed', True, False) pluginmanager = get_pluginmanager() for name, plugin in pluginmanager.get_plugins(): is_active = pluginmanager.plugin_is_active(name) path = plugin.path if path.startswith(self.config_dir.base_dir) and not is_active: self.removable_list['plugin'][name] = path self.append(is_active, name, name, path=path, description=pluginmanager.plugin_description(name)) ExtensionDownloadList.on_update(self, widget, download, clear)
def on_cursor_changed(self, list_view, type_='plugin'): '''called when a row is selected''' ExtensionDownloadList.on_cursor_changed(self, list_view, type_, self.config_button)