~ubuntu-branches/ubuntu/karmic/software-properties/karmic

« back to all changes in this revision

Viewing changes to software-properties-gtk

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-06-08 18:28:24 UTC
  • Revision ID: james.westby@ubuntu.com-20090608182824-208w3y2udpr3kjgn
Tags: 0.73
* Support adding PPA keys automatically (thanks to
  Celso)
* support shorthand syntax for PPAs (ppa:owner or
  ppa:owner/ppa_name) when clicking on "add"
* support new commandline option "--enable-ppa name"

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
  parser.add_option("--open-tab", "",
71
71
                    action="store", type="string", default=None,
72
72
                    help="Open specific tab number on startup")
73
 
                   
 
73
  parser.add_option("--enable-ppa", "",
 
74
                    action="store", type="string", default=None,
 
75
                    help="Enable PPA with the given name")
74
76
  gtk.init_check()
75
77
  
76
78
  (options, args) = parser.parse_args()
94
96
  file = None
95
97
  if len(args) > 0:
96
98
    file = args[0]
97
 
  if options.enable_component:
 
99
  if options.enable_ppa:
 
100
    app = SoftwarePropertiesGtk(datadir=data_dir, options=options, file=file)
 
101
    app.add_source_from_line("ppa:%s" % options.enable_ppa)
 
102
    app.sourceslist.save()
 
103
  elif options.enable_component:
98
104
    sourceslist = SourcesList()
99
105
    distro = aptsources.distro.get_distro()
100
106
    distro.get_sources(sourceslist)