• R/O
  • SSH
  • HTTPS

xspfqt: Commit


Commit MetaInfo

Révision383 (tree)
l'heure2013-06-19 23:13:22
Auteurmasakih

Message de Log

[Mod] 再生関連をXspfQTMovieViewControllerに委譲
[FIx] 日本語リソースが腐っていたので修正

Change Summary

Modification

--- branches/divideMovieViewController/XspfQTMovieWindowController.h (revision 382)
+++ branches/divideMovieViewController/XspfQTMovieWindowController.h (revision 383)
@@ -100,8 +100,6 @@
100100 - (IBAction)nextTrack:(id)sender;
101101 - (IBAction)previousTrack:(id)sender;
102102 - (IBAction)gotoBeginningOrPreviousTrack:(id)sender;
103-- (IBAction)gotoBeginning:(id)sender;
104-- (IBAction)gotoEnd:(id)sender;
105103 - (IBAction)normalSize:(id)sender;
106104 - (IBAction)halfSize:(id)sender;
107105 - (IBAction)doubleSize:(id)sender;
@@ -109,8 +107,6 @@
109107
110108 - (IBAction)gotoThumbnailFrame:(id)sender;
111109
112-- (void)play;
113-- (void)stop;
114110 @end
115111
116112 extern NSString *XspfQTMovieDidStartNotification;
--- branches/divideMovieViewController/XspfQTMovieViewController.h (revision 382)
+++ branches/divideMovieViewController/XspfQTMovieViewController.h (revision 383)
@@ -14,6 +14,10 @@
1414
1515 @property (readonly) QTMovieView *movieView;
1616
17+- (void)play;
18+- (void)pause;
19+- (void)stop;
20+
1721 - (IBAction)play:(id)sender;
1822 - (IBAction)pause:(id)sender;
1923
--- branches/divideMovieViewController/XspfQTMovieWindowController.m (revision 382)
+++ branches/divideMovieViewController/XspfQTMovieWindowController.m (revision 383)
@@ -157,15 +157,15 @@
157157 {
158158 _movieViewController = [[XspfQTMovieViewController alloc] init];
159159 NSView *contentView = [movieViewPlaceholder superview];
160- NSView *movieView = [self.movieViewController view];
161- [movieView setFrame:[movieViewPlaceholder frame]];
162- [contentView replaceSubview:movieViewPlaceholder with:movieView];
163- movieViewPlaceholder = movieView;
164- [movieViewPlaceholder bind:@"movie"
165- toObject:self
166- withKeyPath:@"qtMovie"
167- options:nil];
160+ [self.movieViewController.movieView setFrame:[movieViewPlaceholder frame]];
161+ [contentView replaceSubview:movieViewPlaceholder with:self.movieViewController.movieView];
162+ [self.movieViewController.movieView bind:@"movie"
163+ toObject:self
164+ withKeyPath:@"qtMovie"
165+ options:nil];
166+ [self setNextResponder:self.movieViewController];
168167
168+
169169 prevMouseMovedDate = [[NSDate dateWithTimeIntervalSinceNow:0.0] retain];
170170 [[self window] setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
171171
@@ -188,7 +188,7 @@
188188
189189 doc.trackList.selectionIndex = 0;
190190 [self sizeTofitWidnow];
191- [self play];
191+ [self.movieViewController play];
192192 }
193193
194194 - (NSString *)windowTitleForDocumentDisplayName:(NSString *)displayName
@@ -261,7 +261,7 @@
261261
262262 [self synchronizeWindowTitleWithDocumentName];
263263 [self sizeTofitWidnow];
264- [self play];
264+ [self.movieViewController play];
265265 }
266266 - (QTMovie *)qtMovie
267267 {
@@ -366,18 +366,6 @@
366366 NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
367367 [nc postNotificationName:XspfQTMovieDidPauseNotification object:self];
368368 }
369-- (void)play
370-{
371- [self.movieViewController performSelectorOnMainThread:@selector(play:) withObject:self waitUntilDone:NO];
372-}
373-- (void)pause
374-{
375- [self.movieViewController performSelectorOnMainThread:@selector(pause:) withObject:self waitUntilDone:NO];
376-}
377-- (void)stop
378-{
379- [self.movieViewController performSelectorOnMainThread:@selector(pause:) withObject:self waitUntilDone:YES];
380-}
381369 - (void)enterFullScreen
382370 {
383371 NSWindow *fullscreen = [self fullscreenWindow];
@@ -505,20 +493,11 @@
505493 - (IBAction)togglePlayAndPause:(id)sender
506494 {
507495 if([[self valueForKeyPath:@"document.trackList.isPlayed"] boolValue]) {
508- [self pause];
496+ [self.movieViewController pause];
509497 } else {
510- [self play];
498+ [self.movieViewController play];
511499 }
512500 }
513-- (IBAction)gotoBeginning:(id)sender
514-{
515- [self.movieViewController gotoBeginning:sender];
516-}
517-- (IBAction)gotoEnd:(id)sender
518-{
519- [self.movieViewController gotoEnd:sender];
520-}
521-
522501 - (IBAction)turnUpVolume:(id)sender
523502 {
524503 NSNumber *cv = [self valueForKeyPath:kVolumeKeyPath];
@@ -596,7 +575,7 @@
596575 if(!QTGetTimeInterval(duration, &dur)) return;
597576
598577 if(cur > (dur * 0.01)) {
599- [self gotoBeginning:sender];
578+ [self.movieViewController gotoBeginning:sender];
600579 } else {
601580 [self previousTrack:sender];
602581 }
--- branches/divideMovieViewController/XspfQTMovieViewController.m (revision 382)
+++ branches/divideMovieViewController/XspfQTMovieViewController.m (revision 383)
@@ -27,6 +27,20 @@
2727 return (QTMovieView *)[self view];
2828 }
2929
30+
31+- (void)play
32+{
33+ [self performSelectorOnMainThread:@selector(play:) withObject:self waitUntilDone:NO];
34+}
35+- (void)pause
36+{
37+ [self performSelectorOnMainThread:@selector(pause:) withObject:self waitUntilDone:NO];
38+}
39+- (void)stop
40+{
41+ [self performSelectorOnMainThread:@selector(pause:) withObject:self waitUntilDone:YES];
42+}
43+
3044 - (IBAction)play:(id)sender
3145 {
3246 [self.movieView play:sender];
Afficher sur ancien navigateur de dépôt.