[vlc-commits] [Git][videolan/vlc][master] 7 commits: macosx: Add fromNibWithOwner to VLCDetachedAudioWindow
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Dec 9 10:48:45 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
805af433 by Claudio Cambra at 2023-12-09T10:31:31+00:00
macosx: Add fromNibWithOwner to VLCDetachedAudioWindow
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
8375e5be by Claudio Cambra at 2023-12-09T10:31:31+00:00
macosx: Use fromNibWithOwner instead of instantiating NSWindowController for detachedAudioWindow
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
4810c0b1 by Claudio Cambra at 2023-12-09T10:31:31+00:00
macosx: Add readonly detachedAudioWindow property to VLCMain
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
a431ffa8 by Claudio Cambra at 2023-12-09T10:31:31+00:00
macosx: Use detachedAudioWindow property from VLCMain in VLCStatusBarIcon
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1a2b8918 by Claudio Cambra at 2023-12-09T10:31:31+00:00
macosx: Add menu entry in window menu for detached audio window
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
9a335eb3 by Claudio Cambra at 2023-12-09T10:31:31+00:00
macosx: Use windowcontroller to instantiate detachedAudioWindow
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
8b9e4c58 by Claudio Cambra at 2023-12-09T10:31:31+00:00
macosx: Remove fromNibWithOwner from VLCDetachedAudioWindow
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
7 changed files:
- modules/gui/macosx/UI/MainMenu.xib
- modules/gui/macosx/main/VLCMain.h
- modules/gui/macosx/main/VLCMain.m
- modules/gui/macosx/menus/VLCMainMenu.h
- modules/gui/macosx/menus/VLCMainMenu.m
- modules/gui/macosx/menus/VLCStatusBarIcon.m
- modules/gui/macosx/windows/VLCDetachedAudioWindow.m
Changes:
=====================================
modules/gui/macosx/UI/MainMenu.xib
=====================================
@@ -41,6 +41,7 @@
<outlet property="deinterlaceMenu" destination="1029" id="9d9-tf-Xo4"/>
<outlet property="deinterlace_mode" destination="4397" id="4OM-Cr-xZk"/>
<outlet property="deinterlace_modeMenu" destination="4398" id="jXJ-Ps-xTP"/>
+ <outlet property="detachedAudioWindow" destination="pI6-7D-CgE" id="HsR-ca-6zX"/>
<outlet property="dockMenumute" destination="1623" id="MAM-1R-OFR"/>
<outlet property="dockMenunext" destination="1621" id="VAd-Gc-6Xf"/>
<outlet property="dockMenuplay" destination="1618" id="GFN-3u-ZOS"/>
@@ -731,6 +732,12 @@
<action selector="showPlaylist:" target="-2" id="Kqz-Ng-6tj"/>
</connections>
</menuItem>
+ <menuItem title="Detached Audio Window..." keyEquivalent="a" id="pI6-7D-CgE">
+ <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
+ <connections>
+ <action selector="showDetachedAudioWindow:" target="-2" id="vOc-az-9gg"/>
+ </connections>
+ </menuItem>
<menuItem title="Media Information..." keyEquivalent="i" id="1192">
<connections>
<action selector="showInformationPanel:" target="-2" id="Edf-vq-P29"/>
=====================================
modules/gui/macosx/main/VLCMain.h
=====================================
@@ -60,6 +60,7 @@ extern NSString *VLCConfigurationChangedNotification;
@class VLCLibraryController;
@class VLCPlaylistController;
@class VLCVideoOutputProvider;
+ at class VLCDetachedAudioWindow;
@interface VLCMain : NSObject
@@ -85,5 +86,6 @@ extern NSString *VLCConfigurationChangedNotification;
@property (readonly) VLCTrackSynchronizationWindowController *trackSyncPanel;
@property (readonly) VLCVideoEffectsWindowController *videoEffectsPanel;
@property (readonly) VLCVideoOutputProvider *voutProvider;
+ at property (readonly) VLCDetachedAudioWindow *detachedAudioWindow;
@end
=====================================
modules/gui/macosx/main/VLCMain.m
=====================================
@@ -43,6 +43,9 @@
#include <vlc_url.h>
#include <vlc_variables.h>
+#import "extensions/NSString+Helpers.h"
+
+#import "library/VLCLibraryController.h"
#import "library/VLCLibraryWindow.h"
#import "library/VLCLibraryWindowController.h"
@@ -50,8 +53,6 @@
#import "main/VLCMain+OldPrefs.h"
#import "main/VLCApplication.h"
-#import "extensions/NSString+Helpers.h"
-
#import "menus/VLCMainMenu.h"
#import "menus/VLCStatusBarIcon.h"
@@ -63,7 +64,6 @@
#import "panels/VLCVideoEffectsWindowController.h"
#import "panels/VLCTrackSynchronizationWindowController.h"
-#import "library/VLCLibraryController.h"
#import "playlist/VLCPlaylistController.h"
#import "playlist/VLCPlayerController.h"
#import "playlist/VLCPlaylistModel.h"
@@ -72,11 +72,12 @@
#import "preferences/prefs.h"
#import "preferences/VLCSimplePrefsController.h"
-#import "windows/extensions/VLCExtensionsManager.h"
-#import "windows/logging/VLCLogWindowController.h"
-#import "windows/convertandsave/VLCConvertAndSaveWindowController.h"
+#import "windows/VLCDetachedAudioWindow.h"
#import "windows/VLCOpenWindowController.h"
#import "windows/VLCOpenInputMetadata.h"
+#import "windows/convertandsave/VLCConvertAndSaveWindowController.h"
+#import "windows/extensions/VLCExtensionsManager.h"
+#import "windows/logging/VLCLogWindowController.h"
#import "windows/video/VLCVoutView.h"
#import "windows/video/VLCVideoOutputProvider.h"
@@ -115,6 +116,7 @@ NSString *VLCConfigurationChangedNotification = @"VLCConfigurationChangedNotific
VLCVideoEffectsWindowController *_videoEffectsPanel;
VLCConvertAndSaveWindowController *_convertAndSaveWindow;
VLCClickerManager *_clickerManager;
+ VLCDetachedAudioWindow *_detachedAudioWindow;
bool _interfaceIsTerminating; /* Makes sure applicationWillTerminate will be called only once */
}
@@ -260,7 +262,7 @@ static VLCMain *sharedInstance = nil;
if (_libraryWindowController == nil) {
_libraryWindowController = [[VLCLibraryWindowController alloc] initWithLibraryWindow];
}
-
+
[_libraryWindowController.window makeKeyAndOrderFront:nil];
if (!_p_intf)
@@ -502,4 +504,15 @@ static VLCMain *sharedInstance = nil;
return _coredialogs;
}
+- (VLCDetachedAudioWindow *)detachedAudioWindow
+{
+ if (_detachedAudioWindow == nil) {
+ NSWindowController * const windowController = [[NSWindowController alloc] initWithWindowNibName:NSStringFromClass(VLCDetachedAudioWindow.class)];
+ [windowController loadWindow];
+ _detachedAudioWindow = (VLCDetachedAudioWindow *)windowController.window;
+ }
+
+ return _detachedAudioWindow;
+}
+
@end
=====================================
modules/gui/macosx/menus/VLCMainMenu.h
=====================================
@@ -178,6 +178,7 @@
@property (readwrite, weak) IBOutlet NSMenuItem *videoeffects;
@property (readwrite, weak) IBOutlet NSMenuItem *bookmarks;
@property (readwrite, weak) IBOutlet NSMenuItem *playlist;
+ at property (readwrite, weak) IBOutlet NSMenuItem *detachedAudioWindow;
@property (readwrite, weak) IBOutlet NSMenuItem *info;
@property (readwrite, weak) IBOutlet NSMenuItem *errorsAndWarnings;
@property (readwrite, weak) IBOutlet NSMenuItem *messages;
=====================================
modules/gui/macosx/menus/VLCMainMenu.m
=====================================
@@ -21,7 +21,6 @@
*****************************************************************************/
#import "VLCMainMenu.h"
-#import "main/VLCMain.h"
#import "coreinteraction/VLCVideoFilterHelper.h"
@@ -31,6 +30,8 @@
#import "library/VLCLibraryWindow.h"
#import "library/VLCLibraryWindowController.h"
+#import "main/VLCMain.h"
+
#import "menus/renderers/VLCRendererMenuController.h"
#import "panels/VLCAudioEffectsWindowController.h"
@@ -48,6 +49,7 @@
#import "preferences/VLCSimplePrefsController.h"
#import "windows/VLCAboutWindowController.h"
+#import "windows/VLCDetachedAudioWindow.h"
#import "windows/VLCOpenWindowController.h"
#import "windows/VLCErrorWindowController.h"
#import "windows/VLCHelpWindowController.h"
@@ -480,6 +482,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
[_videoeffects setTitle: _NS("Video Effects...")];
[_bookmarks setTitle: _NS("Bookmarks...")];
[_playlist setTitle: _NS("Playlist...")];
+ [_detachedAudioWindow setTitle: _NS("Detached Audio Window...")];
[_info setTitle: _NS("Media Information...")];
[_messages setTitle: _NS("Messages...")];
[_errorsAndWarnings setTitle: _NS("Errors and Warnings...")];
@@ -1521,6 +1524,11 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
[NSWorkspace.sharedWorkspace openURL: url];
}
+- (IBAction)showDetachedAudioWindow:(id)sender
+{
+ [VLCMain.sharedInstance.detachedAudioWindow makeKeyAndOrderFront:self];
+}
+
- (IBAction)showInformationPanel:(id)sender
{
if (!_infoWindowController) {
=====================================
modules/gui/macosx/menus/VLCStatusBarIcon.m
=====================================
@@ -494,13 +494,7 @@
- (IBAction)statusBarIconShowMiniAudioPlayer:(id)sender
{
- if (!_detachedAudioWindow) {
- NSWindowController *windowController = [[NSWindowController alloc] initWithWindowNibName:@"VLCDetachedAudioWindow"];
- [windowController loadWindow];
- _detachedAudioWindow = (VLCDetachedAudioWindow *)[windowController window];
- }
-
- [_detachedAudioWindow makeKeyAndOrderFront:sender];
+ [VLCMain.sharedInstance.detachedAudioWindow makeKeyAndOrderFront:sender];
}
@end
=====================================
modules/gui/macosx/windows/VLCDetachedAudioWindow.m
=====================================
@@ -20,17 +20,23 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#import "VLCDetachedAudioWindow.h"
+
#import "extensions/NSString+Helpers.h"
+#import "extensions/NSView+VLCAdditions.h"
+
+#import "library/VLCInputItem.h"
+
#import "main/VLCMain.h"
-#import "windows/mainwindow/VLCControlsBarCommon.h"
+
#import "playlist/VLCPlaylistController.h"
#import "playlist/VLCPlayerController.h"
-#import "library/VLCInputItem.h"
+
#import "views/VLCImageView.h"
#import "views/VLCTrackingView.h"
#import "views/VLCBottomBarView.h"
-#import "VLCDetachedAudioWindow.h"
+#import "windows/mainwindow/VLCControlsBarCommon.h"
@interface VLCDetachedAudioWindow()
{
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/7b299cafcd48a9f82da90df016e91c53ad47b3a0...8b9e4c58904320a5a0d26b5ce54c5d5bf6a78126
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/7b299cafcd48a9f82da90df016e91c53ad47b3a0...8b9e4c58904320a5a0d26b5ce54c5d5bf6a78126
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