From a600ce15d375103686d22be6c65b46c43e149406 Mon Sep 17 00:00:00 2001 From: hsoft Date: Sun, 7 Jun 2009 07:11:52 +0000 Subject: [PATCH] Mass Rename: AddDirectory() --> add_directory() --HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4014 --- base/qt/directories_dialog.py | 2 +- me/cocoa/py/dg_cocoa.py | 2 +- pe/cocoa/py/dg_cocoa.py | 2 +- py/app.py | 2 +- py/app_cocoa_test.py | 8 ++++---- py/app_pe_cocoa.py | 4 ++-- se/cocoa/py/dg_cocoa.py | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/base/qt/directories_dialog.py b/base/qt/directories_dialog.py index e2f3ddb3..9a559d45 100644 --- a/base/qt/directories_dialog.py +++ b/base/qt/directories_dialog.py @@ -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): diff --git a/me/cocoa/py/dg_cocoa.py b/me/cocoa/py/dg_cocoa.py index 53413c71..313b196b 100644 --- a/me/cocoa/py/dg_cocoa.py +++ b/me/cocoa/py/dg_cocoa.py @@ -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) diff --git a/pe/cocoa/py/dg_cocoa.py b/pe/cocoa/py/dg_cocoa.py index b3aadcb6..45a09cf3 100644 --- a/pe/cocoa/py/dg_cocoa.py +++ b/pe/cocoa/py/dg_cocoa.py @@ -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) diff --git a/py/app.py b/py/app.py index 99041c7a..f5d2d003 100644 --- a/py/app.py +++ b/py/app.py @@ -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 diff --git a/py/app_cocoa_test.py b/py/app_cocoa_test.py index ad8b937a..54d901b5 100644 --- a/py/app_cocoa_test.py +++ b/py/app_cocoa_test.py @@ -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 diff --git a/py/app_pe_cocoa.py b/py/app_pe_cocoa.py index 30745606..978b9d43 100644 --- a/py/app_pe_cocoa.py +++ b/py/app_pe_cocoa.py @@ -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() diff --git a/se/cocoa/py/dg_cocoa.py b/se/cocoa/py/dg_cocoa.py index 63a4df2c..2d465c94 100644 --- a/se/cocoa/py/dg_cocoa.py +++ b/se/cocoa/py/dg_cocoa.py @@ -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)