#import "HBPreferencesController.h"
#import "HBDVDDetector.h"
#import "HBPresets.h"
+#import "HBPreviewController.h"
#define DragDropSimplePboardType @"MyCustomOutlineViewPboardType"
}
outputPanel = [[HBOutputPanelController alloc] init];
fPictureController = [[PictureController alloc] init];
+ //fPreviewController = [[PreviewController alloc] init];
fQueueController = [[HBQueueController alloc] init];
fAdvancedOptions = [[HBAdvancedController alloc] init];
/* we init the HBPresets class which currently is only used
/* Init others controllers */
[fPictureController SetHandle: fHandle];
[fPictureController setHBController: self];
+ /* fPreviewController */
+ //[fPreviewController SetHandle: fHandle];
+ //[fPreviewController setHBController: self];
+
[fQueueController setHandle: fQueueEncodeLibhb];
[fQueueController setHBController: self];
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *) app
{
-
+ [fPreviewController goWindowedScreen:nil];
// Warn if encoding a movie
hb_state_t s;
hb_get_state( fQueueEncodeLibhb, &s );
[outputPanel release];
[fQueueController release];
[fPictureController release];
+
+ [fPreviewController release];
hb_close(&fHandle);
hb_close(&fQueueEncodeLibhb);
}
AutoCropLeft = job->crop[2];
AutoCropRight = job->crop[3];
- /* Reset the new title in fPictureController */
+ /* Reset the new title in fPictureController && fPreviewController*/
[fPictureController SetTitle:title];
-
+ //[fPreviewController SetTitle:title];
/* Update subtitle popups */
hb_subtitle_t * subtitle;
[fSubPopUp removeAllItems];
- (IBAction) showPicturePanel: (id) sender
{
- /*
- hb_list_t * list = hb_get_titles( fHandle );
- hb_title_t * title = (hb_title_t *) hb_list_item( list,
- [fSrcTitlePopUp indexOfSelectedItem] );
- */
- //[fPictureController showPreviewPanel:sender forTitle:title];
- [fPictureController showPictureWindow:sender];
+ [fPictureController showPictureWindow:sender];
+}
+
+- (void) picturePanelFullScreen
+{
+ [fPictureController setToFullScreenMode];
+}
+
+- (void) picturePanelWindowed
+{
+ [fPictureController setToWindowedMode];
+}
+
+- (IBAction) showPreviewWindow: (id) sender
+{
+ [fPictureController showPreviewWindow:sender];
}
#pragma mark -
if (fTitle->width < [[chosenPreset objectForKey:@"PictureWidth"] intValue] || fTitle->height < [[chosenPreset objectForKey:@"PictureHeight"] intValue])
{
/* if so, then we use the sources height and width to avoid scaling up */
- job->width = fTitle->width;
- job->height = fTitle->height;
+ //job->width = fTitle->width;
+ //job->height = fTitle->height;
+ [self revertPictureSizeToMax:nil];
}
else // source width/height is >= the preset height/width
{