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