[vlc-commits] Removing the blue Theme on Mac OS X

Mike Houben git at videolan.org
Thu Apr 14 09:54:09 CEST 2011


vlc | branch: master | Mike Houben <mail at crazyhstudio.net> | Thu Apr 14 09:54:03 2011 +0200| [966575eb4198a35482fc401e0f80f790939425c6] | committer: 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: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=966575eb4198a35482fc401e0f80f790939425c6
---

 modules/gui/macosx/controls.m       |   39 -----------------------------
 modules/gui/macosx/embeddedwindow.m |    6 ----
 modules/gui/macosx/intf.m           |   47 -----------------------------------
 modules/gui/macosx/misc.h           |    1 -
 modules/gui/macosx/misc.m           |   16 ++---------
 5 files changed, 3 insertions(+), 106 deletions(-)

diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index 0cf50ce..89d09cb 100644
--- a/modules/gui/macosx/controls.m
+++ b/modules/gui/macosx/controls.m
@@ -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
 {
diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m
index 88de796..1172abd 100644
--- a/modules/gui/macosx/embeddedwindow.m
+++ b/modules/gui/macosx/embeddedwindow.m
@@ -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
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 6c6461e..6789442 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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
diff --git a/modules/gui/macosx/misc.h b/modules/gui/macosx/misc.h
index a27f87c..8569d27 100644
--- a/modules/gui/macosx/misc.h
+++ b/modules/gui/macosx/misc.h
@@ -150,6 +150,5 @@
     NSImage *_knobOn;
     BOOL b_mouse_down;
 }
-- (void)controlTintChanged;
 
 @end
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 05d078d..d47142a 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -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
 {



More information about the vlc-commits mailing list