summaryrefslogtreecommitdiffstats
path: root/macosx/InstantHandBrake/Device.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2008-01-30 12:28:55 +0000
committerritsuka <[email protected]>2008-01-30 12:28:55 +0000
commit70de68d465248336a1d68e5932ac00f60882a612 (patch)
tree0207bd6c451bc97780597226292420e654af8db7 /macosx/InstantHandBrake/Device.m
parent0ec912f5fd9008e4643bf375db3088f29c389304 (diff)
IHB: - Various bugfix
- IHB can loads .ihbdevice presets from a directory inside the application bundle, and from ~/Application Support/Instant Handbrake - A .ihbdevice file can contain multiple presets, but IHB only reads the first at the moment. I am not sure how to handle multiple presets yet. - The only way to create an .ihbprofile file is to edit DeviceController.m , another thing I still need to think about. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1239 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/InstantHandBrake/Device.m')
-rw-r--r--macosx/InstantHandBrake/Device.m18
1 files changed, 16 insertions, 2 deletions
diff --git a/macosx/InstantHandBrake/Device.m b/macosx/InstantHandBrake/Device.m
index 643f9399d..fec63de18 100644
--- a/macosx/InstantHandBrake/Device.m
+++ b/macosx/InstantHandBrake/Device.m
@@ -4,7 +4,7 @@
//
// Created by Damiano Galassi on 15/01/08.
// This file is part of the HandBrake source code.
-// Homepage: <http://handbrake.m0k.org/>.
+// Homepage: <http://handbrake.fr/>.
// It may be used under the terms of the GNU General Public License.
//
//
@@ -30,6 +30,20 @@
[super dealloc];
}
+- (id) initWithCoder:(NSCoder *) coder
+{
+ deviceName = [[coder decodeObjectForKey:@"DeviceName"] retain];
+ presetsArray = [[coder decodeObjectForKey:@"Presets"] retain];
+
+ return self;
+}
+
+- (void) encodeWithCoder:(NSCoder *)encoder
+{
+ [encoder encodeObject: deviceName forKey:@"DeviceName"];
+ [encoder encodeObject: presetsArray forKey:@"Presets"];
+}
+
- (void) addPreset: (Preset *) preset
{
[presetsArray addObject:preset];
@@ -43,7 +57,7 @@
- (Preset *) firstPreset
{
- return [presetsArray objectAtIndex:0]; ;
+ return [presetsArray objectAtIndex:0];
}
@end