예제 #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()
예제 #2
0
파일: main.py 프로젝트: Tayyib/uludag
    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()
예제 #3
0
파일: main.py 프로젝트: pars-linux/uludag
    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()
예제 #4
0
파일: main.py 프로젝트: Tayyib/uludag
    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()
예제 #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()
예제 #6
0
파일: main.py 프로젝트: pars-linux/uludag
    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()