1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-03-10 05:34:36 +00:00

Removed APPNAME and LIMIT_DESC consts from cocoa.

This commit is contained in:
Virgil Dupras 2010-01-13 09:30:10 +01:00
parent 55f4df19a9
commit e6d4d44f15
16 changed files with 29 additions and 37 deletions

View File

@ -3,6 +3,9 @@ syntax: glob
.DS_Store .DS_Store
*.pyc *.pyc
*.so *.so
*.mode1v3
*.pbxuser
*.tm_build_errors
conf.yaml conf.yaml
build build
core_pe/modules/block/block.c core_pe/modules/block/block.c

View File

@ -19,7 +19,6 @@ http://www.hardcoded.net/licenses/hs_license
IBOutlet NSMenuItem *unlockMenuItem; IBOutlet NSMenuItem *unlockMenuItem;
IBOutlet ResultWindowBase *result; IBOutlet ResultWindowBase *result;
NSString *_appName;
DetailsPanelBase *_detailsPanel; DetailsPanelBase *_detailsPanel;
} }
- (IBAction)unlockApp:(id)sender; - (IBAction)unlockApp:(id)sender;

View File

@ -13,21 +13,14 @@ http://www.hardcoded.net/licenses/hs_license
#import "Consts.h" #import "Consts.h"
@implementation AppDelegateBase @implementation AppDelegateBase
- (id)init
{
self = [super init];
_appName = @"";
return self;
}
- (IBAction)unlockApp:(id)sender - (IBAction)unlockApp:(id)sender
{ {
if ([[self py] isRegistered]) if ([[self py] isRegistered])
return; return;
RegistrationInterface *ri = [[RegistrationInterface alloc] initWithApp:[self py] name:_appName limitDescription:LIMIT_DESC]; RegistrationInterface *ri = [[RegistrationInterface alloc] initWithApp:[self py]];
if ([ri enterCode] == NSOKButton) if ([ri enterCode] == NSOKButton)
{ {
NSString *menuTitle = [NSString stringWithFormat:@"Thanks for buying %@!",_appName]; NSString *menuTitle = [NSString stringWithFormat:@"Thanks for buying %@!",[py appName]];
[unlockMenuItem setTitle:menuTitle]; [unlockMenuItem setTitle:menuTitle];
} }
[ri release]; [ri release];
@ -50,8 +43,8 @@ http://www.hardcoded.net/licenses/hs_license
else else
[result resetColumnsToDefault:nil]; [result resetColumnsToDefault:nil];
//Reg stuff //Reg stuff
if ([RegistrationInterface showNagWithApp:[self py] name:_appName limitDescription:LIMIT_DESC]) if ([RegistrationInterface showNagWithApp:[self py]])
[unlockMenuItem setTitle:[NSString stringWithFormat:@"Thanks for buying %@!",_appName]]; [unlockMenuItem setTitle:[NSString stringWithFormat:@"Thanks for buying %@!",[py appName]]];
//Restore results //Restore results
[py loadIgnoreList]; [py loadIgnoreList];
[py loadResults]; [py loadResults];

View File

@ -25,4 +25,3 @@ http://www.hardcoded.net/licenses/hs_license
#define jobDelete @"job_delete" #define jobDelete @"job_delete"
#define DEMO_MAX_ACTION_COUNT 10 #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."

View File

@ -52,7 +52,6 @@ http://www.hardcoded.net/licenses/hs_license
VTIsIntIn *vtScanTypeIsTag = [[[VTIsIntIn alloc] initWithValues:[NSIndexSet indexSetWithIndex:3] reverse:NO] autorelease]; VTIsIntIn *vtScanTypeIsTag = [[[VTIsIntIn alloc] initWithValues:[NSIndexSet indexSetWithIndex:3] reverse:NO] autorelease];
[NSValueTransformer setValueTransformer:vtScanTypeIsTag forName:@"vtScanTypeIsTag"]; [NSValueTransformer setValueTransformer:vtScanTypeIsTag forName:@"vtScanTypeIsTag"];
_directoryPanel = nil; _directoryPanel = nil;
_appName = APPNAME;
return self; return self;
} }

View File

