Commit 5a5846fe authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed volume slider appearance in black intf mode and disable the...

macosx: fixed volume slider appearance in black intf mode and disable the track slider when appropriate
parent 9b23a3ae
...@@ -245,7 +245,6 @@ EXTRA_DIST += \ ...@@ -245,7 +245,6 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow/volume-low.png \ extras/package/macosx/Resources/mainwindow/volume-low.png \
extras/package/macosx/Resources/mainwindow/volume-slider-knob.png \ extras/package/macosx/Resources/mainwindow/volume-slider-knob.png \
extras/package/macosx/Resources/mainwindow/volume-slider-track.png \ extras/package/macosx/Resources/mainwindow/volume-slider-track.png \
extras/package/macosx/Resources/mainwindow/volumetrack.png \
extras/package/macosx/Resources/mainwindow_dark/back-pressed_dark.png \ extras/package/macosx/Resources/mainwindow_dark/back-pressed_dark.png \
extras/package/macosx/Resources/mainwindow_dark/back_dark.png \ extras/package/macosx/Resources/mainwindow_dark/back_dark.png \
extras/package/macosx/Resources/mainwindow_dark/bottom-background_dark.png \ extras/package/macosx/Resources/mainwindow_dark/bottom-background_dark.png \
......
...@@ -125,7 +125,6 @@ ...@@ -125,7 +125,6 @@
CC04338F13B28B8200D7D52E /* volume-low.png in Resources */ = {isa = PBXBuildFile; fileRef = CC04335B13B28B8200D7D52E /* volume-low.png */; }; CC04338F13B28B8200D7D52E /* volume-low.png in Resources */ = {isa = PBXBuildFile; fileRef = CC04335B13B28B8200D7D52E /* volume-low.png */; };
CC04339013B28B8200D7D52E /* volume-slider-knob.png in Resources */ = {isa = PBXBuildFile; fileRef = CC04335C13B28B8200D7D52E /* volume-slider-knob.png */; }; CC04339013B28B8200D7D52E /* volume-slider-knob.png in Resources */ = {isa = PBXBuildFile; fileRef = CC04335C13B28B8200D7D52E /* volume-slider-knob.png */; };
CC04339113B28B8200D7D52E /* volume-slider-track.png in Resources */ = {isa = PBXBuildFile; fileRef = CC04335D13B28B8200D7D52E /* volume-slider-track.png */; }; CC04339113B28B8200D7D52E /* volume-slider-track.png in Resources */ = {isa = PBXBuildFile; fileRef = CC04335D13B28B8200D7D52E /* volume-slider-track.png */; };
CC04339213B28B8200D7D52E /* volumetrack.png in Resources */ = {isa = PBXBuildFile; fileRef = CC04335E13B28B8200D7D52E /* volumetrack.png */; };
CC0433A813B28B9C00D7D52E /* aiff.icns in Resources */ = {isa = PBXBuildFile; fileRef = CC04339313B28B9C00D7D52E /* aiff.icns */; }; CC0433A813B28B9C00D7D52E /* aiff.icns in Resources */ = {isa = PBXBuildFile; fileRef = CC04339313B28B9C00D7D52E /* aiff.icns */; };
CC0433A913B28B9C00D7D52E /* audio.icns in Resources */ = {isa = PBXBuildFile; fileRef = CC04339413B28B9C00D7D52E /* audio.icns */; }; CC0433A913B28B9C00D7D52E /* audio.icns in Resources */ = {isa = PBXBuildFile; fileRef = CC04339413B28B9C00D7D52E /* audio.icns */; };
CC0433AA13B28B9C00D7D52E /* avi.icns in Resources */ = {isa = PBXBuildFile; fileRef = CC04339513B28B9C00D7D52E /* avi.icns */; }; CC0433AA13B28B9C00D7D52E /* avi.icns in Resources */ = {isa = PBXBuildFile; fileRef = CC04339513B28B9C00D7D52E /* avi.icns */; };
...@@ -374,7 +373,6 @@ ...@@ -374,7 +373,6 @@
CC04335B13B28B8200D7D52E /* volume-low.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "volume-low.png"; path = "Resources/mainwindow/volume-low.png"; sourceTree = "<group>"; }; CC04335B13B28B8200D7D52E /* volume-low.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "volume-low.png"; path = "Resources/mainwindow/volume-low.png"; sourceTree = "<group>"; };
CC04335C13B28B8200D7D52E /* volume-slider-knob.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "volume-slider-knob.png"; path = "Resources/mainwindow/volume-slider-knob.png"; sourceTree = "<group>"; }; CC04335C13B28B8200D7D52E /* volume-slider-knob.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "volume-slider-knob.png"; path = "Resources/mainwindow/volume-slider-knob.png"; sourceTree = "<group>"; };
CC04335D13B28B8200D7D52E /* volume-slider-track.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "volume-slider-track.png"; path = "Resources/mainwindow/volume-slider-track.png"; sourceTree = "<group>"; }; CC04335D13B28B8200D7D52E /* volume-slider-track.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "volume-slider-track.png"; path = "Resources/mainwindow/volume-slider-track.png"; sourceTree = "<group>"; };
CC04335E13B28B8200D7D52E /* volumetrack.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = volumetrack.png; path = Resources/mainwindow/volumetrack.png; sourceTree = "<group>"; };
CC04339313B28B9C00D7D52E /* aiff.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = aiff.icns; path = Resources/icons/aiff.icns; sourceTree = "<group>"; }; CC04339313B28B9C00D7D52E /* aiff.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = aiff.icns; path = Resources/icons/aiff.icns; sourceTree = "<group>"; };
CC04339413B28B9C00D7D52E /* audio.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = audio.icns; path = Resources/icons/audio.icns; sourceTree = "<group>"; }; CC04339413B28B9C00D7D52E /* audio.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = audio.icns; path = Resources/icons/audio.icns; sourceTree = "<group>"; };
CC04339513B28B9C00D7D52E /* avi.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = avi.icns; path = Resources/icons/avi.icns; sourceTree = "<group>"; }; CC04339513B28B9C00D7D52E /* avi.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = avi.icns; path = Resources/icons/avi.icns; sourceTree = "<group>"; };
...@@ -795,7 +793,6 @@ ...@@ -795,7 +793,6 @@
CC04335B13B28B8200D7D52E /* volume-low.png */, CC04335B13B28B8200D7D52E /* volume-low.png */,
CC04335C13B28B8200D7D52E /* volume-slider-knob.png */, CC04335C13B28B8200D7D52E /* volume-slider-knob.png */,
CC04335D13B28B8200D7D52E /* volume-slider-track.png */, CC04335D13B28B8200D7D52E /* volume-slider-track.png */,
CC04335E13B28B8200D7D52E /* volumetrack.png */,
); );
name = "bright variant"; name = "bright variant";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1171,7 +1168,6 @@ ...@@ -1171,7 +1168,6 @@
CC04338F13B28B8200D7D52E /* volume-low.png in Resources */, CC04338F13B28B8200D7D52E /* volume-low.png in Resources */,
CC04339013B28B8200D7D52E /* volume-slider-knob.png in Resources */, CC04339013B28B8200D7D52E /* volume-slider-knob.png in Resources */,
CC04339113B28B8200D7D52E /* volume-slider-track.png in Resources */, CC04339113B28B8200D7D52E /* volume-slider-track.png in Resources */,
CC04339213B28B8200D7D52E /* volumetrack.png in Resources */,
CC0433A813B28B9C00D7D52E /* aiff.icns in Resources */, CC0433A813B28B9C00D7D52E /* aiff.icns in Resources */,
CC0433A913B28B9C00D7D52E /* audio.icns in Resources */, CC0433A913B28B9C00D7D52E /* audio.icns in Resources */,
CC0433AA13B28B9C00D7D52E /* avi.icns in Resources */, CC0433AA13B28B9C00D7D52E /* avi.icns in Resources */,
......
...@@ -144,7 +144,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -144,7 +144,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_time_sld_middle_view setImage: [NSImage imageNamed:@"progression-track-wrapper-middle"]]; [o_time_sld_middle_view setImage: [NSImage imageNamed:@"progression-track-wrapper-middle"]];
[o_time_sld_right_view setImage: [NSImage imageNamed:@"progression-track-wrapper-right"]]; [o_time_sld_right_view setImage: [NSImage imageNamed:@"progression-track-wrapper-right"]];
[o_volume_down_btn setImage: [NSImage imageNamed:@"volume-low"]]; [o_volume_down_btn setImage: [NSImage imageNamed:@"volume-low"]];
[o_volume_track_view setImage: [NSImage imageNamed:@"volumetrack"]]; [o_volume_track_view setImage: [NSImage imageNamed:@"volume-slider-track"]];
[o_volume_up_btn setImage: [NSImage imageNamed:@"volume-high"]]; [o_volume_up_btn setImage: [NSImage imageNamed:@"volume-high"]];
[o_effects_btn setImage: [NSImage imageNamed:@"effects-double-buttons"]]; [o_effects_btn setImage: [NSImage imageNamed:@"effects-double-buttons"]];
[o_effects_btn setAlternateImage: [NSImage imageNamed:@"effects-double-buttons-pressed"]]; [o_effects_btn setAlternateImage: [NSImage imageNamed:@"effects-double-buttons-pressed"]];
...@@ -458,7 +458,6 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -458,7 +458,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
p_input = pl_CurrentInput( VLCIntf ); p_input = pl_CurrentInput( VLCIntf );
if( p_input ) if( p_input )
{ {
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
vlc_value_t time; vlc_value_t time;
NSString * o_time; NSString * o_time;
vlc_value_t pos; vlc_value_t pos;
...@@ -479,15 +478,25 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -479,15 +478,25 @@ static VLCMainWindow *_o_sharedInstance = nil;
else else
o_time = [NSString stringWithUTF8String: secstotimestr( psz_time, (time.i_time / 1000000) )]; o_time = [NSString stringWithUTF8String: secstotimestr( psz_time, (time.i_time / 1000000) )];
if (dur == -1) {
[o_time_sld setEnabled: NO];
[o_time_sld setHidden: YES];
} else {
[o_time_sld setEnabled: YES];
[o_time_sld setHidden: NO];
}
[o_time_fld setStringValue: o_time]; [o_time_fld setStringValue: o_time];
[o_time_fld setNeedsDisplay:YES]; [o_time_fld setNeedsDisplay:YES];
// [[[[VLCMain sharedInstance] controls] fspanel] setStreamPos: f_updated andTime: o_time]; // [[[[VLCMain sharedInstance] controls] fspanel] setStreamPos: f_updated andTime: o_time];
[o_pool release]; vlc_object_release( p_input );
} }
else else
{ {
[o_time_sld setFloatValue: 0.0]; [o_time_sld setFloatValue: 0.0];
[o_time_fld setStringValue: @"00:00"]; [o_time_fld setStringValue: @"00:00"];
[o_time_sld setEnabled: NO];
[o_time_sld setHidden: YES];
} }
[self performSelectorOnMainThread:@selector(drawFancyGradientEffectForTimeSlider) withObject:nil waitUntilDone:NO]; [self performSelectorOnMainThread:@selector(drawFancyGradientEffectForTimeSlider) withObject:nil waitUntilDone:NO];
......
...@@ -1293,8 +1293,7 @@ ...@@ -1293,8 +1293,7 @@
if( ![[o_outline_view dataSource] outlineView: o_outline_view if( ![[o_outline_view dataSource] outlineView: o_outline_view
isItemExpandable: o_item] ) isItemExpandable: o_item] )
{ {
o_item = [o_outline_dict objectForKey: [NSString o_item = [o_outline_dict objectForKey: [NSString stringWithFormat: @"%p", p_item->p_parent]];
stringWithFormat: @"%p", p_item->p_parent]];
} }
/* We need to collapse the node first, since OSX refuses to recursively /* We need to collapse the node first, since OSX refuses to recursively
...@@ -1404,8 +1403,7 @@ ...@@ -1404,8 +1403,7 @@
id o_playing_item; id o_playing_item;
PL_LOCK; PL_LOCK;
o_playing_item = [o_outline_dict objectForKey: o_playing_item = [o_outline_dict objectForKey: [NSString stringWithFormat:@"%p", playlist_CurrentPlayingItem( p_playlist )]];
[NSString stringWithFormat:@"%p", playlist_CurrentPlayingItem( p_playlist )]];
PL_UNLOCK; PL_UNLOCK;
if( [self isItem: [o_playing_item pointerValue] inNode: if( [self isItem: [o_playing_item pointerValue] inNode:
...@@ -1440,10 +1438,8 @@ ...@@ -1440,10 +1438,8 @@
{ {
id o_value = [super outlineView: outlineView child: index ofItem: item]; id o_value = [super outlineView: outlineView child: index ofItem: item];
[o_outline_dict setObject:o_value forKey:[NSString stringWithFormat:@"%p", [o_outline_dict setObject:o_value forKey:[NSString stringWithFormat:@"%p", [o_value pointerValue]]];
[o_value pointerValue]]];
return o_value; return o_value;
} }
/* Required for drag & drop and reordering */ /* Required for drag & drop and reordering */
...@@ -1624,14 +1620,11 @@ ...@@ -1624,14 +1620,11 @@
PL_UNLOCK; PL_UNLOCK;
} }
[self playlistUpdated]; [self playlistUpdated];
i_row = [o_outline_view rowForItem:[o_outline_dict i_row = [o_outline_view rowForItem:[o_outline_dict objectForKey:[NSString stringWithFormat: @"%p", [[o_all_items objectAtIndex: 0] pointerValue]]]];
objectForKey:[NSString stringWithFormat: @"%p",
[[o_all_items objectAtIndex: 0] pointerValue]]]];
if( i_row == -1 ) if( i_row == -1 )
{ {
i_row = [o_outline_view rowForItem:[o_outline_dict i_row = [o_outline_view rowForItem:[o_outline_dict objectForKey:[NSString stringWithFormat: @"%p", p_new_parent]]];
objectForKey:[NSString stringWithFormat: @"%p", p_new_parent]]];
} }
[o_outline_view deselectAll: self]; [o_outline_view deselectAll: self];
......
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