from AppInstall.Menu import SHOW_ALL, SHOW_ONLY_SUPPORTED, SHOW_ONLY_FREE, SHOW_ONLY_MAIN, SHOW_ONLY_PROPRIETARY, SHOW_ONLY_THIRD_PARTY, SHOW_ONLY_INSTALLED
from gettext import gettext as _
import subprocess
class Distribution(object):
def __init__(self):
self.filters_primary = {
SHOW_ALL: (_('All available applications'), _('Show all applications including ones which are unsupported and possibly restricted by law or copyright')) }
self.filters_secondary = { }
self.components_ask = []
self.components_activation = {
None: [
_('Enable the installation of software from the %s component of Ubuntu?'),
_('%s is not officially supported with security updates.')] }
self.dependencies_map = []
self.comp_depend_map = { }
def get_components_ask(self):
'''
Returns a list of components whose applications should not be installed
before asking for a confirmation
'''
return self.components_ask
def get_codec_information_link(self):
'''
Returns a link and a description to additional codec releated
information or possibilities, e.g. a link to a petition against
software patents or a shop to purchase codecs, just as the distro
pleases
'''
return (None, None)
def get_components_ask_msgs(self):
'''
Returns a dictonary that provides dialog messages that are shown,
before a component gets activated or when it requires to be confirmed
'''
return self.components_activation
def get_codename(self):
'''
Return the distribution codename of the current running distro