]> git.sesse.net Git - vlc/commitdiff
Applies part of patch from Tom Maguire. Adds controls for 1min/5min forward / backwar...
authorBenjamin Pracht <bigben@videolan.org>
Mon, 15 Mar 2004 23:15:48 +0000 (23:15 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Mon, 15 Mar 2004 23:15:48 +0000 (23:15 +0000)
THANKS
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
modules/gui/macosx/controls.h
modules/gui/macosx/controls.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

diff --git a/THANKS b/THANKS
index 9da69ea3d29707b73375cf36a6b7b736600b1c65..0a315dbd2ebe805e1e1ef2098576fc865540056d 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -87,3 +87,4 @@ Watanabe Go <go@dsl.gr.jp> - fix for non-ASCII filenames
 Xavier Maillard <zedek@fxgsproject.org> - audio converters
 Xavier Marchesini <xav@alarue.net> - Win32 fixes
 Yves Duret <yves@zarb.org> - RPM packages
+Bob Maguire <maguirer at rjmaguire dot com> - addition of some controls to the OSX interface
index 8c1f8170e5582a1b9705383361eaa64201f09fea..f55c9427efe8ced9fd53c3a1bcdef27d075aee4a 100644 (file)
         {
             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; 
                 "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; 
                 "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; 
                 "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; 
index e7fc769ec563df40fa846aa21fe8009812109114..9c998bbc16e49ab2ad755305fbdf03424665bdd7 100644 (file)
@@ -3,13 +3,13 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>561 168 505 541 0 0 1024 746 </string>
+       <string>494 131 505 541 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>1617</key>
                <string>410 345 104 149 0 0 800 578 </string>
                <key>29</key>
-               <string>73 518 419 44 0 0 800 578 </string>
+               <string>17 579 419 44 0 0 1024 746 </string>
                <key>915</key>
                <string>212 486 103 130 0 0 1024 746 </string>
        </dict>
@@ -19,9 +19,8 @@
        <array/>
        <key>IBOpenObjects</key>
        <array>
-               <integer>1530</integer>
+               <integer>29</integer>
                <integer>21</integer>
-               <integer>915</integer>
        </array>
        <key>IBSystem Version</key>
        <string>7D24</string>
index a0d57594319264c040a1ca667ae395540ee18d0a..d99f4860033f7008380ba1b71be97843ade269d2 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index aea4624d7c9e0aa69c520bd88d8d846f05b29e0b..18fe288c679dc0ae982beab0b804ecca66509baf 100644 (file)
 
 - (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;
index 6ab7a8fc9d45d490dbbd0770941af6524ed3fc6a..72efa55505f08d669de0b73e4b8940a97922d024 100644 (file)
         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 );
     }
 }
         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 );
     }
 }
index 184203b7f8c829bf312ce3f453a521767a8d4415..0ab06f054f32f4a04ddeafcb06bfeebafc538fda 100644 (file)
@@ -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;
index 6ebab401fced22c09e3efd04319af85bca9936fe..18349dee8ed245276d4b982053f25210df96b0aa 100644 (file)
@@ -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")];