Commit 8eb81762 authored by David Fuhrmann's avatar David Fuhrmann

macosx: info panel: implement window toggling

Like all other panels.
parent a984dec8
...@@ -1357,7 +1357,7 @@ ...@@ -1357,7 +1357,7 @@
- (IBAction)showInformationPanel:(id)sender - (IBAction)showInformationPanel:(id)sender
{ {
[[[VLCMain sharedInstance] currentMediaInfoPanel] showPanel]; [[[VLCMain sharedInstance] currentMediaInfoPanel] toggleWindow:sender];
} }
#pragma mark - convinience stuff for other objects #pragma mark - convinience stuff for other objects
......
...@@ -394,7 +394,7 @@ ...@@ -394,7 +394,7 @@
- (IBAction)showInfoPanel:(id)sender - (IBAction)showInfoPanel:(id)sender
{ {
[[[VLCMain sharedInstance] currentMediaInfoPanel] showPanel]; [[[VLCMain sharedInstance] currentMediaInfoPanel] toggleWindow:sender];
} }
- (IBAction)deleteItem:(id)sender - (IBAction)deleteItem:(id)sender
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
@property (readwrite, weak) IBOutlet NSTextField *videoDecodedTextField; @property (readwrite, weak) IBOutlet NSTextField *videoDecodedTextField;
- (void)updateCocoaWindowLevel:(NSInteger)i_level; - (void)updateCocoaWindowLevel:(NSInteger)i_level;
- (void)showPanel; - (IBAction)toggleWindow:(id)sender;
- (IBAction)metaFieldChanged:(id)sender; - (IBAction)metaFieldChanged:(id)sender;
- (IBAction)saveMetaData:(id)sender; - (IBAction)saveMetaData:(id)sender;
......
...@@ -132,11 +132,14 @@ ...@@ -132,11 +132,14 @@
[self.window setLevel: i_level]; [self.window setLevel: i_level];
} }
- (void)showPanel - (IBAction)toggleWindow:(id)sender
{ {
NSInteger i_level = [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]; if ([self.window isKeyWindow])
[self.window setLevel: i_level]; [self.window orderOut:sender];
[self.window makeKeyAndOrderFront:nil]; else {
[self.window setLevel: [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]];
[self.window makeKeyAndOrderFront:sender];
}
} }
- (void)initMediaPanelStats - (void)initMediaPanelStats
......
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