diff options
author | ritsuka <[email protected]> | 2014-08-09 17:10:45 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-08-09 17:10:45 +0000 |
commit | 666e210efe202dc13273dd32de1b1901e194e4ce (patch) | |
tree | 95e3c1886f10552e023a517aee569866df806219 /macosx/HBPreset.h | |
parent | d4e3de96a998ba90f61d31045d5c725428cd030d (diff) |
MacGui: added the list of the presets at the bottom of the preset menu and a “New Folder” menu item. Removed the “delete built-in presets” item because it takes just two clicks to remove them manually.
Refactored part of HBPreset to a separate HBTreeNode class.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6278 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreset.h')
-rw-r--r-- | macosx/HBPreset.h | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/macosx/HBPreset.h b/macosx/HBPreset.h index 1c2fe22d3..73f4321c4 100644 --- a/macosx/HBPreset.h +++ b/macosx/HBPreset.h @@ -1,19 +1,19 @@ -// -// HBBaseNode.h -// PresetsView -// -// Created by Damiano Galassi on 14/07/14. -// Copyright (c) 2014 Damiano Galassi. All rights reserved. -// +/* HBPreset.h $ + + This file is part of the HandBrake source code. + Homepage: <http://handbrake.fr/>. + It may be used under the terms of the GNU General Public License. */ #import <Cocoa/Cocoa.h> +#import "HBTreeNode.h" /** * HBPreset - * Stores a preset dictionary - * and implements the requited methods to work with a NSTreeController. + * Stores a preset dictionary. + * + * An instance of HBPreset can be an actual preset or a folder. */ -@interface HBPreset : NSObject <NSCopying> +@interface HBPreset : HBTreeNode <NSCopying> - (instancetype)initWithName:(NSString *)title content:(NSDictionary *)content builtIn:(BOOL)builtIn; - (instancetype)initWithFolderName:(NSString *)title builtIn:(BOOL)builtIn; @@ -25,15 +25,4 @@ @property (nonatomic, readwrite) BOOL isDefault; @property (nonatomic, readonly) BOOL isBuiltIn; -// NSTreeController required properties -@property (nonatomic, retain) NSMutableArray *children; -@property (nonatomic) BOOL isLeaf; - -/** - * Executes a given block using each object in the tree, starting with the root object and continuing through the tree to the last object. - * - * @param block The block to apply to elements in the tree. - */ -- (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSIndexPath *idx, BOOL *stop))block; - @end |