1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +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

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

View File

@@ -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];

View File

@@ -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."
#define DEMO_MAX_ACTION_COUNT 10

View File

@@ -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;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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;
}

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
#---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

View File

@@ -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 = "<group>"; };
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; };
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>"; };
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>"; };
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>"; };
@@ -147,7 +144,6 @@
children = (
CE381C9509914ACE003581CE /* AppDelegate.h */,
CE381C9409914ACE003581CE /* AppDelegate.m */,
CE848A1809DD85810004CB44 /* Consts.h */,
CECA899A09DB132E00A3D774 /* DetailsPanel.h */,
CECA899B09DB132E00A3D774 /* DetailsPanel.m */,
CE68EE6509ABC48000971085 /* DirectoryPanel.h */,