@ -8,6 +8,4 @@ http://www.hardcoded.net/licenses/hs_license
#import "../base/Consts.h" #import "../base/Consts.h"
#define APPNAME @"dupeGuru ME"
#define jobScanDeadTracks @"jobScanDeadTracks" #define jobScanDeadTracks @"jobScanDeadTracks"

View File

@ -225,6 +225,12 @@ class PyDupeGuru(PyApp):
self.app.progress.job_cancelled = True self.app.progress.job_cancelled = True
#---Registration #---Registration
def appName(self):
return "dupeGuru Music Edition"
def demoLimitDescription(self):
return self.app.DEMO_LIMIT_DESC
@objc.signature('i@:') @objc.signature('i@:')
def isRegistered(self): def isRegistered(self):
return self.app.registered return self.app.registered

View File

@ -37,7 +37,6 @@ http://www.hardcoded.net/licenses/hs_license
{ {
self = [super init]; self = [super init];
_directoryPanel = nil; _directoryPanel = nil;
_appName = APPNAME;
return self; return self;
} }

View File

@ -8,5 +8,4 @@ http://www.hardcoded.net/licenses/hs_license
#import "../base/Consts.h" #import "../base/Consts.h"
#define APPNAME @"dupeGuru PE"
#define ImageLoadedNotification @"ImageLoadedNotification" #define ImageLoadedNotification @"ImageLoadedNotification"

View File

@ -199,6 +199,12 @@ class PyDupeGuru(PyApp):
self.app.progress.job_cancelled = True self.app.progress.job_cancelled = True
#---Registration #---Registration
def appName(self):
return "dupeGuru Picture Edition"
def demoLimitDescription(self):
return self.app.DEMO_LIMIT_DESC
@objc.signature('i@:') @objc.signature('i@:')
def isRegistered(self): def isRegistered(self):
return self.app.registered return self.app.registered

View File

@ -43,7 +43,6 @@ http://www.hardcoded.net/licenses/hs_license
VTIsIntIn *vt = [[[VTIsIntIn alloc] initWithValues:[NSIndexSet indexSetWithIndex:1] reverse:YES] autorelease]; VTIsIntIn *vt = [[[VTIsIntIn alloc] initWithValues:[NSIndexSet indexSetWithIndex:1] reverse:YES] autorelease];
[NSValueTransformer setValueTransformer:vt forName:@"vtScanTypeIsNotContent"]; [NSValueTransformer setValueTransformer:vt forName:@"vtScanTypeIsNotContent"];
_directoryPanel = nil; _directoryPanel = nil;
_appName = APPNAME;
return self; return self;
} }

View File

@ -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"

View File

@ -207,6 +207,12 @@ class PyDupeGuru(PyApp):
self.app.progress.job_cancelled = True self.app.progress.job_cancelled = True
#---Registration #---Registration
def appName(self):
return "dupeGuru"
def demoLimitDescription(self):
return self.app.DEMO_LIMIT_DESC
@objc.signature('i@:') @objc.signature('i@:')
def isRegistered(self): def isRegistered(self):
return self.app.registered return self.app.registered

View File

