From 4b34812010cc004e3cb6c8f8d2f5626e0a114774 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Sun, 29 Jun 2003 00:14:50 +0000 Subject: [PATCH] * modules/gui/macosx/playlist.m: 10.1 is archaic. i don't know why i bother ;) finally fixed, confirmed etc. * doc/fortunes.txt: one more --- doc/fortunes.txt | 6 ++++++ modules/gui/macosx/playlist.m | 25 +++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/doc/fortunes.txt b/doc/fortunes.txt index 4da954f4f6..9b703a7132 100644 --- a/doc/fortunes.txt +++ b/doc/fortunes.txt @@ -490,3 +490,9 @@ the Boston strangler is to the woman home alone. -- #videolan % +17:07 < JediMaster> sh-2.03# reboot +17:07 < JediMaster> Segmentation fault +17:07 < JediMaster> that's not good + + -- #videolan +% diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index 33f0088c01..0d6cdc04f6 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -2,7 +2,7 @@ * playlist.m: MacOS X interface plugin ***************************************************************************** * Copyright (C) 2002-2003 VideoLAN - * $Id: playlist.m,v 1.25 2003/06/02 12:42:15 hartman Exp $ + * $Id: playlist.m,v 1.26 2003/06/29 00:14:50 hartman Exp $ * * Authors: Jon Lech Johansen * Derk-Jan Hartman @@ -28,10 +28,13 @@ #include /* malloc(), free() */ #include /* for MAXPATHLEN */ #include +#include #include "intf.h" #include "playlist.h" +int MacVersion102 = -1; + /***************************************************************************** * VLCPlaylistView implementation *****************************************************************************/ @@ -126,18 +129,24 @@ o_new_rect.size.height = f_height; o_new_rect.origin.x = o_rect.origin.x; o_new_rect.origin.y = i_row * f_height; - - if ( o_striped_row_color == nil ) + + if( ( MacVersion102 < 0 ) && ( floor( NSAppKitVersionNumber ) > NSAppKitVersionNumber10_1 ) ) + { + MacVersion102 = 102; + } + + if ( MacVersion102 == 102 && o_striped_row_color == nil ) { o_striped_row_color = [[[NSColor alternateSelectedControlColor] highlightWithLevel: 0.90] retain]; - if ( o_striped_row_color == nil ) - { - /* OSX 10.1 and before ain't that smart ;) */ - o_striped_row_color = [[NSColor whiteColor] retain]; - } } + else if ( o_striped_row_color == nil ) + { + /* OSX 10.1 and before ain't that smart ;) */ + o_striped_row_color = [[NSColor whiteColor] retain]; + } + [o_striped_row_color set]; while ( o_new_rect.origin.y < f_origin_y ) { -- 2.39.2