Commit 966575eb authored by Mike Houben's avatar Mike Houben Committed by Felix Paul Kühne

Removing the blue Theme on Mac OS X

git failed to apply the entire patch, sorry for the noise
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 6dc5db57
......@@ -64,47 +64,8 @@
o_repeat_off = [NSImage imageNamed:@"repeat_embedded"];
[self controlTintChanged];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector( controlTintChanged )
name: NSControlTintDidChangeNotification
object: nil];
}
- (void)controlTintChanged
{
int i_repeat = 0;
if( [o_btn_repeat image] == o_repeat_single )
i_repeat = 1;
else if( [o_btn_repeat image] == o_repeat_all )
i_repeat = 2;
if( [NSColor currentControlTint] == NSGraphiteControlTint )
{
o_repeat_single = [NSImage imageNamed:@"repeat_single_embedded_graphite"];
o_repeat_all = [NSImage imageNamed:@"repeat_embedded_graphite"];
[o_btn_shuffle setAlternateImage: [NSImage imageNamed: @"shuffle_embedded_graphite"]];
[o_btn_addNode setAlternateImage: [NSImage imageNamed: @"add_embedded_graphite"]];
}
else
{
o_repeat_single = [NSImage imageNamed:@"repeat_single_embedded_blue"];
o_repeat_all = [NSImage imageNamed:@"repeat_embedded_blue"];
[o_btn_shuffle setAlternateImage: [NSImage imageNamed: @"shuffle_embedded_blue"]];
[o_btn_addNode setAlternateImage: [NSImage imageNamed: @"add_embedded_blue"]];
}
/* update the repeat button, but keep its state */
if( i_repeat == 1 )
[self repeatOne];
else if( i_repeat == 2 )
[self repeatAll];
else
[self repeatOff];
}
- (void)dealloc
{
......
......@@ -78,12 +78,6 @@
o_img_play = [NSImage imageNamed: @"play_embedded"];
o_img_pause = [NSImage imageNamed: @"pause_embedded"];
[self controlTintChanged];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector( controlTintChanged )
name: NSControlTintDidChangeNotification
object: nil];
/* Set color of sidebar to Leopard's "Sidebar Blue" */
[o_sidebar_list setBackgroundColor: [NSColor colorWithCalibratedRed:0.820
green:0.843
......
......@@ -541,11 +541,6 @@ static VLCMain *_o_sharedMainInstance = nil;
/* take care of tint changes during runtime */
o_img_play = [NSImage imageNamed: @"play"];
o_img_pause = [NSImage imageNamed: @"pause"];
[self controlTintChanged];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector( controlTintChanged )
name: NSControlTintDidChangeNotification
object: nil];
/* init Apple Remote support */
o_remote = [[AppleRemote alloc] init];
......@@ -973,48 +968,6 @@ static NSString * VLCToolbarMediaControl = @"VLCToolbarMediaControl";
#pragma mark -
#pragma mark Other notification
- (void)controlTintChanged
{
BOOL b_playing = NO;
if( [o_btn_play alternateImage] == o_img_play_pressed )
b_playing = YES;
if( [NSColor currentControlTint] == NSGraphiteControlTint )
{
o_img_play_pressed = [NSImage imageNamed: @"play_graphite"];
o_img_pause_pressed = [NSImage imageNamed: @"pause_graphite"];
[o_btn_prev setAlternateImage: [NSImage imageNamed: @"previous_graphite"]];
[o_btn_rewind setAlternateImage: [NSImage imageNamed: @"skip_previous_graphite"]];
[o_btn_stop setAlternateImage: [NSImage imageNamed: @"stop_graphite"]];
[o_btn_ff setAlternateImage: [NSImage imageNamed: @"skip_forward_graphite"]];
[o_btn_next setAlternateImage: [NSImage imageNamed: @"next_graphite"]];
[o_btn_fullscreen setAlternateImage: [NSImage imageNamed: @"fullscreen_graphite"]];
[o_btn_playlist setAlternateImage: [NSImage imageNamed: @"playlistdrawer_graphite"]];
[o_btn_equalizer setAlternateImage: [NSImage imageNamed: @"equalizerdrawer_graphite"]];
}
else
{
o_img_play_pressed = [NSImage imageNamed: @"play_blue"];
o_img_pause_pressed = [NSImage imageNamed: @"pause_blue"];
[o_btn_prev setAlternateImage: [NSImage imageNamed: @"previous_blue"]];
[o_btn_rewind setAlternateImage: [NSImage imageNamed: @"skip_previous_blue"]];
[o_btn_stop setAlternateImage: [NSImage imageNamed: @"stop_blue"]];
[o_btn_ff setAlternateImage: [NSImage imageNamed: @"skip_forward_blue"]];
[o_btn_next setAlternateImage: [NSImage imageNamed: @"next_blue"]];
[o_btn_fullscreen setAlternateImage: [NSImage imageNamed: @"fullscreen_blue"]];
[o_btn_playlist setAlternateImage: [NSImage imageNamed: @"playlistdrawer_blue"]];
[o_btn_equalizer setAlternateImage: [NSImage imageNamed: @"equalizerdrawer_blue"]];
}
if( b_playing )
[o_btn_play setAlternateImage: o_img_play_pressed];
else
[o_btn_play setAlternateImage: o_img_pause_pressed];
}
/* Listen to the remote in exclusive mode, only when VLC is the active
application */
- (void)applicationDidBecomeActive:(NSNotification *)aNotification
......
......@@ -150,6 +150,5 @@
NSImage *_knobOn;
BOOL b_mouse_down;
}
- (void)controlTintChanged;
@end
......@@ -703,7 +703,7 @@ void _drawFrameInRect(NSRect frameRect)
@end
/*****************************************************************************
/*************************************************************************** **
* ITSliderCell
*****************************************************************************/
@implementation ITSliderCell
......@@ -712,22 +712,12 @@ void _drawFrameInRect(NSRect frameRect)
{
self = [super init];
_knobOff = [NSImage imageNamed:@"volumeslider_normal"];
[self controlTintChanged];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector( controlTintChanged )
name: NSControlTintDidChangeNotification
object: nil];
_knobOn = [NSImage imageNamed:@"volumeslider_graphite"];
b_mouse_down = FALSE;
return self;
}
- (void)controlTintChanged
{
if( [NSColor currentControlTint] == NSGraphiteControlTint )
_knobOn = [NSImage imageNamed:@"volumeslider_graphite"];
else
_knobOn = [NSImage imageNamed:@"volumeslider_blue"];
}
- (void)dealloc
{
......
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