summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.mm27
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj4
2 files changed, 27 insertions, 4 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index fb8d0ad8d..e811797b2 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -44,6 +44,7 @@ static NSString* PauseEncodingIdentifier = @"Pause Encoding Item I
static NSString* ShowQueueIdentifier = @"Show Queue Item Identifier";
static NSString* AddToQueueIdentifier = @"Add to Queue Item Identifier";
static NSString* DebugOutputIdentifier = @"Debug Output Item Identifier";
+static NSString* ChooseSourceIdentifier = @"Choose Source Item Identifier";
/*******************************
* HBController implementation *
@@ -400,7 +401,22 @@ static NSString* DebugOutputIdentifier = @"Debug Output Item Identifier"
// Tell the item what message to send when it is clicked
[toolbarItem setTarget: self];
[toolbarItem setAction: @selector(showDebugOutputPanel:)];
-
+
+ } else if ([itemIdent isEqual: ChooseSourceIdentifier]) {
+ toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
+
+ // Set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel: @"Source"];
+ [toolbarItem setPaletteLabel: @"Source"];
+
+ // Set up a reasonable tooltip, and image Note, these aren't localized, but you will likely want to localize many of the item's properties
+ [toolbarItem setToolTip: @"Choose Video Source"];
+ [toolbarItem setImage: [NSImage imageNamed: @"Disc"]];
+
+ // Tell the item what message to send when it is clicked
+ [toolbarItem setTarget: self];
+ [toolbarItem setAction: @selector(ShowScanPanel:)];
+
} else {
//itemIdent refered to a toolbar item that is not provide or supported by us or cocoa
//Returning nil will inform the toolbar this kind of item is not supported
@@ -418,7 +434,7 @@ static NSString* DebugOutputIdentifier = @"Debug Output Item Identifier"
// Required delegate method: Returns the ordered list of items to be shown in the toolbar by default
// If during the toolbar's initialization, no overriding values are found in the user defaults, or if the
// user chooses to revert to the default items this set will be used
- return [NSArray arrayWithObjects: StartEncodingIdentifier, PauseEncodingIdentifier, NSToolbarSeparatorItemIdentifier,
+ return [NSArray arrayWithObjects: ChooseSourceIdentifier, NSToolbarSeparatorItemIdentifier, StartEncodingIdentifier, PauseEncodingIdentifier,
AddToQueueIdentifier, ShowQueueIdentifier,
NSToolbarFlexibleSpaceItemIdentifier,
NSToolbarSpaceItemIdentifier, DebugOutputIdentifier, ToggleDrawerIdentifier, nil];
@@ -430,7 +446,7 @@ static NSString* DebugOutputIdentifier = @"Debug Output Item Identifier"
// The set of allowed items is used to construct the customization palette
return [NSArray arrayWithObjects: StartEncodingIdentifier, PauseEncodingIdentifier, AddToQueueIdentifier, ShowQueueIdentifier,
DebugOutputIdentifier, NSToolbarCustomizeToolbarItemIdentifier,
- NSToolbarFlexibleSpaceItemIdentifier, NSToolbarSpaceItemIdentifier,
+ NSToolbarFlexibleSpaceItemIdentifier, NSToolbarSpaceItemIdentifier, NSToolbarSpaceItemIdentifier, ChooseSourceIdentifier,
NSToolbarSeparatorItemIdentifier,ToggleDrawerIdentifier, nil];
}
@@ -480,7 +496,10 @@ static NSString* DebugOutputIdentifier = @"Debug Output Item Identifier"
if ([[toolbarItem itemIdentifier] isEqual: AddToQueueIdentifier]) {
enable = AddToQueueButtonEnabled;
}
- return enable;
+ if ([[toolbarItem itemIdentifier] isEqual: ChooseSourceIdentifier]) {
+ enable = YES;
+ }
+ return enable;
}
// register a test notification and make
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
index a8f017a44..f84b24880 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -121,6 +121,7 @@
A273E0540C57B39A00493A45 /* Terminal.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04D0C57B39A00493A45 /* Terminal.tiff */; };
A273E09A0C57C1CC00493A45 /* muxmkv.c in Sources */ = {isa = PBXBuildFile; fileRef = A273E0950C57C19500493A45 /* muxmkv.c */; };
A273E09B0C57C1CD00493A45 /* muxmkv.c in Sources */ = {isa = PBXBuildFile; fileRef = A273E0950C57C19500493A45 /* muxmkv.c */; };
+ A28468680C5A43D900EF9A98 /* Disc.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A28468670C5A43D900EF9A98 /* Disc.tiff */; };
A29E05800BE1283E000533F5 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A29E057F0BE1283E000533F5 /* Growl.framework */; };
A29E058B0BE12889000533F5 /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A29E057F0BE1283E000533F5 /* Growl.framework */; };
EAA526930C3B25D200944FF2 /* stream.c in Sources */ = {isa = PBXBuildFile; fileRef = EAA526920C3B25D200944FF2 /* stream.c */; };
@@ -257,6 +258,7 @@
A273E04C0C57B39A00493A45 /* Stop.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Stop.tiff; sourceTree = "<group>"; };
A273E04D0C57B39A00493A45 /* Terminal.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Terminal.tiff; sourceTree = "<group>"; };
A273E0950C57C19500493A45 /* muxmkv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = muxmkv.c; path = ../libhb/muxmkv.c; sourceTree = SOURCE_ROOT; };
+ A28468670C5A43D900EF9A98 /* Disc.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Disc.tiff; sourceTree = "<group>"; };
A29E057F0BE1283E000533F5 /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Growl.framework; sourceTree = "<group>"; };
EAA526920C3B25D200944FF2 /* stream.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream.c; path = ../libhb/stream.c; sourceTree = SOURCE_ROOT; };
FC85194C0C59A02C0073812C /* denoise.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = denoise.c; path = ../libhb/denoise.c; sourceTree = SOURCE_ROOT; };
@@ -471,6 +473,7 @@
A273E0460C57B39A00493A45 /* icons */ = {
isa = PBXGroup;
children = (
+ A28468670C5A43D900EF9A98 /* Disc.tiff */,
A273E0470C57B39A00493A45 /* Add.tiff */,
A273E0480C57B39A00493A45 /* Brushed Window.tiff */,
A273E0490C57B39A00493A45 /* Drawer-List2.png */,
@@ -656,6 +659,7 @@
A273E0520C57B39A00493A45 /* Play.tiff in Resources */,
A273E0530C57B39A00493A45 /* Stop.tiff in Resources */,
A273E0540C57B39A00493A45 /* Terminal.tiff in Resources */,
+ A28468680C5A43D900EF9A98 /* Disc.tiff in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};