summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/Controller.h34
-rw-r--r--macosx/Controller.mm402
-rw-r--r--macosx/English.lproj/MainMenu.nib/classes.nib6
-rw-r--r--macosx/English.lproj/MainMenu.nib/info.nib9
-rw-r--r--macosx/English.lproj/MainMenu.nib/keyedobjects.nibbin124513 -> 121340 bytes
-rw-r--r--macosx/English.lproj/OutputPanel.nib/info.nib2
-rw-r--r--macosx/English.lproj/OutputPanel.nib/keyedobjects.nibbin6014 -> 6081 bytes
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj48
-rw-r--r--macosx/icons/Add.tiffbin0 -> 16596 bytes
-rw-r--r--macosx/icons/Brushed Window.tiffbin0 -> 16120 bytes
-rw-r--r--macosx/icons/Drawer-List2.pngbin0 -> 744 bytes
-rw-r--r--macosx/icons/Pause.tiffbin0 -> 16664 bytes
-rw-r--r--macosx/icons/Play.tiffbin0 -> 18836 bytes
-rw-r--r--macosx/icons/Stop.tiffbin0 -> 16124 bytes
-rw-r--r--macosx/icons/Terminal.tiffbin0 -> 15924 bytes
15 files changed, 397 insertions, 104 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h
index 9479c3699..be931df58 100644
--- a/macosx/Controller.h
+++ b/macosx/Controller.h
@@ -21,22 +21,22 @@
{
IBOutlet NSWindow * fWindow;
-
+
/* Scan panel */
IBOutlet ScanController * fScanController;
IBOutlet NSPanel * fScanPanel;
-
+
/* Picture panel */
IBOutlet PictureController * fPictureController;
IBOutlet NSPanel * fPicturePanel;
-
+
/* Queue panel */
IBOutlet QueueController * fQueueController;
IBOutlet NSPanel * fQueuePanel;
IBOutlet NSTextField * fQueueStatus;
- IBOutlet NSButton * fQueueAddButton;
- IBOutlet NSButton * fQueueShowButton;
-
+ //IBOutlet NSButton * fQueueAddButton;
+ //IBOutlet NSButton * fQueueShowButton;
+
/* Source box */
IBOutlet NSTextField * fSrcDVD1Field;
IBOutlet NSTextField * fSrcDVD2Field;
@@ -48,7 +48,7 @@
IBOutlet NSPopUpButton * fSrcChapterEndPopUp;
IBOutlet NSTextField * fSrcDuration1Field;
IBOutlet NSTextField * fSrcDuration2Field;
-
+
/* Destination box */
IBOutlet NSTextField * fDstFormatField;
IBOutlet NSPopUpButton * fDstFormatPopUp;
@@ -58,7 +58,7 @@
IBOutlet NSTextField * fDstFile1Field;
IBOutlet NSTextField * fDstFile2Field;
IBOutlet NSButton * fDstBrowseButton;
-
+
/* Video box */
IBOutlet NSTextField * fVidRateField;
IBOutlet NSPopUpButton * fVidRatePopUp;
@@ -110,7 +110,7 @@
/* Subtitles box */
IBOutlet NSTextField * fSubField;
IBOutlet NSPopUpButton * fSubPopUp;
-
+
/* Audio box */
IBOutlet NSTextField * fAudLang1Field;
IBOutlet NSPopUpButton * fAudLang1PopUp;
@@ -130,8 +130,8 @@
/* Chapters box */
IBOutlet NSButton * fCreateChapterMarkers;
IBOutlet NSTableView * fChapterTable;
- ChapterTitles * fChapterTitlesDelegate;
-
+ ChapterTitles * fChapterTitlesDelegate;
+
/* Bottom */
IBOutlet NSButton * fPictureButton;
IBOutlet NSTextField * fStatusField;
@@ -140,7 +140,7 @@
IBOutlet NSButton * fAddToQuButton;
IBOutlet NSButton * fPauseButton;
IBOutlet NSButton * fRipButton;
-
+
/* Advanced Tab for opts fX264optView*/
IBOutlet NSView * fX264optView;
IBOutlet NSTextField * fX264optViewTitleLabel;
@@ -202,11 +202,17 @@
hb_handle_t * fHandle;
hb_title_t * fTitle;
/* integer to set to determine the previous state
- of encode 0==idle, 1==encoding, 2==cancelled*/
+ of encode 0==idle, 1==encoding, 2==cancelled*/
int fEncodeState;
int currentScanCount;
NSString * currentSource;
HBOutputPanelController *outputPanel;
+
+ BOOL startButtonEnabled;
+ BOOL pauseButtonEnabled;
+ BOOL AddToQueueButtonEnabled;
+ BOOL stopOrStart;
+ BOOL resumeOrPause;
}
- (void) TranslateStrings;
@@ -318,6 +324,6 @@
- (NSDictionary *) registrationDictionaryForGrowl;
-(IBAction)showGrowlDoneNotification:(id)sender;
- (IBAction)showDebugOutputPanel:(id)sender;
-
+- (void)setupToolbar;
@end
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 380cb2097..f89856e09 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -35,6 +35,16 @@ static int FormatSettings[4][10] =
0,
0 } };
+/* We setup the toolbar values here */
+static NSString* MyDocToolbarIdentifier = @"My Document Toolbar Identifier";
+static NSString* ToggleDrawerIdentifier = @"Toggle Drawer Item Identifier";
+//static NSString* ToggleDrawerIdentifier = @"Toggle Presets Item Identifier";
+static NSString* StartEncodingIdentifier = @"Start Encoding Item Identifier";
+static NSString* PauseEncodingIdentifier = @"Pause Encoding Item Identifier";
+static NSString* ShowQueueIdentifier = @"Show Queue Item Identifier";
+static NSString* AddToQueueIdentifier = @"Add to Queue Item Identifier";
+static NSString* DebugOutputIdentifier = @"Debug Output Item Identifier";
+
/*******************************
* HBController implementation *
*******************************/
@@ -253,15 +263,226 @@ static int FormatSettings[4][10] =
[fStatusField setStringValue: @""];
[self EnableUI: NO];
- [fPauseButton setEnabled: NO];
- [fRipButton setEnabled: NO];
-
+ //[fPauseButton setEnabled: NO];
+ //[fRipButton setEnabled: NO];
+ /* Use new Toolbar start and pause here */
+
+ pauseButtonEnabled = NO;
+ startButtonEnabled = NO;
+ [self setupToolbar];
+ /* In Ritsuka's patch, this goes below the Turbo stuff below
+ Lets try to keep it all together */
+ startButtonEnabled = NO;
+ stopOrStart = NO;
+ AddToQueueButtonEnabled = NO;
+ pauseButtonEnabled = NO;
+ resumeOrPause = NO;
/* We disable the Turbo 1st pass checkbox since we are not x264 */
[fVidTurboPassCheck setEnabled: NO];
[fVidTurboPassCheck setState: NSOffState];
}
+// ============================================================
+// NSToolbar Related Methods
+// ============================================================
+
+- (void) setupToolbar {
+ // Create a new toolbar instance, and attach it to our document window
+ NSToolbar *toolbar = [[[NSToolbar alloc] initWithIdentifier: MyDocToolbarIdentifier] autorelease];
+
+ // Set up toolbar properties: Allow customization, give a default display mode, and remember state in user defaults
+ [toolbar setAllowsUserCustomization: YES];
+ [toolbar setAutosavesConfiguration: YES];
+ [toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
+
+ // We are the delegate
+ [toolbar setDelegate: self];
+
+ // Attach the toolbar to the document window
+ [fWindow setToolbar: toolbar];
+}
+
+- (NSToolbarItem *) toolbar: (NSToolbar *)toolbar itemForItemIdentifier: (NSString *) itemIdent willBeInsertedIntoToolbar:(BOOL) willBeInserted {
+ // Required delegate method: Given an item identifier, this method returns an item
+ // The toolbar will use this method to obtain toolbar items that can be displayed in the customization sheet, or in the toolbar itself
+ NSToolbarItem *toolbarItem = nil;
+
+ if ([itemIdent isEqual: ToggleDrawerIdentifier]) {
+ toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
+
+ // Set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel: @"Toggle Presets"];
+ [toolbarItem setPaletteLabel: @"Toggler Presets"];
+
+ // 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: @"Open/Close Preset Drawer"];
+ [toolbarItem setImage: [NSImage imageNamed: @"Drawer-List2"]];
+
+ // Tell the item what message to send when it is clicked
+ [toolbarItem setTarget: self];
+ [toolbarItem setAction: @selector(toggleDrawer)];
+
+ } else if ([itemIdent isEqual: StartEncodingIdentifier]) {
+ toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
+
+ // Set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel: @"Start"];
+ [toolbarItem setPaletteLabel: @"Start Encoding"];
+
+ // 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: @"Start Encoding"];
+ [toolbarItem setImage: [NSImage imageNamed: @"Play"]];
+
+ // Tell the item what message to send when it is clicked
+ [toolbarItem setTarget: self];
+ [toolbarItem setAction: @selector(Rip:)];
+
+
+
+ } else if ([itemIdent isEqual: ShowQueueIdentifier]) {
+ toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
+
+ // Set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel: @"Show Queue"];
+ [toolbarItem setPaletteLabel: @"Show Queue"];
+
+ // 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: @"Show Queue"];
+ [toolbarItem setImage: [NSImage imageNamed: @"Brushed Window"]];
+
+ // Tell the item what message to send when it is clicked
+ [toolbarItem setTarget: self];
+ [toolbarItem setAction: @selector(ShowQueuePanel:)];
+
+ } else if ([itemIdent isEqual: AddToQueueIdentifier]) {
+ toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
+
+ // Set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel: @"Add to Queue"];
+ [toolbarItem setPaletteLabel: @"Add to Queue"];
+
+ // 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: @"Add to Queue"];
+ [toolbarItem setImage: [NSImage imageNamed: @"Add"]];
+
+ // Tell the item what message to send when it is clicked
+ [toolbarItem setTarget: self];
+ [toolbarItem setAction: @selector(AddToQueue:)];
+
+
+ } else if ([itemIdent isEqual: PauseEncodingIdentifier]) {
+ toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
+
+ // Set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel: @"Pause"];
+ [toolbarItem setPaletteLabel: @"Pause Encoding"];
+
+ // 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: @"Pause Encoding"];
+ [toolbarItem setImage: [NSImage imageNamed: @"Pause"]];
+
+ // Tell the item what message to send when it is clicked
+ [toolbarItem setTarget: self];
+ [toolbarItem setAction: @selector(Pause:)];
+
+ } else if ([itemIdent isEqual: DebugOutputIdentifier]) {
+ toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
+
+ // Set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel: @"Activity Window"];
+ [toolbarItem setPaletteLabel: @"Show Activity Window"];
+
+ // 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: @"Show Activity Window"];
+ [toolbarItem setImage: [NSImage imageNamed: @"Terminal"]];
+
+ // Tell the item what message to send when it is clicked
+ [toolbarItem setTarget: self];
+ [toolbarItem setAction: @selector(showDebugOutputPanel:)];
+
+ } 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
+ toolbarItem = nil;
+ }
+
+ return toolbarItem;
+}
+
+- (void) toggleDrawer {
+ [fPresetDrawer toggle:self];
+}
+
+- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar {
+ // 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,
+ AddToQueueIdentifier, ShowQueueIdentifier,
+ NSToolbarFlexibleSpaceItemIdentifier,
+ NSToolbarSpaceItemIdentifier, DebugOutputIdentifier, ToggleDrawerIdentifier, nil];
+}
+
+- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar {
+ // Required delegate method: Returns the list of all allowed items by identifier. By default, the toolbar
+ // does not assume any items are allowed, even the separator. So, every allowed item must be explicitly listed
+ // The set of allowed items is used to construct the customization palette
+ return [NSArray arrayWithObjects: StartEncodingIdentifier, PauseEncodingIdentifier, AddToQueueIdentifier, ShowQueueIdentifier,
+ DebugOutputIdentifier, NSToolbarCustomizeToolbarItemIdentifier,
+ NSToolbarFlexibleSpaceItemIdentifier, NSToolbarSpaceItemIdentifier,
+ NSToolbarSeparatorItemIdentifier,ToggleDrawerIdentifier, nil];
+}
+
+- (BOOL) validateToolbarItem: (NSToolbarItem *) toolbarItem {
+ // Optional method: This message is sent to us since we are the target of some toolbar item actions
+ BOOL enable = NO;
+ if ([[toolbarItem itemIdentifier] isEqual: ToggleDrawerIdentifier]) {
+ enable = YES;
+ }
+ if ([[toolbarItem itemIdentifier] isEqual: StartEncodingIdentifier]) {
+ enable = startButtonEnabled;
+ if(stopOrStart) {
+ [toolbarItem setImage: [NSImage imageNamed: @"Stop"]];
+ [toolbarItem setLabel: @"Cancel"];
+ [toolbarItem setPaletteLabel: @"Cancel"];
+ [toolbarItem setToolTip: @"Cancel Encoding"];
+ }
+ else {
+ [toolbarItem setImage: [NSImage imageNamed: @"Play"]];
+ [toolbarItem setLabel: @"Start"];
+ [toolbarItem setPaletteLabel: @"Start Encoding"];
+ [toolbarItem setToolTip: @"Start Encoding"];
+ }
+
+ }
+ if ([[toolbarItem itemIdentifier] isEqual: PauseEncodingIdentifier]) {
+ enable = pauseButtonEnabled;
+ if(resumeOrPause) {
+ [toolbarItem setImage: [NSImage imageNamed: @"Play"]];
+ [toolbarItem setLabel: @"Resume"];
+ [toolbarItem setPaletteLabel: @"Resume Encoding"];
+ [toolbarItem setToolTip: @"Resume Encoding"];
+ }
+ else {
+ [toolbarItem setImage: [NSImage imageNamed: @"Pause"]];
+ [toolbarItem setLabel: @"Pause"];
+ [toolbarItem setPaletteLabel: @"Pause Encoding"];
+ [toolbarItem setToolTip: @"Pause Encoding"];
+ }
+ }
+ if ([[toolbarItem itemIdentifier] isEqual: DebugOutputIdentifier]) {
+ enable = YES;
+ }
+ if ([[toolbarItem itemIdentifier] isEqual: ShowQueueIdentifier]) {
+ enable = YES;
+ }
+ if ([[toolbarItem itemIdentifier] isEqual: AddToQueueIdentifier]) {
+ enable = AddToQueueButtonEnabled;
+ }
+ return enable;
+}
+
// register a test notification and make
// it enabled by default
#define SERVICE_NAME @"Encode Done"
@@ -378,50 +599,50 @@ return registrationDictionary;
- (void) UpdateUI: (NSTimer *) timer
{
-/* check to see if there has been a new scan done
- this bypasses the constraints of HB_STATE_WORKING
- not allowing setting a newly scanned source */
-int checkScanCount = hb_get_scancount( fHandle );
-if (checkScanCount > currentScanCount)
+ /* check to see if there has been a new scan done
+ this bypasses the constraints of HB_STATE_WORKING
+ not allowing setting a newly scanned source */
+ int checkScanCount = hb_get_scancount( fHandle );
+ if (checkScanCount > currentScanCount)
{
[fScanController Cancel: NULL];
[self ShowNewScan: NULL];
currentScanCount = checkScanCount;
}
-
-
-
-
+
+
+
+
hb_state_t s;
hb_get_state( fHandle, &s );
-
-
+
+
switch( s.state )
{
case HB_STATE_IDLE:
break;
-
+
case HB_STATE_SCANNING:
[fScanController UpdateUI: &s];
break;
-
+
#define p s.param.scandone
case HB_STATE_SCANDONE:
{
- [fScanController Cancel: NULL];
- [self ShowNewScan: NULL];
+ [fScanController Cancel: NULL];
+ [self ShowNewScan: NULL];
break;
}
#undef p
-
+
#define p s.param.working
case HB_STATE_WORKING:
{
float progress_total;
NSMutableString * string;
/* Currently, p.job_cur and p.job_count get screwed up when adding
- jobs during encoding, if they cannot be fixed in libhb, will implement a
- nasty but working cocoa solution */
+ jobs during encoding, if they cannot be fixed in libhb, will implement a
+ nasty but working cocoa solution */
/* Update text field */
string = [NSMutableString stringWithFormat: _( @"Encoding: task %d of %d, %.2f %%" ), p.job_cur, p.job_count, 100.0 * p.progress];
@@ -441,17 +662,16 @@ if (checkScanCount > currentScanCount)
/* Update dock icon */
[self UpdateDockIcon: progress_total];
- [fPauseButton setEnabled: YES];
- [fPauseButton setTitle: _( @"Pause" )];
- [fRipButton setEnabled: YES];
- [fRipButton setTitle: _( @"Cancel" )];
-
-
+ /* new toolbar controls */
+ pauseButtonEnabled = YES;
+ resumeOrPause = NO;
+ startButtonEnabled = YES;
+ stopOrStart = YES;
break;
}
#undef p
-
+
#define p s.param.muxing
case HB_STATE_MUXING:
{
@@ -469,22 +689,27 @@ if (checkScanCount > currentScanCount)
/* Update dock icon */
[self UpdateDockIcon: 1.0];
- [fPauseButton setEnabled: YES];
- [fPauseButton setTitle: _( @"Pause" )];
- [fRipButton setEnabled: YES];
- [fRipButton setTitle: _( @"Cancel" )];
+ //[fPauseButton setEnabled: YES];
+ //[fPauseButton setTitle: _( @"Pause" )];
+ //[fRipButton setEnabled: YES];
+ // [fRipButton setTitle: _( @"Cancel" )];
break;
}
#undef p
case HB_STATE_PAUSED:
- [fStatusField setStringValue: _( @"Paused" )];
- [fPauseButton setEnabled: YES];
- [fPauseButton setTitle: _( @"Resume" )];
- [fRipButton setEnabled: YES];
- [fRipButton setTitle: _( @"Cancel" )];
+ //[fStatusField setStringValue: _( @"Paused" )];
+ //[fPauseButton setEnabled: YES];
+ //[fPauseButton setTitle: _( @"Resume" )];
+ //[fRipButton setEnabled: YES];
+ //[fRipButton setTitle: _( @"Cancel" )];
+ /* new toolbar controls */
+ pauseButtonEnabled = YES;
+ resumeOrPause = YES;
+ startButtonEnabled = YES;
+ stopOrStart = YES;
break;
-
+
case HB_STATE_WORKDONE:
{
[fStatusField setStringValue: _( @"Done." )];
@@ -495,10 +720,21 @@ if (checkScanCount > currentScanCount)
/* Restore dock icon */
[self UpdateDockIcon: -1.0];
- [fPauseButton setEnabled: NO];
- [fPauseButton setTitle: _( @"Pause" )];
- [fRipButton setEnabled: YES];
- [fRipButton setTitle: _( @"Start" )];
+ //[fPauseButton setEnabled: NO];
+ //[fPauseButton setTitle: _( @"Pause" )];
+ // [fRipButton setEnabled: YES];
+ // [fRipButton setTitle: _( @"Start" )];
+ /* new toolbar controls */
+ pauseButtonEnabled = NO;
+ resumeOrPause = NO;
+ startButtonEnabled = YES;
+ stopOrStart = NO;
+ NSRect frame = [fWindow frame];
+ if (frame.size.width <= 591)
+ frame.size.width = 591;
+ frame.size.height += -44;
+ frame.origin.y -= -44;
+ [fWindow setFrame:frame display:YES animate:YES];
/* FIXME */
hb_job_t * job;
@@ -507,7 +743,7 @@ if (checkScanCount > currentScanCount)
hb_rem( fHandle, job );
}
/* Check to see if the encode state has not been cancelled
- to determine if we should check for encode done notifications */
+ to determine if we should check for encode done notifications */
if (fEncodeState != 2) {
/* If Growl Notification or Window and Growl has been selected */
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AlertWhenDone"] isEqualToString: @"Growl Notification"] ||
@@ -537,30 +773,30 @@ if (checkScanCount > currentScanCount)
}
else
{
- [self EnableUI: YES];
+ [self EnableUI: YES];
}
break;
}
}
-
+
/* Lets show the queue status
- here in the main window*/
- int queue_count = hb_count( fHandle );
- if( queue_count )
- {
- [fQueueStatus setStringValue: [NSString stringWithFormat:
- @"%d task%s in the queue",
- queue_count, ( queue_count > 1 ) ? "s" : ""]];
- }
- else
- {
- [fQueueStatus setStringValue: @""];
- }
-
+ here in the main window*/
+ int queue_count = hb_count( fHandle );
+ if( queue_count )
+ {
+ [fQueueStatus setStringValue: [NSString stringWithFormat:
+ @"%d task%s in the queue",
+ queue_count, ( queue_count > 1 ) ? "s" : ""]];
+ }
+ else
+ {
+ [fQueueStatus setStringValue: @""];
+ }
+
[[NSRunLoop currentRunLoop] addTimer: [NSTimer
scheduledTimerWithTimeInterval: 0.2 target: self
- selector: @selector( UpdateUI: ) userInfo: NULL repeats: FALSE]
- forMode: NSModalPanelRunLoopMode];
+ selector: @selector( UpdateUI: ) userInfo: NULL repeats: FALSE]
+ forMode: NSModalPanelRunLoopMode];
}
- (IBAction) ShowNewScan:(id)sender
{
@@ -670,8 +906,13 @@ if (checkScanCount > currentScanCount)
[self TitlePopUpChanged: NULL];
[self EnableUI: YES];
- [fPauseButton setEnabled: NO];
- [fRipButton setEnabled: YES];
+ //[fPauseButton setEnabled: NO];
+ //[fRipButton setEnabled: YES];
+ startButtonEnabled = YES;
+ stopOrStart = NO;
+ AddToQueueButtonEnabled = YES;
+ pauseButtonEnabled = NO;
+ resumeOrPause = NO;
}
@@ -1090,8 +1331,9 @@ if (checkScanCount > currentScanCount)
- (IBAction) Rip: (id) sender
{
/* Rip or Cancel ? */
- if( [[fRipButton title] isEqualToString: _( @"Cancel" )] )
- {
+ // if( [[fRipButton title] isEqualToString: _( @"Cancel" )] )
+ if(stopOrStart)
+ {
[self Cancel: sender];
return;
}
@@ -1163,11 +1405,19 @@ if (checkScanCount > currentScanCount)
hb_start( fHandle );
/*set the fEncodeState State */
fEncodeState = 1;
-
+
/* Disable interface */
- //[self EnableUI: NO];
- [fPauseButton setEnabled: NO];
- [fRipButton setEnabled: NO];
+ //[self EnableUI: NO];
+ // [fPauseButton setEnabled: NO];
+ // [fRipButton setEnabled: NO];
+ pauseButtonEnabled = NO;
+ startButtonEnabled = NO;
+ NSRect frame = [fWindow frame];
+ if (frame.size.width <= 591)
+ frame.size.width = 591;
+ frame.size.height += 44;
+ frame.origin.y -= 44;
+ [fWindow setFrame:frame display:YES animate:YES];
}
- (IBAction) Cancel: (id) sender
@@ -1184,8 +1434,10 @@ if (checkScanCount > currentScanCount)
if( returnCode == NSAlertAlternateReturn )
{
hb_stop( fHandle );
- [fPauseButton setEnabled: NO];
- [fRipButton setEnabled: NO];
+ // [fPauseButton setEnabled: NO];
+ // [fRipButton setEnabled: NO];
+ pauseButtonEnabled = NO;
+ startButtonEnabled = NO;
/*set the fEncodeState State */
fEncodeState = 2;
}
@@ -1193,10 +1445,14 @@ if (checkScanCount > currentScanCount)
- (IBAction) Pause: (id) sender
{
- [fPauseButton setEnabled: NO];
- [fRipButton setEnabled: NO];
+ // [fPauseButton setEnabled: NO];
+ // [fRipButton setEnabled: NO];
+
+ // if( [[fPauseButton title] isEqualToString: _( @"Resume" )] )
+ pauseButtonEnabled = NO;
+ startButtonEnabled = NO;
- if( [[fPauseButton title] isEqualToString: _( @"Resume" )] )
+ if(resumeOrPause)
{
hb_resume( fHandle );
}
diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib
index 6967469df..b1874b1a0 100644
--- a/macosx/English.lproj/MainMenu.nib/classes.nib
+++ b/macosx/English.lproj/MainMenu.nib/classes.nib
@@ -51,7 +51,6 @@
LANGUAGE = ObjC;
OUTLETS = {
fAddPresetPanel = NSPanel;
- fAddToQuButton = NSButton;
fAudBitrateField = NSTextField;
fAudBitratePopUp = NSPopUpButton;
fAudLang1Field = NSTextField;
@@ -76,7 +75,6 @@
fDstFormatField = NSTextField;
fDstFormatPopUp = NSPopUpButton;
fDstMpgLargeFileCheck = NSButton;
- fPauseButton = NSButton;
fPicLabelAnamorphic = NSTextField;
fPicLabelAr = NSTextField;
fPicLabelDeinter = NSTextField;
@@ -112,16 +110,12 @@
fPresetSelectedDisplay = NSTextField;
fPresetsAdd = NSButton;
fPresetsDelete = NSButton;
- fQueueAddButton = NSButton;
fQueueController = QueueController;
fQueuePanel = NSPanel;
- fQueueShowButton = NSButton;
fQueueStatus = NSTextField;
- fRipButton = NSButton;
fRipIndicator = NSProgressIndicator;
fScanController = ScanController;
fScanPanel = NSPanel;
- fShowQuButton = NSButton;
fSrcChapterEndPopUp = NSPopUpButton;
fSrcChapterField = NSTextField;
fSrcChapterStartPopUp = NSPopUpButton;
diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib
index 67485c226..dfc9a034b 100644
--- a/macosx/English.lproj/MainMenu.nib/info.nib
+++ b/macosx/English.lproj/MainMenu.nib/info.nib
@@ -7,7 +7,7 @@
<key>IBEditorPositions</key>
<dict>
<key>1843</key>
- <string>863 409 220 592 0 0 1920 1058 </string>
+ <string>620 338 200 530 0 0 1440 878 </string>
<key>29</key>
<string>155 478 365 44 0 0 1440 878 </string>
</dict>
@@ -19,8 +19,10 @@
</array>
<key>IBOpenObjects</key>
<array>
- <integer>29</integer>
+ <integer>1843</integer>
+ <integer>365</integer>
<integer>21</integer>
+ <integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>8R2218</string>
@@ -30,8 +32,7 @@
<dict>
<key>guideLocations</key>
<array>
- <string>Horizontal:576.000000</string>
- <string>Horizontal:318.000000</string>
+ <string>Horizontal:492.000000</string>
</array>
<key>guidesLocked</key>
<false/>
diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
index 2af236d48..b22d0d9fe 100644
--- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
+++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ
diff --git a/macosx/English.lproj/OutputPanel.nib/info.nib b/macosx/English.lproj/OutputPanel.nib/info.nib
index 708844cb7..c4028233f 100644
--- a/macosx/English.lproj/OutputPanel.nib/info.nib
+++ b/macosx/English.lproj/OutputPanel.nib/info.nib
@@ -17,6 +17,6 @@
<integer>11</integer>
</array>
<key>IBSystem Version</key>
- <string>8P2137</string>
+ <string>8R2218</string>
</dict>
</plist>
diff --git a/macosx/English.lproj/OutputPanel.nib/keyedobjects.nib b/macosx/English.lproj/OutputPanel.nib/keyedobjects.nib
index f3f72537f..60e034726 100644
--- a/macosx/English.lproj/OutputPanel.nib/keyedobjects.nib
+++ b/macosx/English.lproj/OutputPanel.nib/keyedobjects.nib
Binary files differ
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
index 5a8f75a6f..fc250f584 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -112,12 +112,19 @@
593034EC0BBA39A100172349 /* ChapterTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = 593034EA0BBA39A100172349 /* ChapterTitles.m */; };
59CBD2370BBB44DA004A3BE3 /* parsecsv.c in Sources */ = {isa = PBXBuildFile; fileRef = 59CBD2360BBB44DA004A3BE3 /* parsecsv.c */; };
59CBD2650BBB4D1B004A3BE3 /* ChapterTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = 593034EA0BBA39A100172349 /* ChapterTitles.m */; };
+ A273E04E0C57B39A00493A45 /* Add.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E0470C57B39A00493A45 /* Add.tiff */; };
+ A273E04F0C57B39A00493A45 /* Brushed Window.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E0480C57B39A00493A45 /* Brushed Window.tiff */; };
+ A273E0500C57B39A00493A45 /* Drawer-List2.png in Resources */ = {isa = PBXBuildFile; fileRef = A273E0490C57B39A00493A45 /* Drawer-List2.png */; };
+ A273E0510C57B39A00493A45 /* Pause.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04A0C57B39A00493A45 /* Pause.tiff */; };
+ A273E0520C57B39A00493A45 /* Play.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04B0C57B39A00493A45 /* Play.tiff */; };
+ A273E0530C57B39A00493A45 /* Stop.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04C0C57B39A00493A45 /* Stop.tiff */; };
+ 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 */; };
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 */; };
EAA526940C3B25D200944FF2 /* stream.c in Sources */ = {isa = PBXBuildFile; fileRef = EAA526920C3B25D200944FF2 /* stream.c */; };
- FC6CE2C10C495A6B001A2D5B /* muxmkv.c in Sources */ = {isa = PBXBuildFile; fileRef = FC6CE2C00C495A6B001A2D5B /* muxmkv.c */; };
- FC6CE2C20C495A6B001A2D5B /* muxmkv.c in Sources */ = {isa = PBXBuildFile; fileRef = FC6CE2C00C495A6B001A2D5B /* muxmkv.c */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -234,9 +241,16 @@
593034E90BBA39A100172349 /* ChapterTitles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChapterTitles.h; sourceTree = "<group>"; };
593034EA0BBA39A100172349 /* ChapterTitles.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChapterTitles.m; sourceTree = "<group>"; };
59CBD2360BBB44DA004A3BE3 /* parsecsv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = parsecsv.c; path = ../test/parsecsv.c; sourceTree = SOURCE_ROOT; };
+ A273E0470C57B39A00493A45 /* Add.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Add.tiff; sourceTree = "<group>"; };
+ A273E0480C57B39A00493A45 /* Brushed Window.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "Brushed Window.tiff"; sourceTree = "<group>"; };
+ A273E0490C57B39A00493A45 /* Drawer-List2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Drawer-List2.png"; sourceTree = "<group>"; };
+ A273E04A0C57B39A00493A45 /* Pause.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Pause.tiff; sourceTree = "<group>"; };
+ A273E04B0C57B39A00493A45 /* Play.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Play.tiff; sourceTree = "<group>"; };
+ 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; };
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; };
- FC6CE2C00C495A6B001A2D5B /* muxmkv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = muxmkv.c; path = ../libhb/muxmkv.c; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -302,7 +316,7 @@
29B97314FDCFA39411CA2CEA /* HandBrake */ = {
isa = PBXGroup;
children = (
- FC6CE2C00C495A6B001A2D5B /* muxmkv.c */,
+ A273E0460C57B39A00493A45 /* icons */,
526FBC940B4CAA310064E04C /* Instant HandBrake Sources */,
526FBC930B4CAA260064E04C /* HandBrake Sources */,
526FBC920B4CAA120064E04C /* HandBrakeCLI Sources */,
@@ -353,6 +367,7 @@
526FBC8D0B4CA9F90064E04C /* libhb Sources */ = {
isa = PBXGroup;
children = (
+ A273E0950C57C19500493A45 /* muxmkv.c */,
EAA526920C3B25D200944FF2 /* stream.c */,
0DFA5C7E0B8DD3B60020BC09 /* declpcm.c */,
0DFA5C7F0B8DD3B60020BC09 /* decmpeg2.c */,
@@ -437,6 +452,20 @@
name = "Instant HandBrake Sources";
sourceTree = "<group>";
};
+ A273E0460C57B39A00493A45 /* icons */ = {
+ isa = PBXGroup;
+ children = (
+ A273E0470C57B39A00493A45 /* Add.tiff */,
+ A273E0480C57B39A00493A45 /* Brushed Window.tiff */,
+ A273E0490C57B39A00493A45 /* Drawer-List2.png */,
+ A273E04A0C57B39A00493A45 /* Pause.tiff */,
+ A273E04B0C57B39A00493A45 /* Play.tiff */,
+ A273E04C0C57B39A00493A45 /* Stop.tiff */,
+ A273E04D0C57B39A00493A45 /* Terminal.tiff */,
+ );
+ path = icons;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -604,6 +633,13 @@
0DFA5C7B0B8DD1E90020BC09 /* HandBrake.icns in Resources */,
2538860C0BFE0B730064E995 /* OutputPanel.nib in Resources */,
25DE1FAD0C1699E500F01FC8 /* Preferences.nib in Resources */,
+ A273E04E0C57B39A00493A45 /* Add.tiff in Resources */,
+ A273E04F0C57B39A00493A45 /* Brushed Window.tiff in Resources */,
+ A273E0500C57B39A00493A45 /* Drawer-List2.png in Resources */,
+ A273E0510C57B39A00493A45 /* Pause.tiff in Resources */,
+ A273E0520C57B39A00493A45 /* Play.tiff in Resources */,
+ A273E0530C57B39A00493A45 /* Stop.tiff in Resources */,
+ A273E0540C57B39A00493A45 /* Terminal.tiff in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -644,7 +680,7 @@
0D096E030B707D3400A845D4 /* decavcodec.c in Sources */,
5558B56A0BE3BADF00E15E27 /* decdca.c in Sources */,
EAA526940C3B25D200944FF2 /* stream.c in Sources */,
- FC6CE2C20C495A6B001A2D5B /* muxmkv.c in Sources */,
+ A273E09B0C57C1CD00493A45 /* muxmkv.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -683,7 +719,7 @@
593034EC0BBA39A100172349 /* ChapterTitles.m in Sources */,
5558B5690BE3BADF00E15E27 /* decdca.c in Sources */,
EAA526930C3B25D200944FF2 /* stream.c in Sources */,
- FC6CE2C10C495A6B001A2D5B /* muxmkv.c in Sources */,
+ A273E09A0C57C1CC00493A45 /* muxmkv.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/macosx/icons/Add.tiff b/macosx/icons/Add.tiff
new file mode 100644
index 000000000..9284fa0dd
--- /dev/null
+++ b/macosx/icons/Add.tiff
Binary files differ
diff --git a/macosx/icons/Brushed Window.tiff b/macosx/icons/Brushed Window.tiff
new file mode 100644
index 000000000..30a820b1e
--- /dev/null
+++ b/macosx/icons/Brushed Window.tiff
Binary files differ
diff --git a/macosx/icons/Drawer-List2.png b/macosx/icons/Drawer-List2.png
new file mode 100644
index 000000000..592e8868e
--- /dev/null
+++ b/macosx/icons/Drawer-List2.png
Binary files differ
diff --git a/macosx/icons/Pause.tiff b/macosx/icons/Pause.tiff
new file mode 100644
index 000000000..50b7362bc
--- /dev/null
+++ b/macosx/icons/Pause.tiff
Binary files differ
diff --git a/macosx/icons/Play.tiff b/macosx/icons/Play.tiff
new file mode 100644
index 000000000..916ec8d31
--- /dev/null
+++ b/macosx/icons/Play.tiff
Binary files differ
diff --git a/macosx/icons/Stop.tiff b/macosx/icons/Stop.tiff
new file mode 100644
index 000000000..5ebae6d15
--- /dev/null
+++ b/macosx/icons/Stop.tiff
Binary files differ
diff --git a/macosx/icons/Terminal.tiff b/macosx/icons/Terminal.tiff
new file mode 100644
index 000000000..a568c7369
--- /dev/null
+++ b/macosx/icons/Terminal.tiff
Binary files differ