mirror of
https://github.com/arsenetar/dupeguru.git
synced 2024-11-19 13:29:03 +00:00
Mass Rename: AddDirectory() --> add_directory()
--HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4014
This commit is contained in:
parent
a1ee45217b
commit
a600ce15d3
@ -55,7 +55,7 @@ class DirectoriesDialog(QDialog, Ui_DirectoriesDialog):
|
||||
dirpath = unicode(QFileDialog.getExistingDirectory(self, title, '', flags))
|
||||
if not dirpath:
|
||||
return
|
||||
self.app.AddDirectory(dirpath)
|
||||
self.app.add_directory(dirpath)
|
||||
self.directoriesModel.reset()
|
||||
|
||||
def directoriesChanged(self):
|
||||
|
@ -21,7 +21,7 @@ class PyDupeGuru(PyApp):
|
||||
|
||||
#---Directories
|
||||
def addDirectory_(self,directory):
|
||||
return self.app.AddDirectory(directory)
|
||||
return self.app.add_directory(directory)
|
||||
|
||||
def removeDirectory_(self,index):
|
||||
self.app.RemoveDirectory(index)
|
||||
|
@ -20,7 +20,7 @@ class PyDupeGuru(PyApp):
|
||||
|
||||
#---Directories
|
||||
def addDirectory_(self,directory):
|
||||
return self.app.AddDirectory(directory)
|
||||
return self.app.add_directory(directory)
|
||||
|
||||
def removeDirectory_(self,index):
|
||||
self.app.RemoveDirectory(index)
|
||||
|
@ -104,7 +104,7 @@ class DupeGuru(RegistrableApplication):
|
||||
# func(j)
|
||||
raise NotImplementedError()
|
||||
|
||||
def AddDirectory(self, d):
|
||||
def add_directory(self, d):
|
||||
try:
|
||||
self.directories.add_path(Path(d))
|
||||
return 0
|
||||
|
@ -206,17 +206,17 @@ class TCDupeGuru(TestCase):
|
||||
|
||||
def test_addDirectory_simple(self):
|
||||
app = self.app
|
||||
self.assertEqual(0,app.AddDirectory(self.datadirpath()))
|
||||
self.assertEqual(0,app.add_directory(self.datadirpath()))
|
||||
self.assertEqual(1,len(app.directories))
|
||||
|
||||
def test_addDirectory_already_there(self):
|
||||
app = self.app
|
||||
self.assertEqual(0,app.AddDirectory(self.datadirpath()))
|
||||
self.assertEqual(1,app.AddDirectory(self.datadirpath()))
|
||||
self.assertEqual(0,app.add_directory(self.datadirpath()))
|
||||
self.assertEqual(1,app.add_directory(self.datadirpath()))
|
||||
|
||||
def test_addDirectory_does_not_exist(self):
|
||||
app = self.app
|
||||
self.assertEqual(2,app.AddDirectory('/does_not_exist'))
|
||||
self.assertEqual(2,app.add_directory('/does_not_exist'))
|
||||
|
||||
def test_ignore(self):
|
||||
app = self.app
|
||||
|
@ -186,8 +186,8 @@ class DupeGuruPE(app_cocoa.DupeGuru):
|
||||
if result is not None:
|
||||
return result
|
||||
|
||||
def AddDirectory(self, d):
|
||||
result = app_cocoa.DupeGuru.AddDirectory(self, d)
|
||||
def add_directory(self, d):
|
||||
result = app_cocoa.DupeGuru.add_directory(self, d)
|
||||
if (result == 0) and (d == 'iPhoto Library'):
|
||||
[iphotolib] = [dir for dir in self.directories if dir.path == d]
|
||||
iphotolib.update()
|
||||
|
@ -20,7 +20,7 @@ class PyDupeGuru(PyApp):
|
||||
|
||||
#---Directories
|
||||
def addDirectory_(self,directory):
|
||||
return self.app.AddDirectory(directory)
|
||||
return self.app.add_directory(directory)
|
||||
|
||||
def removeDirectory_(self,index):
|
||||
self.app.RemoveDirectory(index)
|
||||
|
Loading…
Reference in New Issue
Block a user