home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / dist-packages / AppInstall / distros / Debian.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  4.4 KB  |  80 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import Default
  5. 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
  6. from gettext import gettext as _
  7.  
  8. class Distribution(Default.Distribution):
  9.     
  10.     def __init__(self):
  11.         Default.Distribution.__init__(self)
  12.         self.filters_primary = {
  13.             SHOW_ALL: (_('All available applications'), _('Show all applications including ones which are possibly restricted by law or copyright')),
  14.             SHOW_ONLY_FREE: (_('All Open Source applications'), _('Show all Debian applications which can be freely used, modified and distributed. This includes a large variety of community maintained applications')) }
  15.         self.filters_secondary = {
  16.             SHOW_ONLY_THIRD_PARTY: (_('Third party applications'), _('Show only applications that are provided by independent software vendors and are not part of Debian')) }
  17.         self.components_ask = [
  18.             'contrib',
  19.             'non-free']
  20.         self.components_activation = {
  21.             None: [
  22.                 _('Enable the installation of software from the %s component of Debian?'),
  23.                 _('%s is not officially supported with security updates.')],
  24.             'main': [
  25.                 _('Enable the installaion of officially supported Debian software?'),
  26.                 _('%s is part of the Debian main distribution. Debian provides support and security updates, which will be enabled too.')],
  27.             'contrib': [
  28.                 _('Enable the installation of partial free software?'),
  29.                 _('%s is not part of the Debian main distribution and requires non-free software to work. Debian provides support and security updates, which will be enabled too.')],
  30.             'non-free': [
  31.                 _('Enable the installation of non-free software?'),
  32.                 _('The use, modification and distribution of %s is restricted by copyright or by legal terms in some countries.')] }
  33.         self.dependencies_map = [
  34.             (('kdelibs4c2a', 'python-kde3', 'libqt3-mt'), _('%s integrates well into the KDE desktop'), 'application-kde'),
  35.             (('libgnome2-0', 'python-gnome2', 'libgtk2.0-0', 'python-gtk2'), _('%s integrates well into the GNOME desktop'), 'application-gnome'),
  36.             ('libgnustep-base1.11', _('%s integrates well into the Gnustep desktop'), None),
  37.             (('libxfce4util4',), _('%s integrates well into the XFCE desktop'), None)]
  38.         self.comp_depend_map = {
  39.             'contrib': [
  40.                 'main',
  41.                 'non-free'],
  42.             'non-free': [
  43.                 'main'] }
  44.  
  45.     
  46.     def get_app_emblems(self, app, cache):
  47.         emblems = []
  48.         icon_name = None
  49.         tooltip = None
  50.         if app.thirdparty or app.channel:
  51.             tooltip = '%s is provided by a third party vendor and is therefore not an official part of Debian. The third party vendor is responsible for support and security updates.' % app.name
  52.             icon_name = 'application-proprietary'
  53.             emblems.append((icon_name, tooltip))
  54.         elif app.component == 'main':
  55.             tooltip = _('Debian provides support and security updates for %s') % app.name
  56.             icon_name = 'application-debian-main'
  57.             emblems.append((icon_name, tooltip))
  58.         elif app.component == 'contrib':
  59.             tooltip = _('%s requires non-free software to work.Debian provides support and security updates.') % app.name
  60.             icon_name = 'application-debian-contrib'
  61.             emblems.append((icon_name, tooltip))
  62.         elif app.component == 'non-free':
  63.             tooltip = _('The use, modification and distribution of %s is restricted by copyright or by legal terms in some countries. Debian provides support and security updates.') % app.name
  64.             icon_name = 'application-debian-non-free'
  65.             emblems.append((icon_name, tooltip))
  66.         
  67.         if cache.has_key(app.pkgname):
  68.             for deps, tooltip, icon_name in self.dependencies_map:
  69.                 for dep in deps:
  70.                     if cache.pkgDependsOn(app.pkgname, dep):
  71.                         emblems.append((icon_name, tooltip % app.name))
  72.                         break
  73.                         continue
  74.                 
  75.             
  76.         
  77.         return emblems
  78.  
  79.  
  80.