Beispiel #1
0
 def askCreateSubset(self, output, size):
     
     headerLabel = 'Are you sure you want to create a new set of %s with %s %s?'%(output, size, 'element' if size == 1 else 'elements')
     runname =  askString('Question','Run name:', self.win.getRoot(), 30, defaultValue='ProtUserSubSet', headerLabel=headerLabel)
     if runname:
         createFunc = getattr(self, 'save' + output)
         createFunc(runname)
Beispiel #2
0
 def renameProject(self, projName):
     newName = askString("Rename project %s" % projName, "Enter new name:", self.root)
     if not newName or newName == projName:
         return
     if self.manager.hasProject(newName):
         showError("Rename cancelled",
                   "Project name already exists: %s" % newName, self.root)
         return
     self.manager.renameProject(projName, newName)
     self.createProjectList(self.text)
Beispiel #3
0
    def _askCreateSubset(self, output, size):

        if self._selectionOverlap():
            self.win.showError("Classes could not overlap in the tree.")
            return

        s = '' if size == 1 else 's'
        headerLabel = 'Are you sure you want to create a new set of ' \
                      ' %s with %s element%s?' % (output, size, s)
        runname =  askString('Question','Run name:', self.win.getRoot(), 30,
                             defaultValue='ProtUserSubSet',
                             headerLabel=headerLabel)
        if runname:
            createFunc = getattr(self, 'save' + output)
            createFunc(runname)
    def _askCreateSubset(self, output, size):

        if self._selectionOverlap():
            self.win.showError("Classes could not overlap in the tree.")
            return

        s = '' if size == 1 else 's'
        headerLabel = 'Are you sure you want to create a new set of ' \
                      ' %s with %s element%s?' % (output, size, s)
        runname = askString('Question',
                            'Run name:',
                            self.win.getRoot(),
                            30,
                            defaultValue='ProtUserSubSet',
                            headerLabel=headerLabel)
        if runname:
            createFunc = getattr(self, 'save' + output)
            createFunc(runname)