Changeset 44c6d658c95fc55d3f7a9129f9dea42ee1bdf067

Show
Ignore:
Timestamp:
04/12/05 16:31:14 (3 years ago)
Author:
Benjamin Pracht <bigben@videolan.org>
git-committer:
Benjamin Pracht <bigben@videolan.org> 1113316274 +0000
git-parent:

[2d55c0f1a446fb43908664f79e273ca7e200e898]

git-author:
Benjamin Pracht <bigben@videolan.org> 1113316274 +0000
Message:

* intf.* : try to restore an a bit more intelligent behavior for the playlist toggle button (remeber previous state, for instance)
* misc.* : get rid of unused code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/macosx/intf.h

    re92df3e r44c6d65  
    235235    IBOutlet id o_dmi_previous; 
    236236    IBOutlet id o_dmi_mute; 
    237      
     237 
    238238    bool b_small_window; 
    239      
     239 
    240240    mtime_t i_end_scroll; 
     241 
     242    NSSize o_size_with_playlist; 
     243 
    241244} 
    242245 
  • modules/gui/macosx/intf.m

    rb7d9015 r44c6d65  
    398398    [self updateTogglePlaylistState]; 
    399399 
     400    o_size_with_playlist = [o_window frame].size; 
     401 
    400402    p_playlist = (playlist_t *) vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); 
    401403 
     
    15171519        b_small_window = YES; /* we know we are small, make sure this is actually set (see case below) */ 
    15181520        /* make large */ 
    1519         o_rect.size.height = 500; 
    1520          
     1521        if ( o_size_with_playlist.height > 200 ) 
     1522        { 
     1523            o_rect.size.height = o_size_with_playlist.height; 
     1524        } 
     1525        else 
     1526        { 
     1527            o_rect.size.height = 500; 
     1528            if ( o_rect.size.width == [o_window minSize].width ) 
     1529            { 
     1530                o_rect.size.width = 500; 
     1531            } 
     1532 
     1533        } 
     1534        o_rect.size.height = (o_size_with_playlist.height > 200) ? 
     1535            o_size_with_playlist.height : 500; 
    15211536        o_rect.origin.x = [o_window frame].origin.x; 
    15221537        o_rect.origin.y = [o_window frame].origin.y - o_rect.size.height + 
     
    15321547        o_rect.origin.y = [o_window frame].origin.y + 
    15331548            [o_window frame].size.height - [o_window minSize].height; 
    1534          
     1549 
    15351550        [o_playlist_view setAutoresizesSubviews: NO]; 
    15361551        [o_playlist_view removeFromSuperview]; 
     
    15571572{ 
    15581573    /* Not triggered on a window resize or maxification of the window. only by window mouse dragging resize */ 
     1574 
     1575   /*Stores the size the controller one resize, to be able to restore it when 
     1576     toggling the playlist*/ 
     1577    o_size_with_playlist = proposedFrameSize; 
     1578 
    15591579    if( proposedFrameSize.height <= 200 ) 
    15601580    { 
  • modules/gui/macosx/misc.h

    rc8044b7 r44c6d65  
    2626 *****************************************************************************/ 
    2727 
     28 
    2829@interface VLCControllerWindow : NSWindow 
    2930{ 
    30     NSSize o_size_with_playlist; 
    3131} 
    32  
    33 - (NSSize)getSizeWithPlaylist; 
    3432 
    3533@end 
  • modules/gui/macosx/misc.m

    r7c07687 r44c6d65  
    4040    backing:backingType defer:flag]; 
    4141 
    42     o_size_with_playlist = [self frame].size; 
    43  
    4442    [[VLCMain sharedInstance] updateTogglePlaylistState]; 
    4543 
     
    5048{ 
    5149    return [[VLCMain sharedInstance] hasDefinedShortcutKey:o_event]; 
    52 } 
    53  
    54 /*Stores the size the controller one resize, to be able to restore it when 
    55   toggling the playlist*/ 
    56  
    57 - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize 
    58 { 
    59     o_size_with_playlist = proposedFrameSize; 
    60  
    61     /*Callback to update the state of Playlist Toggle Button*/ 
    62     [[VLCMain sharedInstance] updateTogglePlaylistState]; 
    63  
    64     return proposedFrameSize; 
    65 } 
    66  
    67 - (NSSize)getSizeWithPlaylist 
    68 { 
    69     return o_size_with_playlist; 
    7050} 
    7151