예제 #1
0
파일: tree.py 프로젝트: pyros2097/SabelIDE
 def removeProject(self,item):
     itemPath = item.getPath()
     self.closed.pop(self.projects.index(itemPath))
     config.setClosedProjects(self.closed)
     self.projects.remove(itemPath)
     self.projectItems.remove(item)
     config.setProject(self.projects)
     self.takeTopLevelItem(self.indexOfTopLevelItem(item))
예제 #2
0
파일: tree.py 프로젝트: pyros2097/SabelIDE
 def createProject(self,startDir):
     if(ospathexists(startDir)):
         if self.projects != None:
             if(startDir in self.projects):#will work even if list is empty
                 QMessageBox.about(self, "Already Open","Project Already Open\n"+startDir)
                 return False
         self.projects.append(startDir)
         self.addProject(startDir)
         config.setProject(self.projects)
         return True
         #print "adding"+startDir
     else:
         #This is important very very important otherwise it will crash
         if self.projects != None:
             if(startDir in self.projects):
                 self.projects.remove(startDir)
         config.setProject(self.projects)
         QMessageBox.about(self,"Can't Open Project","Project Does Not Exist %s"%startDir)
         return False