Commit 2be3a2dc authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: added a 'Drop Zone' view, which is displayed when the playlist is empty

preliminary graphics..
parent 5fe636f6
......@@ -199,6 +199,8 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow/back.png \
extras/package/macosx/Resources/mainwindow/bottom-background.png \
extras/package/macosx/Resources/mainwindow/bottom-bar-mini.png \
extras/package/macosx/Resources/mainwindow/dropzone-background.png \
extras/package/macosx/Resources/mainwindow/dropzone.png \
extras/package/macosx/Resources/mainwindow/effects-double-buttons-blue.png \
extras/package/macosx/Resources/mainwindow/effects-double-buttons-pressed.png \
extras/package/macosx/Resources/mainwindow/effects-double-buttons.png \
......
......@@ -188,6 +188,7 @@
CC402F440E00ABBB006A4BA4 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC962E2C0CC7992800A56695 /* WebKit.framework */; };
CC426FD11020D44F00A32659 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC426FD01020D44F00A32659 /* Sparkle.framework */; };
CC426FD71020D47100A32659 /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CC426FD01020D44F00A32659 /* Sparkle.framework */; };
CC4EFC2D13E96BD00091D19A /* dropzone.png in Resources */ = {isa = PBXBuildFile; fileRef = CC4EFC2C13E96BD00091D19A /* dropzone.png */; };
CC5560281365CE4800D54038 /* AudioEffects.nib in Resources */ = {isa = PBXBuildFile; fileRef = CC5560261365CE4800D54038 /* AudioEffects.nib */; };
CC707EC8137474A50003010A /* SyncTracks.nib in Resources */ = {isa = PBXBuildFile; fileRef = CC707EC6137474A50003010A /* SyncTracks.nib */; };
CC78DA4413DE056700E9603C /* topbar_background.png in Resources */ = {isa = PBXBuildFile; fileRef = CC78DA4313DE056700E9603C /* topbar_background.png */; };
......@@ -198,6 +199,7 @@
CC9B43B113B29FCF000205AE /* bottom-background_dark.png in Resources */ = {isa = PBXBuildFile; fileRef = CC9B43B013B29FCF000205AE /* bottom-background_dark.png */; };
CCBE999F0F922C51000705F8 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCBE999E0F922C51000705F8 /* CoreServices.framework */; };
CCC0C2AA13A285F700AC92B3 /* VideoEffects.nib in Resources */ = {isa = PBXBuildFile; fileRef = CCC0C2A813A285F700AC92B3 /* VideoEffects.nib */; };
CCDB535D13E97D3500A1782F /* dropzone-background.png in Resources */ = {isa = PBXBuildFile; fileRef = CCDB535C13E97D3500A1782F /* dropzone-background.png */; };
CCE6439413E8CC170061B5F2 /* document-music-playlist.png in Resources */ = {isa = PBXBuildFile; fileRef = CCE6438E13E8CC170061B5F2 /* document-music-playlist.png */; };
CCE6439513E8CC170061B5F2 /* film-cast.png in Resources */ = {isa = PBXBuildFile; fileRef = CCE6438F13E8CC170061B5F2 /* film-cast.png */; };
CCE6439613E8CC170061B5F2 /* film.png in Resources */ = {isa = PBXBuildFile; fileRef = CCE6439013E8CC170061B5F2 /* film.png */; };
......@@ -438,6 +440,7 @@
CC4ED9AD0ABE07C800CA4CC5 /* add_embedded.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = add_embedded.png; path = Resources/add_embedded.png; sourceTree = "<group>"; };
CC4ED9AF0ABE07C800CA4CC5 /* repeat_embedded.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = repeat_embedded.png; path = Resources/repeat_embedded.png; sourceTree = "<group>"; };
CC4ED9B20ABE07C800CA4CC5 /* shuffle_embedded.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = shuffle_embedded.png; path = Resources/shuffle_embedded.png; sourceTree = "<group>"; };
CC4EFC2C13E96BD00091D19A /* dropzone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = dropzone.png; path = Resources/mainwindow/dropzone.png; sourceTree = "<group>"; };
CC5560231365CDC700D54038 /* AudioEffects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioEffects.h; path = ../../../modules/gui/macosx/AudioEffects.h; sourceTree = "<group>"; };
CC5560241365CDC800D54038 /* AudioEffects.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AudioEffects.m; path = ../../../modules/gui/macosx/AudioEffects.m; sourceTree = "<group>"; };
CC5560271365CE4800D54038 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Resources/English.lproj/AudioEffects.nib; sourceTree = "<group>"; };
......@@ -486,6 +489,7 @@
CCD590F110E5B73200D39094 /* dialogProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = dialogProvider.m; path = ../../../modules/gui/macosx_dialog_provider/dialogProvider.m; sourceTree = SOURCE_ROOT; };
CCD590F210E5B76300D39094 /* VLCLoginPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCLoginPanel.h; path = ../../../modules/gui/macosx_dialog_provider/VLCLoginPanel.h; sourceTree = SOURCE_ROOT; };
CCD590F310E5B76300D39094 /* VLCLoginPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCLoginPanel.m; path = ../../../modules/gui/macosx_dialog_provider/VLCLoginPanel.m; sourceTree = SOURCE_ROOT; };
CCDB535C13E97D3500A1782F /* dropzone-background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "dropzone-background.png"; path = "Resources/mainwindow/dropzone-background.png"; sourceTree = "<group>"; };
CCDBA3B313D32E200006127B /* macosx.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = macosx.m; path = ../../../modules/video_output/macosx.m; sourceTree = "<group>"; };
CCE6438E13E8CC170061B5F2 /* document-music-playlist.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "document-music-playlist.png"; path = "Resources/sidebar-icons/document-music-playlist.png"; sourceTree = "<group>"; };
CCE6438F13E8CC170061B5F2 /* film-cast.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "film-cast.png"; path = "Resources/sidebar-icons/film-cast.png"; sourceTree = "<group>"; };
......@@ -697,6 +701,8 @@
CC0430EE13B2461A00D7D52E /* 10th anniversary ui */ = {
isa = PBXGroup;
children = (
CC4EFC2C13E96BD00091D19A /* dropzone.png */,
CCDB535C13E97D3500A1782F /* dropzone-background.png */,
CC78DA4313DE056700E9603C /* topbar_background.png */,
CCE6438C13E8CC040061B5F2 /* sidebar */,
CC0432C213B2479E00D7D52E /* bright variant */,
......@@ -1234,6 +1240,8 @@
CCE6439713E8CC170061B5F2 /* music-beam.png in Resources */,
CCE6439813E8CC170061B5F2 /* network-cloud.png in Resources */,
CCE6439913E8CC170061B5F2 /* picture.png in Resources */,
CC4EFC2D13E96BD00091D19A /* dropzone.png in Resources */,
CCDB535D13E97D3500A1782F /* dropzone-background.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -56,9 +56,14 @@
IBOutlet id o_playlist_table;
IBOutlet id o_video_view;
IBOutlet id o_split_view;
IBOutlet id o_right_split_view;
IBOutlet id o_sidebar_view;
IBOutlet id o_chosen_category_lbl;
IBOutlet id o_dropzone_view;
IBOutlet id o_dropzone_btn;
IBOutlet id o_dropzone_lbl;
BOOL b_dark_interface;
BOOL b_video_playback_enabled;
int i_lastShownVolume;
......@@ -99,9 +104,12 @@
- (IBAction)volumeAction:(id)sender;
- (IBAction)effects:(id)sender;
- (IBAction)fullscreen:(id)sender;
- (IBAction)dropzoneButtonAction:(id)sender;
- (id)videoView;
- (void)setVideoplayEnabled;
- (void)showDropZone;
- (void)hideDropZone;
- (void)updateTimeSlider;
- (void)updateVolumeSlider;
- (void)updateWindow;
......
......@@ -29,6 +29,7 @@
#import "CoreInteraction.h"
#import "AudioEffects.h"
#import "MainMenu.h"
#import "open.h"
#import "controls.h" // TODO: remove me
#import "SideBarItem.h"
#import <vlc_playlist.h>
......@@ -118,6 +119,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_volume_down_btn setToolTip: _NS("Mute")];
[o_volume_up_btn setToolTip: _NS("Full Volume")];
[o_time_sld setToolTip: _NS("Position")];
[o_dropzone_btn setTitle: _NS("Open media...")];
[o_dropzone_lbl setStringValue: _NS("Drop media here")];
if (!b_dark_interface) {
[o_bottombar_view setImage: [NSImage imageNamed:@"bottom-background"]];
......@@ -206,7 +209,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setDelegate: self];
[self setExcludedFromWindowsMenu: YES];
// Set that here as IB seems to be buggy
[self setContentMinSize:NSMakeSize(500., 200.)];
[self setContentMinSize:NSMakeSize(400., 288.)];
[self setTitle: _NS("VLC media player")];
[o_playlist_btn setEnabled:NO];
......@@ -308,6 +311,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_sidebaritems addObject: internetItem];
[o_sidebar_view reloadData];
[o_sidebar_view selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:YES];
playlist_t *p_playlist = pl_Get( VLCIntf );
PL_LOCK;
if( playlist_CurrentSize( p_playlist ) < 1 )
[self showDropZone];
PL_UNLOCK;
}
#pragma mark -
......@@ -549,8 +559,26 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
}
- (IBAction)dropzoneButtonAction:(id)sender
{
[[[VLCMain sharedInstance] open] openFileGeneric];
}
#pragma mark -
#pragma mark Update interface and respond to foreign events
- (void)showDropZone
{
[o_playlist_table setHidden:YES];
[o_dropzone_view setFrame: [o_playlist_table frame]];
[o_right_split_view addSubview: o_dropzone_view];
}
- (void)hideDropZone
{
[o_playlist_table setHidden: NO];
[o_dropzone_view removeFromSuperview];
}
- (void)updateTimeSlider
{
input_thread_t * p_input;
......@@ -727,10 +755,16 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_bwd_btn setEnabled: (b_seekable || b_plmul || b_chapters)];
[[VLCMainMenu sharedInstance] setRateControlsEnabled: b_control];
[o_time_sld setEnabled: b_seekable];
[self updateTimeSlider];
[[[[VLCMain sharedInstance] controls] fspanel] setSeekable: b_seekable];
PL_LOCK;
if (playlist_CurrentSize( p_playlist ) >= 1)
[self hideDropZone];
else
[self showDropZone];
PL_UNLOCK;
}
- (void)setPause
......
......@@ -1277,6 +1277,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
{
[self playbackStatusUpdated];
[o_playlist playlistUpdated];
[o_mainwindow updateWindow];
}
- (void)updateInfoandMetaPanel
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment