Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
9d6eca0c
Commit
9d6eca0c
authored
Jan 02, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/VLC_app: Better naming scheme for the different UI elements.
parent
7036039b
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
721 additions
and
704 deletions
+721
-704
extras/MacOSX/VLC_app/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/VLC_app/English.lproj/MainMenu.nib/classes.nib
+6
-6
extras/MacOSX/VLC_app/English.lproj/MainWindow.xib
extras/MacOSX/VLC_app/English.lproj/MainWindow.xib
+621
-586
extras/MacOSX/VLC_app/Sources/VLCAppBindings.m
extras/MacOSX/VLC_app/Sources/VLCAppBindings.m
+20
-20
extras/MacOSX/VLC_app/Sources/VLCController.h
extras/MacOSX/VLC_app/Sources/VLCController.h
+3
-15
extras/MacOSX/VLC_app/Sources/VLCController.m
extras/MacOSX/VLC_app/Sources/VLCController.m
+24
-34
extras/MacOSX/VLC_app/Sources/VLCMainWindow.h
extras/MacOSX/VLC_app/Sources/VLCMainWindow.h
+7
-6
extras/MacOSX/VLC_app/Sources/VLCMainWindow.m
extras/MacOSX/VLC_app/Sources/VLCMainWindow.m
+40
-37
No files found.
extras/MacOSX/VLC_app/English.lproj/MainMenu.nib/classes.nib
View file @
9d6eca0c
...
...
@@ -7,7 +7,7 @@
<dict>
<key>
ACTIONS
</key>
<dict>
<key>
detailList
ItemDoubleClicked
</key>
<key>
mediaListView
ItemDoubleClicked
</key>
<string>
id
</string>
<key>
newMainWindow
</key>
<string>
id
</string>
...
...
@@ -18,15 +18,15 @@
<string>
ObjC
</string>
<key>
OUTLETS
</key>
<dict>
<key>
categor
yList
</key>
<key>
categor
iesListView
</key>
<string>
id
</string>
<key>
detail
ItemFetchedStatus
</key>
<key>
mediaList
ItemFetchedStatus
</key>
<string>
id
</string>
<key>
detail
ItemsCount
</key>
<key>
mediaList
ItemsCount
</key>
<string>
id
</string>
<key>
detailList
</key>
<key>
mediaListView
</key>
<string>
id
</string>
<key>
detail
SearchField
</key>
<key>
mediaList
SearchField
</key>
<string>
id
</string>
<key>
fillScreenButton
</key>
<string>
id
</string>
...
...
extras/MacOSX/VLC_app/English.lproj/MainWindow.xib
View file @
9d6eca0c
This diff is collapsed.
Click to expand it.
extras/MacOSX/VLC_app/Sources/VLCAppBindings.m
View file @
9d6eca0c
...
...
@@ -28,9 +28,9 @@
/******************************************************************************
* VLCMediaDiscoverer (
MasterView
Bindings)
* VLCMediaDiscoverer (
CategoriesList
Bindings)
*/
@implementation
VLCMediaDiscoverer
(
MasterView
Bindings
)
@implementation
VLCMediaDiscoverer
(
CategoriesList
Bindings
)
+
(
void
)
initialize
{
[
VLCMediaDiscoverer
setKeys
:[
NSArray
arrayWithObject
:
@"running"
]
triggerChangeNotificationsForDependentKey
:
@"currentlyFetchingItems"
];
...
...
@@ -43,7 +43,7 @@
if
(
!
dict
)
{
dict
=
[[
NSDictionary
dictionaryWithObjectsAndKeys
:
[
NSSet
setWithObject
:
@"discoveredMedia.flatAspect"
],
@"childrenIn
MasterView
ForDetailView"
,
[
NSSet
setWithObject
:
@"discoveredMedia.flatAspect"
],
@"childrenIn
CategoriesList
ForDetailView"
,
nil
]
retain
];
}
return
[
dict
objectForKey
:
key
];
...
...
@@ -62,24 +62,24 @@
return
sdImage
;
}
/*
MasterView
specific bindings */
-
(
NSArray
*
)
childrenIn
MasterView
/*
CategoriesList
specific bindings */
-
(
NSArray
*
)
childrenIn
CategoriesList
{
return
nil
;
}
-
(
NSString
*
)
descriptionIn
MasterView
-
(
NSString
*
)
descriptionIn
CategoriesList
{
return
[
self
localizedName
];
}
-
(
VLCMediaListAspect
*
)
childrenIn
MasterView
ForDetailView
-
(
VLCMediaListAspect
*
)
childrenIn
CategoriesList
ForDetailView
{
return
[[
self
discoveredMedia
]
flatAspect
];
}
-
(
BOOL
)
editableIn
MasterView
-
(
BOOL
)
editableIn
CategoriesList
{
return
NO
;
}
-
(
BOOL
)
selectableIn
MasterView
-
(
BOOL
)
selectableIn
CategoriesList
{
return
YES
;
}
...
...
@@ -113,9 +113,9 @@
if
(
!
dict
)
{
dict
=
[[
NSDictionary
dictionaryWithObjectsAndKeys
:
[
NSSet
setWithObject
:
@"subitems.hierarchicalNodeAspect.media"
],
@"childrenIn
MasterView
"
,
[
NSSet
setWithObject
:
@"metaDictionary.title"
],
@"descriptionIn
MasterView
"
,
[
NSSet
setWithObject
:
@"subitems.flatAspect"
],
@"childrenIn
MasterView
ForDetailView"
,
[
NSSet
setWithObject
:
@"subitems.hierarchicalNodeAspect.media"
],
@"childrenIn
CategoriesList
"
,
[
NSSet
setWithObject
:
@"metaDictionary.title"
],
@"descriptionIn
CategoriesList
"
,
[
NSSet
setWithObject
:
@"subitems.flatAspect"
],
@"childrenIn
CategoriesList
ForDetailView"
,
[
NSSet
setWithObject
:
@"metaDictionary.title"
],
@"descriptionInVideoView"
,
[
NSSet
setWithObject
:
@"state"
],
@"stateAsImage"
,
nil
]
retain
];
...
...
@@ -123,28 +123,28 @@
return
[
dict
objectForKey
:
key
];
}
/*
MasterView
specific bindings */
-
(
NSArray
*
)
childrenIn
MasterView
/*
CategoriesList
specific bindings */
-
(
NSArray
*
)
childrenIn
CategoriesList
{
return
[[[
self
subitems
]
hierarchicalNodeAspect
]
valueForKeyPath
:
@"media"
];
}
-
(
void
)
setDescriptionIn
MasterView
:(
NSString
*
)
description
-
(
void
)
setDescriptionIn
CategoriesList
:(
NSString
*
)
description
{
NSLog
(
@"unimplemented: meta edition"
);
}
-
(
NSString
*
)
descriptionIn
MasterView
-
(
NSString
*
)
descriptionIn
CategoriesList
{
return
[[
self
metaDictionary
]
objectForKey
:
@"title"
];
}
-
(
VLCMediaListAspect
*
)
childrenIn
MasterView
ForDetailView
-
(
VLCMediaListAspect
*
)
childrenIn
CategoriesList
ForDetailView
{
return
[[
self
subitems
]
flatAspect
];
}
-
(
BOOL
)
editableIn
MasterView
-
(
BOOL
)
editableIn
CategoriesList
{
return
YES
;
}
-
(
BOOL
)
selectableIn
MasterView
-
(
BOOL
)
selectableIn
CategoriesList
{
return
YES
;
}
...
...
@@ -170,7 +170,7 @@
return
[[
self
metaDictionary
]
objectForKey
:
@"title"
];
}
/*
DetailList
specific bindings */
/*
mediaListView
specific bindings */
-
(
NSImage
*
)
stateAsImage
{
static
NSImage
*
playing
=
nil
;
...
...
extras/MacOSX/VLC_app/Sources/VLCController.h
View file @
9d6eca0c
...
...
@@ -25,26 +25,14 @@
#import <Cocoa/Cocoa.h>
#import <VLC/VLC.h>
#import "VLCMediaArrayController.h"
#import "VLCBrowsableVideoView.h"
@class
VLCMainWindow
;
#define VLCPanic( ex ) __VLCPanic( ex, __FUNCTION__, __FILE__, __LINE__ )
static
inline
void
__VLCPanic
(
const
char
*
str
,
const
char
*
function
,
const
char
*
file
,
int
line_number
)
{
NSRunCriticalAlertPanel
(
@"Error"
,
[
NSString
stringWithFormat
:
@"The following error was encountered: %s (%s:%d %s)"
,
str
,
file
,
line_number
,
function
],
@"Quit"
,
nil
,
nil
);
exit
(
-
1
);
}
@interface
VLCController
:
NSObject
{
NSMutableArray
*
arrayOfPlaylists
;
NSArray
*
arrayOfMasters
;
NSArray
*
arrayOfVideoViewMasters
;
NSArray
*
categories
;
}
@property
(
readonly
,
retain
)
NSArray
*
arrayOfMasters
;
@property
(
readonly
,
retain
)
NSArray
*
arrayOfVideoViewMasters
;
@property
(
readonly
,
retain
)
NSArray
*
categories
;
-
(
void
)
newMainWindow
:(
id
)
sender
;
-
(
void
)
addPlaylist
:(
id
)
sender
;
@end
extras/MacOSX/VLC_app/Sources/VLCController.m
View file @
9d6eca0c
...
...
@@ -29,16 +29,14 @@
#import "VLCValueTransformer.h"
@interface
VLCController
()
@property
(
readwrite
,
retain
)
NSArray
*
arrayOfMasters
;
@property
(
readwrite
,
retain
)
NSArray
*
arrayOfVideoViewMasters
;
@property
(
readwrite
,
retain
)
NSArray
*
categories
;
@end
/******************************************************************************
* VLCBrowsableVideoView
*/
@implementation
VLCController
@synthesize
arrayOfMasters
;
@synthesize
arrayOfVideoViewMasters
;
@synthesize
categories
;
-
(
void
)
awakeFromNib
{
...
...
@@ -53,54 +51,39 @@
[
NSValueTransformer
setValueTransformer
:(
id
)
nonNilAsBool
forName
:
@"NonNilAsBoolTransformer"
];
/***********************************
*
arrayOfMasters: MasterView OutlineView
content
*
categories: Main
content
*/
NSArray
*
arrayOfMediaDiscoverer
=
[
NSArray
arrayWithObjects
:
NSArray
*
mediaDiscoverers
=
[
NSArray
arrayWithObjects
:
[[[
VLCMediaDiscoverer
alloc
]
initWithName
:
@"shoutcasttv"
]
autorelease
],
[[[
VLCMediaDiscoverer
alloc
]
initWithName
:
@"shoutcast"
]
autorelease
],
[[[
VLCMediaDiscoverer
alloc
]
initWithName
:
@"sap"
]
autorelease
],
[[[
VLCMediaDiscoverer
alloc
]
initWithName
:
@"freebox"
]
autorelease
],
nil
];
arrayOfP
laylists
=
[
NSMutableArray
arrayWithObjects
:[
VLCMedia
mediaAsNodeWithName
:
@"Default Playlist"
],
nil
];
NSArray
*
p
laylists
=
[
NSMutableArray
arrayWithObjects
:[
VLCMedia
mediaAsNodeWithName
:
@"Default Playlist"
],
nil
];
NSDictionary
*
playlists
=
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
[
@"Playlists"
uppercaseString
],
@"descriptionIn
MasterView
"
,
[
@"Playlists"
uppercaseString
]
,
@"descriptionInVideoView"
,
[
NSNumber
numberWithBool
:
NO
],
@"selectableIn
MasterView
"
,
arrayOfPlaylists
,
@"childrenInMasterView
"
,
arrayOfP
laylists
,
@"childrenInVideoView"
,
NSDictionary
*
playlists
AsDictionary
=
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
[
@"Playlists"
uppercaseString
],
@"descriptionIn
CategoriesList
"
,
@"Playlists"
,
@"descriptionInVideoView"
,
[
NSNumber
numberWithBool
:
NO
],
@"selectableIn
CategoriesList
"
,
playlists
,
@"childrenInCategoriesList
"
,
p
laylists
,
@"childrenInVideoView"
,
nil
];
self
.
arrayOfMaster
s
=
[
NSArray
arrayWithObjects
:
self
.
categorie
s
=
[
NSArray
arrayWithObjects
:
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
[
@"Service Discovery"
uppercaseString
],
@"descriptionInMasterView"
,
[
NSNumber
numberWithBool
:
NO
],
@"selectableInMasterView"
,
arrayOfMediaDiscoverer
,
@"childrenInMasterView"
,
nil
],
playlists
,
nil
];
/***********************************
* videoView setup
*/
self
.
arrayOfVideoViewMasters
=
[
NSArray
arrayWithObjects
:
[
NSDictionary
dictionaryWithObjectsAndKeys
:
[
@"Service Discovery"
uppercaseString
],
@"descriptionInCategoriesList"
,
@"Service Discovery"
,
@"descriptionInVideoView"
,
arrayOfMediaDiscoverer
,
@"childrenInVideoView"
,
[
NSNumber
numberWithBool
:
NO
],
@"selectableInCategoriesList"
,
mediaDiscoverers
,
@"childrenInCategoriesList"
,
mediaDiscoverers
,
@"childrenInVideoView"
,
nil
],
playlists
,
playlists
AsDictionary
,
nil
];
/* Execution will continue in applicationDidFinishLaunching */
[
NSApp
setDelegate
:
self
];
}
-
(
void
)
applicationDidFinishLaunching
:(
NSNotification
*
)
notification
{
[
self
newMainWindow
:
self
];
}
-
(
void
)
newMainWindow
:(
id
)
sender
{
if
(
!
[
NSBundle
loadNibNamed
:
@"MainWindow"
owner
:
self
])
...
...
@@ -117,3 +100,10 @@
}
@end
@implementation
VLCController
(
NSAppDelegate
)
-
(
void
)
applicationDidFinishLaunching
:(
NSNotification
*
)
notification
{
[
self
newMainWindow
:
self
];
}
@end
extras/MacOSX/VLC_app/Sources/VLCMainWindow.h
View file @
9d6eca0c
...
...
@@ -26,15 +26,16 @@
#import "VLCController.h"
#import "VLCMediaArrayController.h"
#import "VLCAppAdditions.h"
#import "VLCBrowsableVideoView.h"
@interface
VLCMainWindow
:
NSWindow
{
/* IB elements */
IBOutlet
id
detail
ItemFetchedStatus
;
IBOutlet
id
detail
ItemsCount
;
IBOutlet
id
detail
SearchField
;
IBOutlet
id
mediaList
ItemFetchedStatus
;
IBOutlet
id
mediaList
ItemsCount
;
IBOutlet
id
mediaList
SearchField
;
IBOutlet
NSOutlineView
*
categor
yList
;
IBOutlet
NSTableView
*
detailList
;
IBOutlet
NSOutlineView
*
categor
iesListView
;
IBOutlet
NSTableView
*
mediaListView
;
IBOutlet
VLCBrowsableVideoView
*
videoView
;
IBOutlet
id
fillScreenButton
;
...
...
@@ -57,7 +58,7 @@
IBOutlet
VLCController
*
controller
;
/* This is a VLCController binded to the File's Owner of the nib */
/* Controllers */
NSTreeController
*
t
reeController
;
NSTreeController
*
categoriesT
reeController
;
VLCMediaArrayController
*
mediaArrayController
;
/* Window state */
...
...
extras/MacOSX/VLC_app/Sources/VLCMainWindow.m
View file @
9d6eca0c
...
...
@@ -29,9 +29,9 @@
#import "VLCAppAdditions.h"
/******************************************************************************
* VLCMainWindow (
MasterViewDataSourc
e)
* VLCMainWindow (
CategoriesListDelegat
e)
*/
@implementation
VLCMainWindow
(
MasterView
Delegate
)
@implementation
VLCMainWindow
(
CategoriesList
Delegate
)
-
(
BOOL
)
outlineView
:(
NSOutlineView
*
)
outlineView
isGroupItem
:(
id
)
item
{
return
[[
item
representedObject
]
isKindOfClass
:[
NSDictionary
class
]];
...
...
@@ -46,7 +46,10 @@
}
@end
@implementation
VLCMainWindow
(
MasterViewDataSource
)
/******************************************************************************
* VLCMainWindow (CategoriesListDataSource)
*/
@implementation
VLCMainWindow
(
CategoriesListDataSource
)
/* Drag and drop */
-
(
BOOL
)
outlineView
:(
NSOutlineView
*
)
outlineView
acceptDrop
:(
id
<
NSDraggingInfo
>
)
info
item
:(
id
)
item
childIndex
:(
NSInteger
)
index
{
...
...
@@ -113,21 +116,21 @@
mediaPlayer
=
[[
VLCMediaPlayer
alloc
]
initWithVideoView
:
videoView
];
/***********************************
*
MasterView
OutlineView content
*
CategoriesList
OutlineView content
*/
/*
t
reeController */
t
reeController
=
[[
NSTreeController
alloc
]
init
];
[
treeController
setContent
:
controller
.
arrayOfMaster
s
];
/*
categoriesT
reeController */
categoriesT
reeController
=
[[
NSTreeController
alloc
]
init
];
[
categoriesTreeController
setContent
:
controller
.
categorie
s
];
[
treeController
setChildrenKeyPath
:
@"childrenInMasterView
"
];
//[
t
reeController bind:@"contentArray" toObject:controller withKeyPath:@"arrayOfMasters" options:nil];
[
categoriesTreeController
setChildrenKeyPath
:
@"childrenInCategoriesList
"
];
//[
categoriesT
reeController bind:@"contentArray" toObject:controller withKeyPath:@"arrayOfMasters" options:nil];
/* Bind the "name" table column */
tableColumn
=
[
categor
yList
tableColumnWithIdentifier
:
@"name"
];
[
tableColumn
bind
:
@"value"
toObject
:
treeController
withKeyPath
:
@"arrangedObjects.descriptionInMasterView
"
options
:
nil
];
tableColumn
=
[
categor
iesListView
tableColumnWithIdentifier
:
@"name"
];
[
tableColumn
bind
:
@"value"
toObject
:
categoriesTreeController
withKeyPath
:
@"arrangedObjects.descriptionInCategoriesList
"
options
:
nil
];
[
tableColumn
setEditable
:
YES
];
/* FIXME: this doesn't work obviously. */
[
tableColumn
bind
:
@"editable"
toObject
:
treeController
withKeyPath
:
@"arrangedObjects.editableInMasterView
"
options
:
nil
];
[
tableColumn
bind
:
@"editable"
toObject
:
categoriesTreeController
withKeyPath
:
@"arrangedObjects.editableInCategoriesList
"
options
:
nil
];
/* Use an ImageAndTextCell in the "name" table column */
ImageAndTextCell
*
cell
=
[[
ImageAndTextCell
alloc
]
init
];
...
...
@@ -137,52 +140,52 @@
[
tableColumn
setDataCell
:
cell
];
/* Other setup */
[
categor
yList
setSelectionHighlightStyle
:
NSTableViewSelectionHighlightStyleSourceList
];
[
categor
yList
setDelegate
:
self
];
[
categor
iesListView
setSelectionHighlightStyle
:
NSTableViewSelectionHighlightStyleSourceList
];
[
categor
iesListView
setDelegate
:
self
];
[
categor
yList
registerForDraggedTypes
:[
NSArray
arrayWithObjects
:
NSFilenamesPboardType
,
NSURLPboardType
,
@"VLCMediaURLType"
,
nil
]];
[
categor
yList
setDataSource
:
self
];
[
categor
iesListView
registerForDraggedTypes
:[
NSArray
arrayWithObjects
:
NSFilenamesPboardType
,
NSURLPboardType
,
@"VLCMediaURLType"
,
nil
]];
[
categor
iesListView
setDataSource
:
self
];
/***********************************
*
detailList
setup
*
mediaListView
setup
*/
mediaArrayController
=
[[
VLCMediaArrayController
alloc
]
init
];
/* 1- Drag and drop */
[
detailList
registerForDraggedTypes
:[
NSArray
arrayWithObjects
:
NSFilenamesPboardType
,
NSURLPboardType
,
nil
]];
[
detailList
setDataSource
:
mediaArrayController
];
[
mediaListView
registerForDraggedTypes
:[
NSArray
arrayWithObjects
:
NSFilenamesPboardType
,
NSURLPboardType
,
nil
]];
[
mediaListView
setDataSource
:
mediaArrayController
];
/* 2- Double click */
[
detailList
setTarget
:
self
];
[
detailList
setDoubleAction
:
@selector
(
detailList
ItemDoubleClicked
:)];
[
mediaListView
setTarget
:
self
];
[
mediaListView
setDoubleAction
:
@selector
(
mediaListView
ItemDoubleClicked
:)];
/* 3- binding for "title" column */
tableColumn
=
[
detailList
tableColumnWithIdentifier
:
@"title"
];
tableColumn
=
[
mediaListView
tableColumnWithIdentifier
:
@"title"
];
[
tableColumn
bind
:
@"value"
toObject
:
mediaArrayController
withKeyPath
:
@"arrangedObjects.metaDictionary.title"
options
:
nil
];
/* 4- binding for "state" column */
tableColumn
=
[
detailList
tableColumnWithIdentifier
:
@"state"
];
tableColumn
=
[
mediaListView
tableColumnWithIdentifier
:
@"state"
];
[
tableColumn
bind
:
@"value"
toObject
:
mediaArrayController
withKeyPath
:
@"arrangedObjects.stateAsImage"
options
:
nil
];
/* 5- Search & Predicate */
NSMutableDictionary
*
bindingOptions
=
[
NSMutableDictionary
dictionary
];
[
bindingOptions
setObject
:
@"metaDictionary.title contains[c] $value"
forKey
:
NSPredicateFormatBindingOption
];
[
bindingOptions
setObject
:
@"No Title"
forKey
:
NSDisplayNameBindingOption
];
[
detail
SearchField
bind
:
@"predicate"
toObject
:
mediaArrayController
withKeyPath
:
@"filterPredicate"
options
:
bindingOptions
];
[
mediaList
SearchField
bind
:
@"predicate"
toObject
:
mediaArrayController
withKeyPath
:
@"filterPredicate"
options
:
bindingOptions
];
/* 6- Bind the @"contentArray" and contentMediaList of the mediaArrayController */
[
mediaArrayController
bind
:
@"contentArray"
toObject
:
treeController
withKeyPath
:
@"selection.childrenInMasterView
ForDetailView.media"
options
:
nil
];
[
mediaArrayController
bind
:
@"contentMediaList"
toObject
:
treeController
withKeyPath
:
@"selection.childrenInMasterView
ForDetailView.parentMediaList"
options
:
nil
];
[
mediaArrayController
bind
:
@"contentArray"
toObject
:
categoriesTreeController
withKeyPath
:
@"selection.childrenInCategoriesList
ForDetailView.media"
options
:
nil
];
[
mediaArrayController
bind
:
@"contentMediaList"
toObject
:
categoriesTreeController
withKeyPath
:
@"selection.childrenInCategoriesList
ForDetailView.parentMediaList"
options
:
nil
];
/* 7- Aspect */
[
detailList
setSelectionHighlightStyle
:
NSTableViewSelectionHighlightStyleSourceList
];
[
detailList
setAllowsTypeSelect
:
YES
];
[
mediaListView
setSelectionHighlightStyle
:
NSTableViewSelectionHighlightStyleSourceList
];
[
mediaListView
setAllowsTypeSelect
:
YES
];
/***********************************
* videoView setup
*/
[
videoView
setItemsTree
:
controller
.
arrayOfVideoViewMaster
s
];
[
videoView
setItemsTree
:
controller
.
categorie
s
];
[
videoView
setNodeKeyPath
:
@"childrenInVideoView"
];
[
videoView
setContentKeyPath
:
@"descriptionInVideoView"
];
[
videoView
setTarget
:
self
];
...
...
@@ -193,8 +196,8 @@
* Other interface element setup
*/
[
detail
ItemsCount
bind
:
@"displayPatternValue1"
toObject
:
mediaArrayController
withKeyPath
:
@"arrangedObjects.@count"
options
:
[
NSDictionary
dictionaryWithObject
:
@"%{value1}@ items"
forKey
:
NSDisplayPatternBindingOption
]];
[
detailItemFetchedStatus
bind
:
@"animate"
toObject
:
t
reeController
withKeyPath
:
@"selection.currentlyFetchingItems"
options
:
[
NSDictionary
dictionaryWithObject
:
@"%{value1}@ items"
forKey
:
NSDisplayPatternBindingOption
]];
[
mediaList
ItemsCount
bind
:
@"displayPatternValue1"
toObject
:
mediaArrayController
withKeyPath
:
@"arrangedObjects.@count"
options
:
[
NSDictionary
dictionaryWithObject
:
@"%{value1}@ items"
forKey
:
NSDisplayPatternBindingOption
]];
[
mediaListItemFetchedStatus
bind
:
@"animate"
toObject
:
categoriesT
reeController
withKeyPath
:
@"selection.currentlyFetchingItems"
options
:
[
NSDictionary
dictionaryWithObject
:
@"%{value1}@ items"
forKey
:
NSDisplayPatternBindingOption
]];
[
fillScreenButton
bind
:
@"value"
toObject
:
videoView
withKeyPath
:
@"fillScreen"
options
:
[
NSDictionary
dictionaryWithObject
:
NSNegateBooleanTransformerName
forKey
:
NSValueTransformerNameBindingOption
]];
[
fullScreenButton
bind
:
@"value"
toObject
:
videoView
withKeyPath
:
@"fullScreen"
options
:
nil
];
...
...
@@ -213,8 +216,8 @@
[
navigatorViewToggleButton
bind
:
@"value"
toObject
:
self
withKeyPath
:
@"navigatorViewVisible"
options
:
nil
];
/* Playlist buttons */
[
removePlaylistButton
bind
:
@"enabled"
toObject
:
treeController
withKeyPath
:
@"selection.editableInMasterView
"
options
:
nil
];
[
removePlaylistButton
setTarget
:
t
reeController
];
[
removePlaylistButton
bind
:
@"enabled"
toObject
:
categoriesTreeController
withKeyPath
:
@"selection.editableInCategoriesList
"
options
:
nil
];
[
removePlaylistButton
setTarget
:
categoriesT
reeController
];
[
removePlaylistButton
setAction
:
@selector
(
remove
:)];
[
addPlaylistButton
setTarget
:
controller
];
[
addPlaylistButton
setAction
:
@selector
(
addPlaylist
:)];
...
...
@@ -222,20 +225,20 @@
[
mainSplitView
setDelegate
:
self
];
/* Last minute setup */
[
categor
yList
expandItem
:
nil
expandChildren
:
YES
];
[
categor
yList
selectRowIndexes
:[
NSIndexSet
indexSetWithIndex
:[
categoryList
numberOfRows
]
>
0
?
[
categoryList
numberOfRows
]
-
1
:
0
]
byExtendingSelection
:
NO
];
[
categor
iesListView
expandItem
:
nil
expandChildren
:
YES
];
[
categor
iesListView
selectRowIndexes
:[
NSIndexSet
indexSetWithIndex
:[
categoriesListView
numberOfRows
]
>
0
?
[
categoriesListView
numberOfRows
]
-
1
:
0
]
byExtendingSelection
:
NO
];
}
-
(
void
)
dealloc
{
[
navigatorView
release
];
[
mediaPlayer
release
];
[
t
reeController
release
];
[
categoriesT
reeController
release
];
[
mediaArrayController
release
];
[
super
dealloc
];
}
-
(
void
)
detailList
ItemDoubleClicked
:(
id
)
sender
-
(
void
)
mediaListView
ItemDoubleClicked
:(
id
)
sender
{
[
mediaPlayer
setMedia
:[[
mediaArrayController
selectedObjects
]
objectAtIndex
:
0
]];
[
mediaPlayer
play
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment