~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/distroseries.py

[r=benji][bug=817408] Use a new DistroSeriesDifferences vocabulary in
        place of the hand-crafted one in IDifferencesFormSchema.

Show diffs side-by-side

added added

removed removed

Lines of Context:
792
792
 
793
793
    selected_differences = List(
794
794
        title=_('Selected differences'),
795
 
        value_type=Choice(vocabulary=SimpleVocabulary([])),
 
795
        value_type=Choice(vocabulary="DistroSeriesDifferences"),
796
796
        description=_("Select the differences for syncing."),
797
797
        required=True)
798
798
 
859
859
        self.form_fields = (
860
860
            self.setupPackageFilterRadio() +
861
861
            self.form_fields)
862
 
        check_permission('launchpad.Edit', self.context)
863
 
        terms = [
864
 
            SimpleTerm(diff, diff.id)
865
 
                    for diff in self.cached_differences.batch]
866
 
        diffs_vocabulary = SimpleVocabulary(terms)
867
 
        # XXX: GavinPanella 2011-07-13 bug=809985: Good thing the app servers
868
 
        # are running single threaded...
869
 
        choice = self.form_fields['selected_differences'].field.value_type
870
 
        choice.vocabulary = diffs_vocabulary
871
862
 
872
863
    def _sync_sources(self, action, data):
873
864
        """Synchronise packages from the parent series to this one."""