diff --git a/.hgignore b/.hgignore index 797ee69c..2de004e5 100644 --- a/.hgignore +++ b/.hgignore @@ -3,6 +3,9 @@ syntax: glob .DS_Store *.pyc *.so +*.mode1v3 +*.pbxuser +*.tm_build_errors conf.yaml build core_pe/modules/block/block.c diff --git a/cocoa/base/AppDelegate.h b/cocoa/base/AppDelegate.h index 0cf42f29..db18f519 100644 --- a/cocoa/base/AppDelegate.h +++ b/cocoa/base/AppDelegate.h @@ -19,7 +19,6 @@ http://www.hardcoded.net/licenses/hs_license IBOutlet NSMenuItem *unlockMenuItem; IBOutlet ResultWindowBase *result; - NSString *_appName; DetailsPanelBase *_detailsPanel; } - (IBAction)unlockApp:(id)sender; diff --git a/cocoa/base/AppDelegate.m b/cocoa/base/AppDelegate.m index 7ef1462c..b9771b48 100644 --- a/cocoa/base/AppDelegate.m +++ b/cocoa/base/AppDelegate.m @@ -13,21 +13,14 @@ http://www.hardcoded.net/licenses/hs_license #import "Consts.h" @implementation AppDelegateBase -- (id)init -{ - self = [super init]; - _appName = @""; - return self; -} - - (IBAction)unlockApp:(id)sender { if ([[self py] isRegistered]) return; - RegistrationInterface *ri = [[RegistrationInterface alloc] initWithApp:[self py] name:_appName limitDescription:LIMIT_DESC]; + RegistrationInterface *ri = [[RegistrationInterface alloc] initWithApp:[self py]]; if ([ri enterCode] == NSOKButton) { - NSString *menuTitle = [NSString stringWithFormat:@"Thanks for buying %@!",_appName]; + NSString *menuTitle = [NSString stringWithFormat:@"Thanks for buying %@!",[py appName]]; [unlockMenuItem setTitle:menuTitle]; } [ri release]; @@ -50,8 +43,8 @@ http://www.hardcoded.net/licenses/hs_license else [result resetColumnsToDefault:nil]; //Reg stuff - if ([RegistrationInterface showNagWithApp:[self py] name:_appName limitDescription:LIMIT_DESC]) - [unlockMenuItem setTitle:[NSString stringWithFormat:@"Thanks for buying %@!",_appName]]; + if ([RegistrationInterface showNagWithApp:[self py]]) + [unlockMenuItem setTitle:[NSString stringWithFormat:@"Thanks for buying %@!",[py appName]]]; //Restore results [py loadIgnoreList]; [py loadResults]; diff --git a/cocoa/base/Consts.h b/cocoa/base/Consts.h index 9302a452..c9f82650 100644 --- a/cocoa/base/Consts.h +++ b/cocoa/base/Consts.h @@ -24,5 +24,4 @@ http://www.hardcoded.net/licenses/hs_license #define jobMove @"job_move" #define jobDelete @"job_delete" -#define DEMO_MAX_ACTION_COUNT 10 -#define LIMIT_DESC @"In the demo version, only 10 duplicates per session can be sent to Trash, moved or copied." \ No newline at end of file +#define DEMO_MAX_ACTION_COUNT 10 \ No newline at end of file diff --git a/cocoa/me/AppDelegate.m b/cocoa/me/AppDelegate.m index 8d3f6c0d..f721dc98 100644 --- a/cocoa/me/AppDelegate.m +++ b/cocoa/me/AppDelegate.m @@ -52,7 +52,6 @@ http://www.hardcoded.net/licenses/hs_license VTIsIntIn *vtScanTypeIsTag = [[[VTIsIntIn alloc] initWithValues:[NSIndexSet indexSetWithIndex:3] reverse:NO] autorelease]; [NSValueTransformer setValueTransformer:vtScanTypeIsTag forName:@"vtScanTypeIsTag"]; _directoryPanel = nil; - _appName = APPNAME; return self; } diff --git a/cocoa/me/Consts.h b/cocoa/me/Consts.h index b92eebfc..55722c30 100644 --- a/cocoa/me/Consts.h +++ b/cocoa/me/Consts.h @@ -8,6 +8,4 @@ http://www.hardcoded.net/licenses/hs_license #import "../base/Consts.h" -#define APPNAME @"dupeGuru ME" - #define jobScanDeadTracks @"jobScanDeadTracks" \ No newline at end of file diff --git a/cocoa/me/dg_cocoa.py b/cocoa/me/dg_cocoa.py index d4335d98..00ca67e6 100644 --- a/cocoa/me/dg_cocoa.py +++ b/cocoa/me/dg_cocoa.py @@ -225,6 +225,12 @@ class PyDupeGuru(PyApp): self.app.progress.job_cancelled = True #---Registration + def appName(self): + return "dupeGuru Music Edition" + + def demoLimitDescription(self): + return self.app.DEMO_LIMIT_DESC + @objc.signature('i@:') def isRegistered(self): return self.app.registered diff --git a/cocoa/pe/AppDelegate.m b/cocoa/pe/AppDelegate.m index 70f03659..ea2d250c 100644 --- a/cocoa/pe/AppDelegate.m +++ b/cocoa/pe/AppDelegate.m @@ -37,7 +37,6 @@ http://www.hardcoded.net/licenses/hs_license { self = [super init]; _directoryPanel = nil; - _appName = APPNAME; return self; } diff --git a/cocoa/pe/Consts.h b/cocoa/pe/Consts.h index a052466e..8fc4fa42 100644 --- a/cocoa/pe/Consts.h +++ b/cocoa/pe/Consts.h @@ -8,5 +8,4 @@ http://www.hardcoded.net/licenses/hs_license #import "../base/Consts.h" -#define APPNAME @"dupeGuru PE" #define ImageLoadedNotification @"ImageLoadedNotification" diff --git a/cocoa/pe/dg_cocoa.py b/cocoa/pe/dg_cocoa.py index d0c9583e..49634f13 100644 --- a/cocoa/pe/dg_cocoa.py +++ b/cocoa/pe/dg_cocoa.py @@ -199,6 +199,12 @@ class PyDupeGuru(PyApp): self.app.progress.job_cancelled = True #---Registration + def appName(self): + return "dupeGuru Picture Edition" + + def demoLimitDescription(self): + return self.app.DEMO_LIMIT_DESC + @objc.signature('i@:') def isRegistered(self): return self.app.registered diff --git a/cocoa/se/AppDelegate.m b/cocoa/se/AppDelegate.m index ba30b8dc..8fb28520 100644 --- a/cocoa/se/AppDelegate.m +++ b/cocoa/se/AppDelegate.m @@ -43,7 +43,6 @@ http://www.hardcoded.net/licenses/hs_license VTIsIntIn *vt = [[[VTIsIntIn alloc] initWithValues:[NSIndexSet indexSetWithIndex:1] reverse:YES] autorelease]; [NSValueTransformer setValueTransformer:vt forName:@"vtScanTypeIsNotContent"]; _directoryPanel = nil; - _appName = APPNAME; return self; } diff --git a/cocoa/se/Consts.h b/cocoa/se/Consts.h deleted file mode 100644 index 72656407..00000000 --- a/cocoa/se/Consts.h +++ /dev/null @@ -1,11 +0,0 @@ -/* -Copyright 2010 Hardcoded Software (http://www.hardcoded.net) - -This software is licensed under the "HS" License as described in the "LICENSE" file, -which should be included with this package. The terms are also available at -http://www.hardcoded.net/licenses/hs_license -*/ - -#import "../base/Consts.h" - -#define APPNAME @"dupeGuru" \ No newline at end of file diff --git a/cocoa/se/dg_cocoa.py b/cocoa/se/dg_cocoa.py index 837aa4a2..ba4dd8e2 100644 --- a/cocoa/se/dg_cocoa.py +++ b/cocoa/se/dg_cocoa.py @@ -207,6 +207,12 @@ class PyDupeGuru(PyApp): self.app.progress.job_cancelled = True #---Registration + def appName(self): + return "dupeGuru" + + def demoLimitDescription(self): + return self.app.DEMO_LIMIT_DESC + @objc.signature('i@:') def isRegistered(self): return self.app.registered diff --git a/cocoa/se/dupeguru.xcodeproj/project.pbxproj b/cocoa/se/dupeguru.xcodeproj/project.pbxproj index c01076af..f45eea3e 100644 --- a/cocoa/se/dupeguru.xcodeproj/project.pbxproj +++ b/cocoa/se/dupeguru.xcodeproj/project.pbxproj @@ -18,7 +18,6 @@ CE4557B40AE3BC50005A9546 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE45579A0AE3BC2B005A9546 /* Sparkle.framework */; }; CE68EE6809ABC48000971085 /* DirectoryPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE68EE6609ABC48000971085 /* DirectoryPanel.m */; }; CE6E0DFE1054E9EF008D9390 /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = CE6E0DFD1054E9EF008D9390 /* dsa_pub.pem */; }; - CE848A1909DD85810004CB44 /* Consts.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE848A1809DD85810004CB44 /* Consts.h */; }; CEAC6811109B0B7E00B43C85 /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = CEAC6810109B0B7E00B43C85 /* Preferences.xib */; }; CECA899C09DB132E00A3D774 /* DetailsPanel.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CECA899A09DB132E00A3D774 /* DetailsPanel.h */; }; CECA899D09DB132E00A3D774 /* DetailsPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CECA899B09DB132E00A3D774 /* DetailsPanel.m */; }; @@ -56,7 +55,6 @@ files = ( CE4557B40AE3BC50005A9546 /* Sparkle.framework in CopyFiles */, CECA899C09DB132E00A3D774 /* DetailsPanel.h in CopyFiles */, - CE848A1909DD85810004CB44 /* Consts.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -75,13 +73,12 @@ CE381C9509914ACE003581CE /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = SOURCE_ROOT; }; CE381C9A09914ADF003581CE /* ResultWindow.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = ResultWindow.m; sourceTree = SOURCE_ROOT; }; CE381C9B09914ADF003581CE /* ResultWindow.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = ResultWindow.h; sourceTree = SOURCE_ROOT; }; - CE381CF509915304003581CE /* dg_cocoa.plugin */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dg_cocoa.plugin; path = dg_cocoa.plugin; sourceTree = SOURCE_ROOT; }; + CE381CF509915304003581CE /* dg_cocoa.plugin */ = {isa = PBXFileReference; lastKnownFileType = folder; path = dg_cocoa.plugin; sourceTree = SOURCE_ROOT; }; CE3A46F9109B212E002ABFD5 /* MainMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainMenu.xib; path = ../base/xib/MainMenu.xib; sourceTree = ""; }; CE45579A0AE3BC2B005A9546 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = /Library/Frameworks/Sparkle.framework; sourceTree = ""; }; CE68EE6509ABC48000971085 /* DirectoryPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DirectoryPanel.h; sourceTree = SOURCE_ROOT; }; CE68EE6609ABC48000971085 /* DirectoryPanel.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = DirectoryPanel.m; sourceTree = SOURCE_ROOT; }; CE6E0DFD1054E9EF008D9390 /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = dsa_pub.pem; path = ../base/dsa_pub.pem; sourceTree = ""; }; - CE848A1809DD85810004CB44 /* Consts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Consts.h; sourceTree = ""; }; CEAC6810109B0B7E00B43C85 /* Preferences.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Preferences.xib; path = xib/Preferences.xib; sourceTree = ""; }; CECA899A09DB132E00A3D774 /* DetailsPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DetailsPanel.h; sourceTree = ""; }; CECA899B09DB132E00A3D774 /* DetailsPanel.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = DetailsPanel.m; sourceTree = ""; }; @@ -147,7 +144,6 @@ children = ( CE381C9509914ACE003581CE /* AppDelegate.h */, CE381C9409914ACE003581CE /* AppDelegate.m */, - CE848A1809DD85810004CB44 /* Consts.h */, CECA899A09DB132E00A3D774 /* DetailsPanel.h */, CECA899B09DB132E00A3D774 /* DetailsPanel.m */, CE68EE6509ABC48000971085 /* DirectoryPanel.h */, diff --git a/core/app.py b/core/app.py index 11b329e8..5e1e3f1b 100644 --- a/core/app.py +++ b/core/app.py @@ -34,6 +34,8 @@ class AllFilesAreRefError(Exception): pass class DupeGuru(RegistrableApplication): + DEMO_LIMIT_DESC = "In the demo version, only 10 duplicates per session can be sent to the recycle bin, moved or copied." + def __init__(self, data_module, appdata, appid): RegistrableApplication.__init__(self, appid) self.appdata = appdata diff --git a/qt/base/app.py b/qt/base/app.py index ae3c99cb..8c4b632e 100644 --- a/qt/base/app.py +++ b/qt/base/app.py @@ -52,7 +52,6 @@ class DupeGuru(DupeGuruBase, QObject): LOGO_NAME = '' NAME = '' DELTA_COLUMNS = frozenset() - DEMO_LIMIT_DESC = "In the demo version, only 10 duplicates per session can be sent to the recycle bin, moved or copied." def __init__(self, data_module, appid): appdata = unicode(QDesktopServices.storageLocation(QDesktopServices.DataLocation))