Changeset 9b21679c04e34024ed9e83c7f40670f715d8d471

Show
Ignore:
Timestamp:
02/06/02 14:16:31 (6 years ago)
Author:
Christophe Massiot <massiot@videolan.org>
git-committer:
Christophe Massiot <massiot@videolan.org> 1023020191 +0000
git-parent:

[b73f6722b19f7e553f7516d7533eeed6074b6ea3]

git-author:
Christophe Massiot <massiot@videolan.org> 1023020191 +0000
Message:

* New Loop menu item in OS X interface.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib

    r91eb944 r9b21679  
    77                faster = id;  
    88                fullscreen = id;  
     9                loop = id;  
    910                maxvolume = id;  
    1011                mute = id;  
  • extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib

    r91eb944 r9b21679  
    2020    <key>IBOpenObjects</key> 
    2121    <array> 
     22        <integer>528</integer> 
    2223        <integer>29</integer> 
    23         <integer>528</integer> 
    24         <integer>21</integer> 
    2524    </array> 
    2625    <key>IBSystem Version</key> 
  • plugins/macosx/intf_controller.h

    r91eb944 r9b21679  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_controller.h,v 1.9 2002/06/02 01:20:52 massiot Exp $ 
     5 * $Id: intf_controller.h,v 1.10 2002/06/02 12:16:31 massiot Exp $ 
    66 * 
    77 * Authors: Florian G. Pflug <fgp@phlo.org> 
     
    6969- (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename; 
    7070 
    71 /* Functions atteched to user interface */ 
     71/* Functions attached to user interface */ 
    7272- (IBAction)pause:(id)sender; 
    7373- (IBAction)play:(id)sender; 
     
    7979- (IBAction)prevChannel:(id)sender; 
    8080- (IBAction)nextChannel:(id)sender; 
     81- (IBAction)loop:(id)sender; 
    8182- (IBAction)mute:(id)sender; 
    8283- (IBAction)fullscreen:(id)fullscreen; 
     
    8687- (IBAction)quit:(id)sender; 
    8788 
     89- (BOOL)validateMenuItem:(id)sender; 
     90 
    8891@end 
  • plugins/macosx/intf_controller.m

    r91eb944 r9b21679  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_controller.m,v 1.6 2002/06/02 01:20:52 massiot Exp $ 
     5 * $Id: intf_controller.m,v 1.7 2002/06/02 12:16:31 massiot Exp $ 
    66 * 
    77 * Authors: Florian G. Pflug <fgp@phlo.org> 
     
    176176} 
    177177 
     178- (IBAction)loop:(id)sender 
     179{ 
     180    NSMenuItem * item = (NSMenuItem *)sender; 
     181 
     182    [o_intf loop]; 
     183 
     184    if( p_main->p_intf->p_sys->b_loop ) 
     185    { 
     186        [item setState:NSOnState]; 
     187    } 
     188    else 
     189    { 
     190        [item setState:NSOffState]; 
     191    } 
     192} 
     193 
    178194- (IBAction)mute:(id)sender 
    179195{ 
     
    230246} 
    231247 
     248- (BOOL)validateMenuItem:(id)sender 
     249{ 
     250    NSMenuItem * o_item = (NSMenuItem *)sender; 
     251 
     252    if ( [o_item tag] == 12 || [o_item tag] == 13 ) 
     253    { 
     254        if( !config_GetIntVariable( "network-channel" ) ) 
     255        { 
     256            return NO; 
     257        } 
     258    } 
     259         
     260    return YES; 
     261} 
     262 
    232263@end 
    233264 
  • plugins/macosx/intf_macosx.m

    r91eb944 r9b21679  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_macosx.m,v 1.3 2002/06/02 01:20:52 massiot Exp $ 
     5 * $Id: intf_macosx.m,v 1.4 2002/06/02 12:16:31 massiot Exp $ 
    66 * 
    77 * Authors: Colin Delacroix <colin@zoy.org> 
     
    7070    p_intf->p_sys->i_part = 0; 
    7171    p_intf->p_sys->b_disabled_menus = 0;  
     72    p_intf->p_sys->b_loop = 0;  
    7273    p_intf->p_sys->>i_channel = 0;  
    7374 
  • plugins/macosx/intf_vlc_wrapper.h

    r91eb944 r9b21679  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_vlc_wrapper.h,v 1.9 2002/06/02 01:20:52 massiot Exp $ 
     5 * $Id: intf_vlc_wrapper.h,v 1.10 2002/06/02 12:16:31 massiot Exp $ 
    66 * 
    77 * Authors: Florian G. Pflug <fgp@phlo.org> 
     
    4545- (void)channelNext; 
    4646- (void)channelPrev; 
     47- (void)loop; 
    4748 
    4849- (void)playSlower; 
  • plugins/macosx/intf_vlc_wrapper.m

    r91eb944 r9b21679  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_vlc_wrapper.m,v 1.10 2002/06/02 01:20:52 massiot Exp $ 
     5 * $Id: intf_vlc_wrapper.m,v 1.11 2002/06/02 12:16:31 massiot Exp $ 
    66 * 
    77 * Authors: Florian G. Pflug <fgp@phlo.org> 
     
    276276} 
    277277 
     278- (void)loop 
     279{ 
     280    intf_thread_t * p_intf = p_main->p_intf; 
     281 
     282    if ( p_intf->p_sys->b_loop ) 
     283    { 
     284        intf_PlaylistDelete( p_main->p_playlist, 
     285                             p_main->p_playlist->i_size - 1 ); 
     286    } 
     287    else 
     288    { 
     289        intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,  
     290                          "vlc:loop" ); 
     291    } 
     292    p_intf->p_sys->b_loop = !p_intf->p_sys->b_loop; 
     293} 
     294 
    278295- (void)playSlower 
    279296{ 
     
    500517    int i_end = p_main->p_playlist->i_size; 
    501518    NSEnumerator *o_enum = [o_files objectEnumerator]; 
     519    intf_thread_t * p_intf = p_main->p_intf; 
     520 
     521    if ( p_intf->p_sys->b_loop ) 
     522    { 
     523        intf_PlaylistDelete( p_main->p_playlist, 
     524                             p_main->p_playlist->i_size - 1 ); 
     525    } 
    502526 
    503527    while( ( o_file = (NSString *)[o_enum nextObject] ) ) 
     
    514538 
    515539    intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); 
     540 
     541    if ( p_intf->p_sys->b_loop ) 
     542    { 
     543        intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,  
     544                          "vlc:loop" ); 
     545    } 
    516546} 
    517547 
     
    520550    NSString *o_source; 
    521551    int i_end = p_main->p_playlist->i_size; 
     552    intf_thread_t * p_intf = p_main->p_intf; 
    522553 
    523554    o_source = [NSString stringWithFormat: @"%@:%@@%d,%d",  
    524555                    o_type, o_device, i_title, i_chapter]; 
    525556 
     557    if ( p_intf->p_sys->b_loop ) 
     558    { 
     559        intf_PlaylistDelete( p_main->p_playlist, 
     560                             p_main->p_playlist->i_size - 1 ); 
     561    } 
     562 
    526563    intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, 
    527564                      [o_source fileSystemRepresentation] ); 
     
    534571 
    535572    intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); 
     573 
     574    if ( p_intf->p_sys->b_loop ) 
     575    { 
     576        intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,  
     577                          "vlc:loop" ); 
     578    } 
    536579} 
    537580 
     
    540583    NSString *o_source; 
    541584    int i_end = p_main->p_playlist->i_size; 
     585    intf_thread_t * p_intf = p_main->p_intf; 
    542586 
    543587    if( p_input_bank->pp_input[0] != NULL ) 
     
    559603    } 
    560604 
     605    if ( p_intf->p_sys->b_loop ) 
     606    { 
     607        intf_PlaylistDelete( p_main->p_playlist, 
     608                             p_main->p_playlist->i_size - 1 ); 
     609    } 
     610 
    561611    intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, 
    562612                      [o_source fileSystemRepresentation] ); 
    563613 
    564614    intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); 
     615 
     616    if ( p_intf->p_sys->b_loop ) 
     617    { 
     618        intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,  
     619                          "vlc:loop" ); 
     620    } 
    565621} 
    566622 
     
    738794    o_language_item = [[o_controls_item submenu] itemWithTitle: @"Language"];  
    739795    o_subtitle_item = [[o_controls_item submenu] itemWithTitle: @"Subtitles"];  
    740     o_next_channel_item = [[o_controls_item submenu] itemWithTag: 2];  
    741     o_prev_channel_item = [[o_controls_item submenu] itemWithTag: 1];  
     796    o_next_channel_item = [[o_controls_item submenu] itemWithTag: 13];  
     797    o_prev_channel_item = [[o_controls_item submenu] itemWithTag: 12];  
    742798 
    743799    if( p_input == NULL ) 
     
    10081064        p_input->stream.b_changed = 0; 
    10091065    } 
    1010  
    1011     if( config_GetIntVariable( "network-channel" ) ) 
    1012     { 
    1013         [o_next_channel_item setEnabled: 1]; 
    1014         [o_prev_channel_item setEnabled: 1]; 
    1015     } 
    1016     else 
    1017     { 
    1018         [o_next_channel_item setEnabled: 0]; 
    1019         [o_prev_channel_item setEnabled: 0]; 
    1020     } 
    10211066} 
    10221067 
  • plugins/macosx/macosx.h

    r91eb944 r9b21679  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: macosx.h,v 1.11 2002/06/02 01:20:52 massiot Exp $ 
     5 * $Id: macosx.h,v 1.12 2002/06/02 12:16:31 massiot Exp $ 
    66 * 
    77 * Authors: Colin Delacroix <colin@zoy.org> 
     
    4444    int i_part; 
    4545    vlc_bool_t b_disabled_menus; 
     46    vlc_bool_t b_loop; 
    4647    int i_channel; 
    4748};