@ -18,7 +18,6 @@
CE4557B40AE3BC50005A9546 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE45579A0AE3BC2B005A9546 /* Sparkle.framework */; }; CE4557B40AE3BC50005A9546 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE45579A0AE3BC2B005A9546 /* Sparkle.framework */; };
CE68EE6809ABC48000971085 /* DirectoryPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE68EE6609ABC48000971085 /* DirectoryPanel.m */; }; CE68EE6809ABC48000971085 /* DirectoryPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE68EE6609ABC48000971085 /* DirectoryPanel.m */; };
CE6E0DFE1054E9EF008D9390 /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = CE6E0DFD1054E9EF008D9390 /* dsa_pub.pem */; }; 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 */; }; CEAC6811109B0B7E00B43C85 /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = CEAC6810109B0B7E00B43C85 /* Preferences.xib */; };
CECA899C09DB132E00A3D774 /* DetailsPanel.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CECA899A09DB132E00A3D774 /* DetailsPanel.h */; }; CECA899C09DB132E00A3D774 /* DetailsPanel.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CECA899A09DB132E00A3D774 /* DetailsPanel.h */; };
CECA899D09DB132E00A3D774 /* DetailsPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CECA899B09DB132E00A3D774 /* DetailsPanel.m */; }; CECA899D09DB132E00A3D774 /* DetailsPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CECA899B09DB132E00A3D774 /* DetailsPanel.m */; };
@ -56,7 +55,6 @@
files = ( files = (
CE4557B40AE3BC50005A9546 /* Sparkle.framework in CopyFiles */, CE4557B40AE3BC50005A9546 /* Sparkle.framework in CopyFiles */,
CECA899C09DB132E00A3D774 /* DetailsPanel.h in CopyFiles */, CECA899C09DB132E00A3D774 /* DetailsPanel.h in CopyFiles */,
CE848A1909DD85810004CB44 /* Consts.h in CopyFiles */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -75,13 +73,12 @@
CE381C9509914ACE003581CE /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = SOURCE_ROOT; }; 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; }; 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; }; 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 = "<group>"; }; CE3A46F9109B212E002ABFD5 /* MainMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainMenu.xib; path = ../base/xib/MainMenu.xib; sourceTree = "<group>"; };
CE45579A0AE3BC2B005A9546 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = /Library/Frameworks/Sparkle.framework; sourceTree = "<absolute>"; }; CE45579A0AE3BC2B005A9546 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = /Library/Frameworks/Sparkle.framework; sourceTree = "<absolute>"; };
CE68EE6509ABC48000971085 /* DirectoryPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DirectoryPanel.h; sourceTree = SOURCE_ROOT; }; 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; }; 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 = "<group>"; }; CE6E0DFD1054E9EF008D9390 /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = dsa_pub.pem; path = ../base/dsa_pub.pem; sourceTree = "<group>"; };
CE848A1809DD85810004CB44 /* Consts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Consts.h; sourceTree = "<group>"; };
CEAC6810109B0B7E00B43C85 /* Preferences.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Preferences.xib; path = xib/Preferences.xib; sourceTree = "<group>"; }; CEAC6810109B0B7E00B43C85 /* Preferences.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Preferences.xib; path = xib/Preferences.xib; sourceTree = "<group>"; };
CECA899A09DB132E00A3D774 /* DetailsPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DetailsPanel.h; sourceTree = "<group>"; }; CECA899A09DB132E00A3D774 /* DetailsPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DetailsPanel.h; sourceTree = "<group>"; };
CECA899B09DB132E00A3D774 /* DetailsPanel.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = DetailsPanel.m; sourceTree = "<group>"; }; CECA899B09DB132E00A3D774 /* DetailsPanel.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = DetailsPanel.m; sourceTree = "<group>"; };
@ -147,7 +144,6 @@
children = ( children = (
CE381C9509914ACE003581CE /* AppDelegate.h */, CE381C9509914ACE003581CE /* AppDelegate.h */,
CE381C9409914ACE003581CE /* AppDelegate.m */, CE381C9409914ACE003581CE /* AppDelegate.m */,
CE848A1809DD85810004CB44 /* Consts.h */,
CECA899A09DB132E00A3D774 /* DetailsPanel.h */, CECA899A09DB132E00A3D774 /* DetailsPanel.h */,
CECA899B09DB132E00A3D774 /* DetailsPanel.m */, CECA899B09DB132E00A3D774 /* DetailsPanel.m */,
CE68EE6509ABC48000971085 /* DirectoryPanel.h */, CE68EE6509ABC48000971085 /* DirectoryPanel.h */,

View File

@ -34,6 +34,8 @@ class AllFilesAreRefError(Exception):
pass pass
class DupeGuru(RegistrableApplication): 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): def __init__(self, data_module, appdata, appid):
RegistrableApplication.__init__(self, appid) RegistrableApplication.__init__(self, appid)
self.appdata = appdata self.appdata = appdata

View File

@ -52,7 +52,6 @@ class DupeGuru(DupeGuruBase, QObject):
LOGO_NAME = '<replace this>' LOGO_NAME = '<replace this>'
NAME = '<replace this>' NAME = '<replace this>'
DELTA_COLUMNS = frozenset() 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): def __init__(self, data_module, appid):
appdata = unicode(QDesktopServices.storageLocation(QDesktopServices.DataLocation)) appdata = unicode(QDesktopServices.storageLocation(QDesktopServices.DataLocation))