Commit c3ce15c7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: display the remaining time if the field was clicked once

parent 344560c7
......@@ -172,6 +172,7 @@
showMessagesPanel = id;
showVLM = id;
showWizard = id;
timeFieldWasClicked = id;
timesliderUpdate = id;
togglePlaylist = id;
viewAbout = id;
......
......@@ -21,6 +21,8 @@
<integer>4</integer>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>2416</integer>
<integer>3568</integer>
<integer>29</integer>
</array>
......
......@@ -1180,5 +1180,7 @@
{
if( [ourEvent clickCount] > 1 )
[[[VLCMain sharedInstance] getControls] goToSpecificTime: nil];
else
[[VLCMain sharedInstance] timeFieldWasClicked: self];
}
@end
......@@ -124,10 +124,11 @@ static void MsgCallback( msg_cb_data_t *, msg_item_t *, unsigned );
BOOL nib_vlm_loaded; /* VLM Panel nibfile */
IBOutlet VLControllerWindow * o_window; /* main window */
IBOutlet NSView * o_playlist_view;/* playlist view */
IBOutlet NSView * o_playlist_view; /* playlist view */
IBOutlet id o_scrollfield; /* info field */
IBOutlet NSTextField * o_timefield; /* time field */
IBOutlet NSSlider * o_timeslider; /* time slider */
BOOL b_time_remaining; /* show remaining time or playtime ? */
IBOutlet VLCEmbeddedWindow * o_embedded_window; /* Embedded Vout Window */
float f_slider; /* slider value */
float f_slider_old; /* old slider val */
......@@ -378,6 +379,7 @@ static void MsgCallback( msg_cb_data_t *, msg_item_t *, unsigned );
- (void)setSubmenusEnabled:(BOOL)b_enabled;
- (void)manageVolumeSlider;
- (IBAction)timesliderUpdate:(id)sender;
- (IBAction)timeFieldWasClicked:(id)sender;
- (IBAction)clearRecentItems:(id)sender;
- (void)openRecentItem:(id)sender;
......
......@@ -1672,6 +1672,12 @@ static void * manage_cleanup( void * args )
var_Get( p_input, "time", &time );
mtime_t dur = input_item_GetDuration( input_GetItem( p_input ) );
if( b_time_remaining && dur != -1 )
{
o_time = [NSString stringWithFormat: @"-%s", secstotimestr( psz_time, ((dur - time.i_time) / 1000000))];
}
else
o_time = [NSString stringWithUTF8String: secstotimestr( psz_time, (time.i_time / 1000000) )];
[o_timefield setStringValue: o_time];
......@@ -1950,7 +1956,14 @@ end:
var_Get( p_input, "time", &time );
mtime_t dur = input_item_GetDuration( input_GetItem( p_input ) );
if( b_time_remaining && dur != -1 )
{
o_time = [NSString stringWithFormat: @"-%s", secstotimestr( psz_time, ((dur - time.i_time) / 1000000) )];
}
else
o_time = [NSString stringWithUTF8String: secstotimestr( psz_time, (time.i_time / 1000000) )];
[o_timefield setStringValue: o_time];
[[[self getControls] getFSPanel] setStreamPos: f_updated andTime: o_time];
[o_embedded_window setTime: o_time position: f_updated];
......@@ -1959,6 +1972,12 @@ end:
pl_Release( p_intf );
}
- (IBAction)timeFieldWasClicked:(id)sender
{
b_time_remaining = !b_time_remaining;
}
#pragma mark -
#pragma mark Recent Items
......
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