[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: Extract setup code in VLCVoutView initWithFrame to separate method
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed May 10 05:22:41 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a0f1f56e by Claudio Cambra at 2023-05-09T23:12:07+00:00
macosx: Extract setup code in VLCVoutView initWithFrame to separate method
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
c585c486 by Claudio Cambra at 2023-05-09T23:12:07+00:00
macosx: Implement awakeFromNib in VLCVoutView
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/windows/video/VLCVoutView.m
Changes:
=====================================
modules/gui/macosx/windows/video/VLCVoutView.m
=====================================
@@ -76,18 +76,28 @@
-(id)initWithFrame:(NSRect)frameRect
{
- if (self = [super initWithFrame:frameRect]) {
- [self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
- i_lastScrollWheelDirection = 0;
- f_cumulated_magnification = 0.0;
- VLCMain *mainInstance = [VLCMain sharedInstance];
- _playerController = [[mainInstance playlistController] playerController];
- _hotkeysController = [[VLCHotkeysController alloc] init];
+ self = [super initWithFrame:frameRect];
+ if (self) {
+ [self setup];
}
-
return self;
}
+- (void)awakeFromNib
+{
+ [self setup];
+}
+
+- (void)setup
+{
+ [self registerForDraggedTypes:@[NSFilenamesPboardType]];
+ i_lastScrollWheelDirection = 0;
+ f_cumulated_magnification = 0.0;
+
+ _playerController = VLCMain.sharedInstance.playlistController.playerController;
+ _hotkeysController = [[VLCHotkeysController alloc] init];
+}
+
- (void)drawRect:(NSRect)rect
{
// Draw black area in case first frame is not drawn yet
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/38a99dfc5101e6ca2e749aae49ddb347f5ff5eca...c585c486dea97c169c56eef9ef674887ec368ee7
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/38a99dfc5101e6ca2e749aae49ddb347f5ff5eca...c585c486dea97c169c56eef9ef674887ec368ee7
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list