msg = _('No application suitable for automatic installation is available for handling this kind of file.')
else:
abbrev = _('no application found')
msg = _('No application is known for this kind of file.')
return (False, unapproved, abbrev, msg)
def isApproved(self, component, package):
if not self._wl_components.has_key(component):
pass
return self._wl_packages.has_key(package)
def isSpecific(self):
return True
def userApprovedNotify(self):
self._userapproved = True
def changesSuccessfulNotify(self):
self._changessuccessful = True
def modifyUserInterface(self, app):
app.scrolledwindow_left.hide()
app.label_progress.set_markup('<big><b>%s</b></big>\n\n%s' % (_('Searching for appropriate applications'), _('Please wait. This might take a minute or two.')))
class CodecSearchActivationStyle(SearchActivationStyle):
if not askConfirmation(_('Search for suitable codec?'), _('The required software to play this file is not installed. You need to install suitable codecs to play media files. Do you want to search for a codec that supports the selected file?\n\nThe search will also include software which is not officially supported.'), self.options.transient_for):
sys.exit(4)
else:
import gtk
abbrev = _('Invalid commandline')
msg = _("'%s' does not understand the commandline argument '%s'" % (sys.argv[0], self._args))
app.textview_description.show_message('', _('Some countries allow patents on software, and freely redistributable software like Ubuntu cannot pay for patent licenses. If you are in one of these jurisdictions, you can buy licensed media playback plug-ins from the Canonical Store. Otherwise, select a free plug-in above to install it.'))
app.label_progress.set_markup('<big><b>%s</b></big>\n\n%s' % (_('Searching for appropriate codecs'), _('Please wait. This might take a minute or two.')))
app.hbox_search_show.hide()
app.button_ok.set_label(_('_Install'))
app.window_main.set_title(_('Install Media Plug-ins'))
app.label_progress.set_markup('<big><b>%s</b></big>\n\n%s' % (_('Searching for appropriate applications'), _("A list of applications that can handle documents of the type '%s' will be created") % mime.get_comment()))
app.button_ok.set_label(_('_Install'))
if self._uri:
app.window_main.set_title(_('Install applications to open "%s"') % os.path.basename(self._duri))
app.label_progress.set_markup('<big><b>%s</b></big>\n\n%s' % (_('Searching for extensions'), _('Extensions allow you to add new features to your application.')))
parser.add_option('', '--mime-type', default = None, action = 'store', type = 'string', dest = 'mime_type', help = 'Show only applications that handle the given file type')
parser.add_option('', '--transient-for', default = None, action = 'store', type = 'int', dest = 'transient_for', help = 'Start as a child window of the given window (Only needed by developers')
parser.add_option('', '--data-dir', default = '/usr/share/gnome-app-install', action = 'store', type = 'string', dest = 'datadir', help = 'Load data from the given directory (Only needed by developers)')
parser.add_option('', '--desktopdir', default = '/usr/share/app-install', action = 'store', type = 'string', dest = 'desktopdir', help = 'Read the desktop files from the given directory (Only needed by developers)')
parser.add_option('', '--cachedir', default = '/var/cache/app-install', action = 'store', type = 'string', dest = 'cachedir', help = 'Use the given directory for the cache (Only needed by developers)')
parser.add_option('', '--xul-extensions', default = None, action = 'store', type = 'string', dest = 'xul_extensions', help = 'Start as installer for XUL extensions')
parser.add_option('', '--addon-cd', default = None, action = 'store', type = 'string', dest = 'addon_cd', help = 'Start as installer for an addon cd')
parser.add_option('', '--selftest', action = 'store_true', dest = 'selftest', help = 'Perform self tests (Only needed by developers)')
parser.add_option('', '--profile', action = 'store', type = 'string', dest = 'profile', default = None, help = 'Store profiling data in the given file (Only needed by developers)')
parser.add_option('', '--test-mode', action = 'store_true', dest = 'test_mode', help = 'Run in a sepcial test mode(Only needed by developers)')
(options, args) = parser.parse_args()
if options.selftest:
AppInstall = AppInstall
import AppInstall
app = AppInstall(options, ActivationStyle())
while True:
model = app.treeview_packages.get_model()
it = model.get_iter_root()
(name, item, popcon) = model[it]
app.applyChanges([
item], [])
if sys.argv[0].split('/')[-1] == 'gstreamer-codec-install':