Changeset 44c6d658c95fc55d3f7a9129f9dea42ee1bdf067
- 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
| re92df3e |
r44c6d65 |
|
| 235 | 235 | IBOutlet id o_dmi_previous; |
|---|
| 236 | 236 | IBOutlet id o_dmi_mute; |
|---|
| 237 | | |
|---|
| | 237 | |
|---|
| 238 | 238 | bool b_small_window; |
|---|
| 239 | | |
|---|
| | 239 | |
|---|
| 240 | 240 | mtime_t i_end_scroll; |
|---|
| | 241 | |
|---|
| | 242 | NSSize o_size_with_playlist; |
|---|
| | 243 | |
|---|
| 241 | 244 | } |
|---|
| 242 | 245 | |
|---|
| rb7d9015 |
r44c6d65 |
|
| 398 | 398 | [self updateTogglePlaylistState]; |
|---|
| 399 | 399 | |
|---|
| | 400 | o_size_with_playlist = [o_window frame].size; |
|---|
| | 401 | |
|---|
| 400 | 402 | p_playlist = (playlist_t *) vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); |
|---|
| 401 | 403 | |
|---|
| … | … | |
| 1517 | 1519 | b_small_window = YES; /* we know we are small, make sure this is actually set (see case below) */ |
|---|
| 1518 | 1520 | /* 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; |
|---|
| 1521 | 1536 | o_rect.origin.x = [o_window frame].origin.x; |
|---|
| 1522 | 1537 | o_rect.origin.y = [o_window frame].origin.y - o_rect.size.height + |
|---|
| … | … | |
| 1532 | 1547 | o_rect.origin.y = [o_window frame].origin.y + |
|---|
| 1533 | 1548 | [o_window frame].size.height - [o_window minSize].height; |
|---|
| 1534 | | |
|---|
| | 1549 | |
|---|
| 1535 | 1550 | [o_playlist_view setAutoresizesSubviews: NO]; |
|---|
| 1536 | 1551 | [o_playlist_view removeFromSuperview]; |
|---|
| … | … | |
| 1557 | 1572 | { |
|---|
| 1558 | 1573 | /* 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 | |
|---|
| 1559 | 1579 | if( proposedFrameSize.height <= 200 ) |
|---|
| 1560 | 1580 | { |
|---|
| rc8044b7 |
r44c6d65 |
|
| 26 | 26 | *****************************************************************************/ |
|---|
| 27 | 27 | |
|---|
| | 28 | |
|---|
| 28 | 29 | @interface VLCControllerWindow : NSWindow |
|---|
| 29 | 30 | { |
|---|
| 30 | | NSSize o_size_with_playlist; |
|---|
| 31 | 31 | } |
|---|
| 32 | | |
|---|
| 33 | | - (NSSize)getSizeWithPlaylist; |
|---|
| 34 | 32 | |
|---|
| 35 | 33 | @end |
|---|
| r7c07687 |
r44c6d65 |
|
| 40 | 40 | backing:backingType defer:flag]; |
|---|
| 41 | 41 | |
|---|
| 42 | | o_size_with_playlist = [self frame].size; |
|---|
| 43 | | |
|---|
| 44 | 42 | [[VLCMain sharedInstance] updateTogglePlaylistState]; |
|---|
| 45 | 43 | |
|---|
| … | … | |
| 50 | 48 | { |
|---|
| 51 | 49 | 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; |
|---|
| 70 | 50 | } |
|---|
| 71 | 51 | |
|---|