Project/Project.py

changeset 122
34a81cd4420b
parent 118
8be7b777742c
child 151
00c27aeede62
equal deleted inserted replaced
121:2ce3ab9417e6 122:34a81cd4420b
1841 QMessageBox.StandardButtons(\ 1841 QMessageBox.StandardButtons(\
1842 QMessageBox.Abort)) 1842 QMessageBox.Abort))
1843 return 1843 return
1844 1844
1845 if filetype == 'OTHERS': 1845 if filetype == 'OTHERS':
1846 self.__addToOthers(source) 1846 self.addToOthers(source)
1847 return 1847 return
1848 1848
1849 if source == '': 1849 if source == '':
1850 QMessageBox.critical(None, 1850 QMessageBox.critical(None,
1851 self.trUtf8("Add directory"), 1851 self.trUtf8("Add directory"),
1857 if recursive: 1857 if recursive:
1858 self.__addRecursiveDirectory(filetype, source, target) 1858 self.__addRecursiveDirectory(filetype, source, target)
1859 else: 1859 else:
1860 self.__addSingleDirectory(filetype, source, target) 1860 self.__addSingleDirectory(filetype, source, target)
1861 1861
1862 def __addToOthers(self, fn): 1862 def addToOthers(self, fn):
1863 """ 1863 """
1864 Private method to add file/directory to the OTHERS project data. 1864 Public method to add a file/directory to the OTHERS project data.
1865 1865
1866 @param fn filename or directoryname to add 1866 @param fn file name or directory name to add (string)
1867 """ 1867 """
1868 if fn: 1868 if fn:
1869 # if it is below the project directory, make it relative to that 1869 # if it is below the project directory, make it relative to that
1870 fn = fn.replace(self.ppath + os.sep, '') 1870 fn = fn.replace(self.ppath + os.sep, '')
1871 1871

eric ide

mercurial