Commit 9d7bec36 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* implemented the volume slider

* major speed and memory improvements to the image handling (the panel launches noticebly faster now) and controls 
* coding style fixes

- just FYI: The VLCFSVolumeSlider and VLCFSTimeSlider classes will be merged later on to add as little code duplication as possible.
parent e06a88a4
......@@ -26,10 +26,10 @@
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>2197</integer>
<integer>2730</integer>
<integer>2769</integer>
<integer>29</integer>
<integer>2416</integer>
<integer>2769</integer>
</array>
<key>IBSystem Version</key>
<string>8L127</string>
......
......@@ -44,6 +44,7 @@
- (void)setStreamTitle:(NSString *)o_title;
- (void)setStreamPos:(float) f_pos andTime:(NSString *)o_time;
- (void)setSeekable:(BOOL) b_seekable;
- (void)setVolumeLevel: (float)f_volumeLevel;
- (void)focus:(NSTimer *)timer;
- (void)unfocus:(NSTimer *)timer;
......@@ -67,8 +68,8 @@
{
NSColor *fillColor;
NSButton *o_prev, *o_next, *o_slow, *o_fast, *o_play, *o_fullscreen;
NSTextField *o_textfield, *o_textPos;
NSSlider *o_fs_timeSlider;
NSTextField *o_streamTitle_txt, *o_streamPosition_txt;
NSSlider *o_fs_timeSlider, *o_fs_volumeSlider;
}
- (id)initWithFrame:(NSRect)frameRect;
- (void)drawRect:(NSRect)rect;
......@@ -76,21 +77,31 @@
- (void)setPlay;
- (void)setPause;
- (void)setStreamTitle: (NSString *)o_title;
- (void)setStreamPos:(float) f_pos andTime:(NSString *)o_time;
- (void)setStreamPos: (float)f_pos andTime: (NSString *)o_time;
- (void)setSeekable: (BOOL)b_seekable;
- (void)setVolumeLevel: (float)f_volumeLevel;
- (IBAction)play:(id)sender;
- (IBAction)prev:(id)sender;
- (IBAction)next:(id)sender;
- (IBAction)faster:(id)sender;
- (IBAction)slower:(id)sender;
- (IBAction)fsTimeSliderUpdate:(id)sender;
- (IBAction)fsVolumeSliderUpdate:(id)sender;
@end
@interface VLCFSTimeSlider : NSSlider
{}
void drawKnobInRect(NSRect knobRect);
void drawFrameInRect(NSRect frameRect);
{
}
- (void)drawKnobInRect:(NSRect)knobRect;
- (void)drawRect:(NSRect)rect;
@end
@interface VLCFSVolumeSlider : NSSlider
{
}
- (void)drawKnobInRect:(NSRect)knobRect;
- (void)drawRect:(NSRect)rect;
@end
This diff is collapsed.
......@@ -1212,6 +1212,7 @@ static VLCMain *_o_sharedMainInstance = nil;
i_volume_step = config_GetInt( p_intf->p_libvlc, "volume-step" );
[o_volumeslider setFloatValue: (float)i_lastShownVolume / i_volume_step];
[o_volumeslider setEnabled: TRUE];
[[[self getControls] getFSPanel] setVolumeLevel: (float)i_lastShownVolume / i_volume_step];
p_intf->p_sys->b_mute = ( i_lastShownVolume == 0 );
p_intf->p_sys->b_volume_update = FALSE;
}
......
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