Beispiel #1
0
    def slotModifyPackageCollection(self):
        index = self.listPackageCollection.currentRow()
        item = self.listPackageCollection.item(index)
        if not self.repo:
            self.initializeRepo()

        dialog = PackageCollectionDialog(self, self.repo, self.project, item.collection)
        if dialog.exec_():
            if not item.collection._id == dialog.collection._id:
                item.setText(dialog.collection.translations[self.project.default_language][0])
            item.collection = dialog.collection

        self.updateCollection()
Beispiel #2
0
    def slotAddPackageCollection(self):
        if not self.repo:
            self.initializeRepo()

        dialog = PackageCollectionDialog(self, self.repo)
        if dialog.exec_():
            item = PackageCollectionListItem(self.listPackageCollection, dialog.collection)
            self.project.package_collections.append(item.collection)

            if self.listPackageCollection.count() == 1:
                item.collection.setDefault("True")


        self.updateCollection()
Beispiel #3
0
    def slotModifyPackageCollection(self):
        index = self.listPackageCollection.currentRow()
        item = self.listPackageCollection.item(index)
        if not self.repo:
            self.initializeRepo()

        dialog = PackageCollectionDialog(self, self.repo, self.project,
                                         item.collection)
        if dialog.exec_():
            if not item.collection._id == dialog.collection._id:
                item.setText(dialog.collection.translations[
                    self.project.default_language][0])
            item.collection = dialog.collection

        self.updateCollection()
Beispiel #4
0
    def slotModifyPackageCollection(self):
        index = self.listPackageCollection.currentRow()
        item = self.listPackageCollection.item(index)
        #print "self.repo:%s" % self.repo.base_uri
        #print "item.collection"
        if not self.repo:
            self.initializeRepo()

        dialog = PackageCollectionDialog(self, self.repo, item.collection)
        if dialog.exec_():
            if not item.collection.uniqueTag.__eq__(dialog.collection.uniqueTag):
                print "item.setText"
                item.setText(dialog.collection.title)
            item.collection = dialog.collection

        self.updateCollection()
Beispiel #5
0
    def slotAddPackageCollection(self):
        if not self.repo:
            self.initializeRepo()

        if not self.project.selected_languages:
            QMessageBox.warning(self, self.title, _("Installation Languages is not selected."))
            return

        dialog = PackageCollectionDialog(self, self.repo, self.project)
        if dialog.exec_():
            item = PackageCollectionListItem(self.listPackageCollection, dialog.collection, self.project.default_language)
            self.project.package_collections.append(item.collection)

            if self.listPackageCollection.count() == 1:
                item.collection.default = "True"


        self.updateCollection()
Beispiel #6
0
    def slotAddPackageCollection(self):
        if not self.repo:
            self.initializeRepo()

        if not self.project.selected_languages:
            QMessageBox.warning(self, self.title,
                                _("Installation Languages is not selected."))

        dialog = PackageCollectionDialog(self, self.repo, self.project)
        if dialog.exec_():
            item = PackageCollectionListItem(self.listPackageCollection,
                                             dialog.collection,
                                             self.project.default_language)
            self.project.package_collections.append(item.collection)

            if self.listPackageCollection.count() == 1:
                item.collection.default = "True"

        self.updateCollection()