Commit 7f48cb43 authored by David Fuhrmann's avatar David Fuhrmann

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

parent 41631564
...@@ -855,7 +855,11 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -855,7 +855,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 -
......
...@@ -1859,6 +1859,8 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1859,6 +1859,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;
......
...@@ -195,8 +195,9 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -195,8 +195,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
......
...@@ -740,6 +740,12 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na ...@@ -740,6 +740,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 )
...@@ -762,7 +768,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na ...@@ -762,7 +768,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