Commit 1777f554 authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

macosx: display preferences windows on a level >= video window

(cherry picked from commit 7f48cb43002663d67614c08315705c3e1ff5b66e)
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 55f6ac26
...@@ -754,7 +754,11 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -754,7 +754,11 @@ static VLCMainMenu *_o_sharedInstance = nil;
- (IBAction)viewPreferences:(id)sender - (IBAction)viewPreferences:(id)sender
{ {
[[[VLCMain sharedInstance] simplePreferences] showSimplePrefs]; NSInteger i_level = NSNormalWindowLevel;
NSInteger i_video_window_level = [[[[VLCMainWindow sharedInstance] videoView] window] level];
if( i_video_window_level == NSStatusWindowLevel )
i_level = NSStatusWindowLevel;
[[[VLCMain sharedInstance] simplePreferences] showSimplePrefsWithLevel:i_level];
} }
#pragma mark - #pragma mark -
......
...@@ -1605,6 +1605,8 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1605,6 +1605,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
if( [self level] != NSNormalWindowLevel ) if( [self level] != NSNormalWindowLevel )
[self setLevel: NSNormalWindowLevel]; [self setLevel: NSNormalWindowLevel];
if( [o_detached_video_window level] != NSNormalWindowLevel )
[o_detached_video_window setLevel: NSNormalWindowLevel];
// restore alpha value to 1 for the case that macosx-opaqueness is set to < 1 // restore alpha value to 1 for the case that macosx-opaqueness is set to < 1
[self setAlphaValue:1.0]; [self setAlphaValue:1.0];
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
- (void)initStrings; - (void)initStrings;
- (void)setTitle: (NSString *) o_title_name; - (void)setTitle: (NSString *) o_title_name;
- (void)showPrefs; - (void)showPrefsWithLevel:(NSInteger)i_window_level;
- (IBAction)savePrefs: (id)sender; - (IBAction)savePrefs: (id)sender;
- (IBAction)closePrefs: (id)sender; - (IBAction)closePrefs: (id)sender;
- (IBAction)resetAll: (id)sender; - (IBAction)resetAll: (id)sender;
......
...@@ -193,8 +193,9 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -193,8 +193,9 @@ static VLCPrefs *_o_sharedMainInstance = nil;
[o_title setStringValue: o_title_name]; [o_title setStringValue: o_title_name];
} }
- (void)showPrefs - (void)showPrefsWithLevel:(NSInteger)i_window_level
{ {
[o_prefs_window setLevel: i_window_level];
[o_prefs_window center]; [o_prefs_window center];
[o_prefs_window makeKeyAndOrderFront:self]; [o_prefs_window makeKeyAndOrderFront:self];
[_rootTreeItem resetView]; [_rootTreeItem resetView];
......
...@@ -196,6 +196,7 @@ IBOutlet id o_intf_mediakeys_ckb; ...@@ -196,6 +196,7 @@ IBOutlet id o_intf_mediakeys_ckb;
- (void)initStrings; - (void)initStrings;
- (void)resetControls; - (void)resetControls;
- (void)showSimplePrefs; - (void)showSimplePrefs;
- (void)showSimplePrefsWithLevel:(NSInteger)i_window_level;
- (IBAction)buttonAction:(id)sender; - (IBAction)buttonAction:(id)sender;
- (void)sheetDidEnd:(NSWindow *)o_sheet - (void)sheetDidEnd:(NSWindow *)o_sheet
...@@ -241,4 +242,4 @@ IBOutlet id o_intf_mediakeys_ckb; ...@@ -241,4 +242,4 @@ IBOutlet id o_intf_mediakeys_ckb;
@interface VLCSimplePrefsWindow : NSWindow @interface VLCSimplePrefsWindow : NSWindow
@end @end
\ No newline at end of file
...@@ -738,6 +738,12 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na ...@@ -738,6 +738,12 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
[o_sprefs_win makeKeyAndOrderFront: self]; [o_sprefs_win makeKeyAndOrderFront: self];
} }
- (void)showSimplePrefsWithLevel:(NSInteger)i_window_level
{
[o_sprefs_win setLevel: i_window_level];
[self showSimplePrefs];
}
- (IBAction)buttonAction:(id)sender - (IBAction)buttonAction:(id)sender
{ {
if( sender == o_sprefs_cancel_btn ) if( sender == o_sprefs_cancel_btn )
...@@ -756,7 +762,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na ...@@ -756,7 +762,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
else if( sender == o_sprefs_showAll_btn ) else if( sender == o_sprefs_showAll_btn )
{ {
[o_sprefs_win orderOut: self]; [o_sprefs_win orderOut: self];
[[[VLCMain sharedInstance] preferences] showPrefs]; [[[VLCMain sharedInstance] preferences] showPrefsWithLevel:[o_sprefs_win level]];
} }
else else
msg_Warn( p_intf, "unknown buttonAction sender" ); msg_Warn( p_intf, "unknown buttonAction sender" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment