dgpe cocoa: adjusted to the detail panel toggling change.

--HG--
extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40240
This commit is contained in:
hsoft 2009-11-02 15:22:30 +00:00
parent 13dc9ff76d
commit 5c8d90a57c
4 changed files with 8 additions and 24 deletions

View File

@ -9,16 +9,13 @@ http://www.hardcoded.net/licenses/hs_license
#import <Cocoa/Cocoa.h>
#import "dgbase/AppDelegate.h"
#import "DirectoryPanel.h"
#import "DetailsPanel.h"
#import "PyDupeGuru.h"
@interface AppDelegate : AppDelegateBase
{
DetailsPanel *_detailsPanel;
DirectoryPanel *_directoryPanel;
}
- (IBAction)openWebsite:(id)sender;
- (IBAction)toggleDetailsPanel:(id)sender;
- (IBAction)toggleDirectories:(id)sender;
- (DirectoryPanel *)directoryPanel;

View File

@ -12,6 +12,7 @@ http://www.hardcoded.net/licenses/hs_license
#import "Utils.h"
#import "ValueTransformers.h"
#import "Consts.h"
#import "DetailsPanel.h"
@implementation AppDelegate
+ (void)initialize
@ -36,29 +37,22 @@ http://www.hardcoded.net/licenses/hs_license
{
self = [super init];
_directoryPanel = nil;
_detailsPanel = nil;
_appName = APPNAME;
return self;
}
- (DetailsPanelBase *)detailsPanel
{
if (!_detailsPanel)
_detailsPanel = [[DetailsPanel alloc] initWithPy:py];
return _detailsPanel;
}
- (IBAction)openWebsite:(id)sender
{
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.hardcoded.net/dupeguru_pe"]];
}
- (IBAction)toggleDetailsPanel:(id)sender
{
if (!_detailsPanel)
_detailsPanel = [[DetailsPanel alloc] initWithPy:py];
if ([[_detailsPanel window] isVisible])
[[_detailsPanel window] close];
else
{
[[_detailsPanel window] orderFront:nil];
[_detailsPanel refresh];
}
}
- (IBAction)toggleDirectories:(id)sender
{
[[self directoryPanel] toggleVisible:sender];

View File

@ -33,6 +33,5 @@ http://www.hardcoded.net/licenses/hs_license
- (IBAction)revealSelected:(id)sender;
- (IBAction)startDuplicateScan:(id)sender;
- (IBAction)toggleDelta:(id)sender;
- (IBAction)toggleDetailsPanel:(id)sender;
- (IBAction)toggleDirectories:(id)sender;
@end

View File

@ -205,12 +205,6 @@ http://www.hardcoded.net/licenses/hs_license
[self changeDelta:sender];
}
- (IBAction)toggleDetailsPanel:(id)sender
{
[(AppDelegate *)app toggleDetailsPanel:sender];
}
- (IBAction)toggleDirectories:(id)sender
{
[(AppDelegate *)app toggleDirectories:sender];