From: Benjamin Pracht Date: Mon, 15 Mar 2004 23:15:48 +0000 (+0000) Subject: Applies part of patch from Tom Maguire. Adds controls for 1min/5min forward / backwar... X-Git-Tag: 0.7.2~655 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d48f97db9c620418063cdb22a6083f91d59e2d6c;p=vlc Applies part of patch from Tom Maguire. Adds controls for 1min/5min forward / backward, and add menu items for them in the control menu. It might make it a bit uinclear. Please make any comment. --- diff --git a/THANKS b/THANKS index 9da69ea3d2..0a315dbd2e 100644 --- a/THANKS +++ b/THANKS @@ -87,3 +87,4 @@ Watanabe Go - fix for non-ASCII filenames Xavier Maillard - audio converters Xavier Marchesini - Win32 fixes Yves Duret - RPM packages +Bob Maguire - addition of some controls to the OSX interface diff --git a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib index 8c1f8170e5..f55c9427ef 100644 --- a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib +++ b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib @@ -22,13 +22,18 @@ { ACTIONS = { backward = id; + backward1Min = id; + backward5Min = id; faster = id; forward = id; + forward1Min = id; + forward5Min = id; loop = id; mute = id; next = id; pause = id; play = id; + position = id; prev = id; random = id; repeat = id; @@ -101,6 +106,8 @@ "o_mi_audiotrack" = id; "o_mi_bring_atf" = id; "o_mi_bwd" = id; + "o_mi_bwd1m" = id; + "o_mi_bwd5m" = id; "o_mi_channels" = id; "o_mi_chapter" = id; "o_mi_clear" = id; @@ -117,6 +124,8 @@ "o_mi_floatontop" = id; "o_mi_fullscreen" = id; "o_mi_fwd" = id; + "o_mi_fwd1m" = id; + "o_mi_fwd5m" = id; "o_mi_half_window" = id; "o_mi_hide" = id; "o_mi_hide_others" = id; @@ -137,6 +146,7 @@ "o_mi_paste" = id; "o_mi_play" = id; "o_mi_playlist" = id; + "o_mi_position" = id; "o_mi_prefs" = id; "o_mi_previous" = id; "o_mi_program" = id; diff --git a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib index e7fc769ec5..9c998bbc16 100644 --- a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib +++ b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib @@ -3,13 +3,13 @@ IBDocumentLocation - 561 168 505 541 0 0 1024 746 + 494 131 505 541 0 0 1024 746 IBEditorPositions 1617 410 345 104 149 0 0 800 578 29 - 73 518 419 44 0 0 800 578 + 17 579 419 44 0 0 1024 746 915 212 486 103 130 0 0 1024 746 @@ -19,9 +19,8 @@ IBOpenObjects - 1530 + 29 21 - 915 IBSystem Version 7D24 diff --git a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib index a0d5759431..d99f486003 100644 Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ diff --git a/modules/gui/macosx/controls.h b/modules/gui/macosx/controls.h index aea4624d7c..18fe288c67 100644 --- a/modules/gui/macosx/controls.h +++ b/modules/gui/macosx/controls.h @@ -48,6 +48,10 @@ - (IBAction)forward:(id)sender; - (IBAction)backward:(id)sender; +- (IBAction)forward1Min:(id)sender; +- (IBAction)backward1Min:(id)sender; +- (IBAction)forward5Min:(id)sender; +- (IBAction)backward5Min:(id)sender; - (IBAction)volumeUp:(id)sender; - (IBAction)volumeDown:(id)sender; diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m index 6ab7a8fc9d..72efa55505 100644 --- a/modules/gui/macosx/controls.m +++ b/modules/gui/macosx/controls.m @@ -256,6 +256,37 @@ vlc_value_t time; time.i_time = 10 * 1000000; var_Set( p_input, "time-offset", time ); + vout_OSDMessage( p_intf, _( "Jump +10 Seconds" ) ); + vlc_object_release( p_input ); + } +} + +- (IBAction)forward1Min:(id)sender +{ + intf_thread_t * p_intf = [NSApp getIntf]; + input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, + FIND_ANYWHERE ); + if( p_input != NULL ) + { + vlc_value_t time; + time.i_time = 60 * 1000000; + var_Set( p_input, "time-offset", time ); + vout_OSDMessage( p_intf, _( "Jump +1 Minute" ) ); + vlc_object_release( p_input ); + } +} + +- (IBAction)forward5Min:(id)sender +{ + intf_thread_t * p_intf = [NSApp getIntf]; + input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, + FIND_ANYWHERE ); + if( p_input != NULL ) + { + vlc_value_t time; + time.i_time = 300 * 1000000; + var_Set( p_input, "time-offset", time ); + vout_OSDMessage( p_intf, _( "Jump +5 Minutes" ) ); vlc_object_release( p_input ); } } @@ -270,6 +301,37 @@ vlc_value_t time; time.i_time = -10 * 1000000; var_Set( p_input, "time-offset", time ); + vout_OSDMessage( p_intf, _( "Jump -10 Seconds" ) ); + vlc_object_release( p_input ); + } +} + +- (IBAction)backward1Min:(id)sender +{ + intf_thread_t * p_intf = [NSApp getIntf]; + input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, + FIND_ANYWHERE ); + if( p_input != NULL ) + { + vlc_value_t time; + time.i_time = -60 * 1000000; + var_Set( p_input, "time-offset", time ); + vout_OSDMessage( p_intf, _( "Jump -1 Minute" ) ); + vlc_object_release( p_input ); + } +} + +- (IBAction)backward5Min:(id)sender +{ + intf_thread_t * p_intf = [NSApp getIntf]; + input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, + FIND_ANYWHERE ); + if( p_input != NULL ) + { + vlc_value_t time; + time.i_time = -300 * 1000000; + var_Set( p_input, "time-offset", time ); + vout_OSDMessage( p_intf, _( "Jump -5 Minutes" ) ); vlc_object_release( p_input ); } } diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h index 184203b7f8..0ab06f054f 100644 --- a/modules/gui/macosx/intf.h +++ b/modules/gui/macosx/intf.h @@ -170,6 +170,10 @@ struct intf_sys_t IBOutlet id o_mi_loop; IBOutlet id o_mi_fwd; IBOutlet id o_mi_bwd; + IBOutlet id o_mi_fwd1m; + IBOutlet id o_mi_bwd1m; + IBOutlet id o_mi_fwd5m; + IBOutlet id o_mi_bwd5m; IBOutlet id o_mi_program; IBOutlet id o_mu_program; IBOutlet id o_mi_title; diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 6ebab401fc..18349dee8e 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -411,6 +411,18 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key ) i_key = config_GetInt( p_intf, "key-jump-10sec" ); [o_mi_bwd setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]]; [o_mi_bwd setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)]; + i_key = config_GetInt( p_intf, "key-jump+1min" ); + [o_mi_fwd1m setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]]; + [o_mi_fwd1m setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)]; + i_key = config_GetInt( p_intf, "key-jump-1min" ); + [o_mi_bwd1m setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]]; + [o_mi_bwd1m setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)]; + i_key = config_GetInt( p_intf, "key-jump+5min" ); + [o_mi_fwd5m setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]]; + [o_mi_fwd5m setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)]; + i_key = config_GetInt( p_intf, "key-jump-5min" ); + [o_mi_bwd5m setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]]; + [o_mi_bwd5m setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)]; i_key = config_GetInt( p_intf, "key-vol-up" ); [o_mi_vol_up setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]]; [o_mi_vol_up setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)]; @@ -488,8 +500,13 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key ) [o_mi_random setTitle: _NS("Random")]; [o_mi_repeat setTitle: _NS("Repeat One")]; [o_mi_loop setTitle: _NS("Repeat All")]; - [o_mi_fwd setTitle: _NS("Step Forward")]; - [o_mi_bwd setTitle: _NS("Step Backward")]; + [o_mi_fwd setTitle: _NS("Forward 10 Seconds")]; + [o_mi_bwd setTitle: _NS("Backward 10 Seconds")]; + [o_mi_fwd1m setTitle: _NS("Forward 1 Minute")]; + [o_mi_bwd1m setTitle: _NS("Backward 1 Minute")]; + [o_mi_fwd5m setTitle: _NS("Forward 5 Minutes")]; + [o_mi_bwd5m setTitle: _NS("Backward 5 Minutes")]; + [o_mi_program setTitle: _NS("Program")]; [o_mu_program setTitle: _NS("Program")]; [o_mi_title setTitle: _NS("Title")];