~timo-jyrinki/ubuntu/trusty/pitivi/backport_utopic_fixes

« back to all changes in this revision

Viewing changes to pitivi/application.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Bicha
  • Date: 2011-08-15 02:32:20 UTC
  • mfrom: (1.5.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110815023220-x2n5l0i4deiqn7dn
Tags: 0.14.2-0ubuntu1
* New upstream version.
  - New Mallard format help
* debian/control:
  - Add gnome-doc-utils to build-depends
  - Bump pygtk minimum to 2.24
* debian/patches/01_lpi.patch
  - Move LPI items below User Manual in Help menu
* debian/watch: Watch for 0.14.* tar.bz2

Show diffs side-by-side

added added

removed removed

Lines of Context:
370
370
 
371
371
    def __init__(self, debug=False):
372
372
        FullGuiPitivi.__init__(self, debug)
373
 
        self.projectManager.newBlankProject()
374
373
 
375
374
    def _createGui(self):
376
 
        self.projectManager.connect("new-project-loading", self._hideWizardCb)
377
 
        self.projectManager.connect("new-project-failed", self._showWizardCb)
378
375
        self.wizard = StartUpWizard(self)
379
376
        return FullGuiPitivi._createGui(self)
380
377
 
382
379
        FullGuiPitivi._showGui(self)
383
380
        self.wizard.show()
384
381
 
385
 
    def _hideWizardCb(self, unused_projectManager, uri):
386
 
        if uri is not None:
387
 
            self.wizard.hide()
388
 
 
389
 
    def _showWizardCb(self, unused_projectManager, unused_uri, unused_exception):
390
 
        self.wizard.show()
391
 
 
392
382
 
393
383
class PreviewGuiPitivi(GuiPitivi):
394
384
    """
398
388
 
399
389
    def __init__(self, project_filename, debug=False):
400
390
        GuiPitivi.__init__(self, debug)
401
 
 
402
391
        self._loadProject(project_filename)
403
392
 
404
393
    def _createGui(self):
475
464
 
476
465
    # Validate options.
477
466
    if options.render_output and options.preview:
478
 
        parser.error("-p and -r cannot be used simultaneously")
 
467
        parser.error(_("-p and -r cannot be used simultaneously"))
479
468
 
480
469
    if options.import_sources and (options.render_output or options.preview):
481
 
        parser.error("-r or -p and -i are incompatible")
 
470
        parser.error(_("-r or -p and -i are incompatible"))
482
471
 
483
472
    if options.add_to_timeline and not options.import_sources:
484
 
        parser.error("-a requires -i")
 
473
        parser.error(_("-a requires -i"))
485
474
 
486
475
    # Validate args.
487
476
    if options.import_sources:
489
478
        pass
490
479
    elif options.render_output:
491
480
        if len(args) != 1:
492
 
            parser.error("-r requires exactly one PROJECT_FILE")
 
481
            parser.error(_("-r requires exactly one PROJECT_FILE"))
493
482
    elif options.preview:
494
483
        if len(args) != 1:
495
 
            parser.error("-p requires exactly one PROJECT_FILE")
 
484
            parser.error(_("-p requires exactly one PROJECT_FILE"))
496
485
    else:
497
486
        if len(args) > 1:
498
 
            parser.error("Cannot open more than one PROJECT_FILE")
 
487
            parser.error(_("Cannot open more than one PROJECT_FILE"))
499
488
 
500
489
    return options, args
501
490