[HBPreferencesController registerUserDefaults];
fHandle = NULL;
outputPanel = [[HBOutputPanelController alloc] init];
- fPictureController = [[PictureController alloc] init];
+ fPictureController = [[PictureController alloc] initWithDelegate:self];
fQueueController = [[HBQueueController alloc] init];
fAdvancedOptions = [[HBAdvancedController alloc] init];
return self;
fChapterTitlesDelegate = [[ChapterTitles alloc] init];
[fChapterTable setDataSource:fChapterTitlesDelegate];
- /* Call UpdateUI every 2/10 sec */
+ /* Call UpdateUI every 1/2 sec */
[[NSRunLoop currentRunLoop] addTimer: [NSTimer
- scheduledTimerWithTimeInterval: 0.2 target: self
- selector: @selector( updateUI: ) userInfo: NULL repeats: FALSE]
- forMode: NSModalPanelRunLoopMode];
+ scheduledTimerWithTimeInterval: 0.5 target: self
+ selector: @selector( updateUI: ) userInfo: NULL repeats: YES]
+ forMode: NSEventTrackingRunLoopMode];
if( ( build = hb_check_update( fHandle, &version ) ) > -1 )
{
- (void) updateUI: (NSTimer *) timer
{
-hb_list_t * list;
-list = hb_get_titles( fHandle );
+ hb_list_t * list;
+ list = hb_get_titles( fHandle );
/* 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 */
{
[fQueueStatus setStringValue: @""];
}
-
- [[NSRunLoop currentRunLoop] addTimer: [NSTimer
- scheduledTimerWithTimeInterval: 0.5 target: self
- selector: @selector( updateUI: ) userInfo: NULL repeats: FALSE]
- forMode: NSModalPanelRunLoopMode];
}
- (IBAction) showNewScan:(id)sender
if( returnCode == NSOKButton )
{
[fDstFile2Field setStringValue: [sheet filename]];
-
}
}
hb_list_t * list = hb_get_titles( fHandle );
hb_title_t * title = (hb_title_t *) hb_list_item( list,
[fSrcTitlePopUp indexOfSelectedItem] );
-
[fPictureController showPanelInWindow:fWindow forTitle:title];
-
- [self calculatePictureSizing: sender];
+}
+
+- (void)pictureSettingsDidChange {
+ [self calculatePictureSizing: NULL];
}
- (void) PrepareJob
{
hb_list_t * list = hb_get_titles( fHandle );
hb_title_t * title = (hb_title_t*)
- hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] );
+ hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] );
/* If Auto Naming is on. We create an output filename of dvd name - title number */
/* Pixel Ratio Setting */
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"PixelRatio"])
{
-
job->pixel_ratio = 1 ;
}
else
}
-
hb_list_t * list = hb_get_titles( fHandle );
hb_title_t * title = (hb_title_t *)
hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] );
@implementation PictureController
+- (id)initWithDelegate:(id)del
+{
+ if (self = [super init])
+ {
+ delegate = del;
+ }
+ return self;
+}
+
- (void) SetHandle: (hb_handle_t *) handle
{
fHandle = handle;
{
[self Display: HB_ANIMATE_NONE];
}
-
}
- (IBAction) PreviousPicture: (id) sender
- (IBAction) ClosePanel: (id) sender
{
+ if ([delegate respondsToSelector:@selector(pictureSettingsDidChange)])
+ [delegate pictureSettingsDidChange];
+
[NSApp endSheet: fPicturePanel];
[fPicturePanel orderOut: self];
}