diff options
author | dynaflash <[email protected]> | 2007-04-25 18:28:41 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-04-25 18:28:41 +0000 |
commit | 2aa8401380b0efd6b5fe488059d31ca822a483b7 (patch) | |
tree | efcd00df36d773b70ba4a3d24d09108df99f6274 | |
parent | ea0847e6cfa041c9a5553bd266b9101cb615844a (diff) |
MacGui: Queue modifications
- Queue is now integral to encoding
- removed "Enable Queue" Checkbox
- made "Add to Queue" and "Show queue" always usable
- Rip method in controller.mm always calls addToQueue even for one rip, but then automatically rips it.
- Added queue status field.
- fixes bug in 0.8.5 where having queue enabled and clicking rip with nothing in the queue causes HB to do nothing.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@550 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/Controller.h | 4 | ||||
-rw-r--r-- | macosx/Controller.mm | 45 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/classes.nib | 4 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/info.nib | 6 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/keyedobjects.nib | bin | 102083 -> 101934 bytes |
5 files changed, 26 insertions, 33 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index ce9750947..7ae2c8d5b 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -29,7 +29,7 @@ /* Queue panel */ IBOutlet QueueController * fQueueController; IBOutlet NSPanel * fQueuePanel; - IBOutlet NSButton * fQueueCheck; + IBOutlet NSTextField * fQueueStatus; IBOutlet NSButton * fQueueAddButton; IBOutlet NSButton * fQueueShowButton; @@ -191,7 +191,7 @@ - (IBAction) ShowPicturePanel: (id) sender; - (IBAction) CalculatePictureSizing: (id) sender; -- (IBAction) EnableQueue: (id) sender; + - (IBAction) AddToQueue: (id) sender; - (IBAction) ShowQueuePanel: (id) sender; diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 9290cb67a..a9aa9bc73 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -546,21 +546,20 @@ static int FormatSettings[3][4] = } } - /* FIXME: we should only do that when necessary */ - if( [fQueueCheck state] == NSOnState ) - { + /* Lets show the queue status + here in the main window*/ + int count = hb_count( fHandle ); if( count ) { - [fQueueCheck setTitle: [NSString stringWithFormat: - @"Enable queue (%d task%s in queue)", + [fQueueStatus setStringValue: [NSString stringWithFormat: + @"%d task%s in the queue", count, ( count > 1 ) ? "s" : ""]]; } else { - [fQueueCheck setTitle: @"Enable queue (no task in queue)"]; + [fQueueStatus setStringValue: @""]; } - } [[NSRunLoop currentRunLoop] addTimer: [NSTimer scheduledTimerWithTimeInterval: 0.2 target: self @@ -582,7 +581,7 @@ static int FormatSettings[3][4] = fAudLang1Field, fAudLang1PopUp, fAudLang2Field, fAudLang2PopUp, fAudTrack1MixLabel, fAudTrack1MixPopUp, fAudTrack2MixLabel, fAudTrack2MixPopUp, fAudRateField, fAudRatePopUp, fAudBitrateField, - fAudBitratePopUp, fPictureButton, fQueueCheck, + fAudBitratePopUp, fPictureButton,fQueueStatus, fPicSrcWidth,fPicSrcHeight,fPicSettingWidth,fPicSettingHeight, fPicSettingARkeep,fPicSettingDeinterlace,fPicSettingARkeepDsply, fPicSettingDeinterlaceDsply,fPicLabelSettings,fPicLabelSrc,fPicLabelOutp, @@ -877,13 +876,7 @@ static int FormatSettings[3][4] = } -- (IBAction) EnableQueue: (id) sender -{ - bool e = ( [fQueueCheck state] == NSOnState ); - [fQueueAddButton setHidden: !e]; - [fQueueShowButton setHidden: !e]; - [fRipButton setTitle: e ? @"Start" : @"Start"]; -} + - (IBAction) AddToQueue: (id) sender { @@ -942,25 +935,21 @@ static int FormatSettings[3][4] = - (IBAction) Rip: (id) sender { - - /* Rip or Cancel ? */ if( [[fRipButton title] isEqualToString: _( @"Cancel" )] ) { [self Cancel: sender]; return; } - - if( [fQueueCheck state] == NSOffState ) - { - - [self AddToQueue: sender]; - - - - } - - /* We check for duplicate name here */ + /* if there is no job in the queue, then add it to the queue and rip + otherwise, there are already jobs in queue, so just rip the queue */ + int count = hb_count( fHandle ); + if( count < 1 ) + { + [self AddToQueue: sender]; + } + + /* We check for duplicate name here */ if( [[NSFileManager defaultManager] fileExistsAtPath: [fDstFile2Field stringValue]] ) { diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib index f10f110dc..0ab36a683 100644 --- a/macosx/English.lproj/MainMenu.nib/classes.nib +++ b/macosx/English.lproj/MainMenu.nib/classes.nib @@ -39,7 +39,7 @@ LANGUAGE = ObjC; OUTLETS = { fAddPresetPanel = NSPanel; - fAddToQuButton = NSTableView; + fAddToQuButton = NSButton; fAudBitrateField = NSTextField; fAudBitratePopUp = NSPopUpButton; fAudLang1Field = NSTextField; @@ -98,10 +98,10 @@ fPresetsAdd = NSButton; fPresetsDelete = NSButton; fQueueAddButton = NSButton; - fQueueCheck = NSButton; fQueueController = QueueController; fQueuePanel = NSPanel; fQueueShowButton = NSButton; + fQueueStatus = NSTextField; fRipButton = NSButton; fRipIndicator = NSProgressIndicator; fScanController = ScanController; diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib index b845f1d90..7ee52d21e 100644 --- a/macosx/English.lproj/MainMenu.nib/info.nib +++ b/macosx/English.lproj/MainMenu.nib/info.nib @@ -3,7 +3,7 @@ <plist version="1.0"> <dict> <key>IBDocumentLocation</key> - <string>1484 151 630 601 1440 0 1280 1024 </string> + <string>6 277 630 601 0 0 1440 878 </string> <key>IBEditorPositions</key> <dict> <key>1843</key> @@ -17,6 +17,10 @@ <array> <integer>1477</integer> </array> + <key>IBOpenObjects</key> + <array> + <integer>21</integer> + </array> <key>IBSystem Version</key> <string>8P2137</string> <key>IBUserGuides</key> diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib Binary files differindex 560c26596..145999c6e 100644 --- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib +++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib |