Skip to content

Commit 9f77476

Browse files
committed
Remove uneeded code for notifications, add status set/get methods
1 parent 0af894a commit 9f77476

File tree

3 files changed

+15
-23
lines changed

3 files changed

+15
-23
lines changed

Headers/AppKit/NSMovieView.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,13 @@ APPKIT_EXPORT_CLASS
247247
/**
248248
* GNUstep extension, this allows the user to set a
249249
* text field to monitor the status of the movie view.
250-
*
250+
*/
251251
- (void) setStatusField: (id)field;
252+
253+
/**
254+
* GNUstep extension, get the status field.
255+
*/
252256
- (id) statusField;
253-
*/
254257

255258
@end
256259

Source/GSMovieView.m

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,6 @@ - (instancetype) initWithFrame: (NSRect)frame
145145
// Flags...
146146
_running = NO;
147147
_started = NO;
148-
149-
/*
150-
[nc addObserver: self
151-
selector: @selector(handleNotification:)
152-
name: NSApplicationWillTerminateNotification
153-
object: nil];
154-
*/
155148
}
156149
return self;
157150
}
@@ -188,23 +181,9 @@ - (void)dealloc
188181
DESTROY(_audioPlayer);
189182
DESTROY(_currentFrame);
190183

191-
// Unsubscribe to NSNotification
192-
[nc removeObserver: self];
193-
194184
[super dealloc];
195185
}
196186

197-
// Notification responses...
198-
- (void) handleNotification: (NSNotification *)notification
199-
{
200-
NSLog(@"[GSMovieView] Shutting down, final pts %ld", _lastPts);
201-
202-
[_feedThread cancel];
203-
[_videoThread cancel];
204-
[_audioPlayer stopAudio];
205-
[self stopVideo];
206-
}
207-
208187
// Private methods...
209188
- (void) _startFeed
210189
{

Source/NSMovieView.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,14 @@ - (IBAction) selectAll: (id)sender
254254
{
255255
}
256256

257+
- (void) setStatusField: (id)field
258+
{
259+
ASSIGN(_statusField, field);
260+
}
261+
262+
- (id) statusField
263+
{
264+
return _statusField;
265+
}
266+
257267
@end

0 commit comments

Comments
 (0)