Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
989d4737
Commit
989d4737
authored
Jan 06, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/VLC_app: Set the representedPath of the main Window.
parent
12a4698c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
0 deletions
+31
-0
extras/MacOSX/VLC_app/Sources/VLCController.m
extras/MacOSX/VLC_app/Sources/VLCController.m
+3
-0
extras/MacOSX/VLC_app/Sources/VLCMainWindow.m
extras/MacOSX/VLC_app/Sources/VLCMainWindow.m
+1
-0
extras/MacOSX/VLC_app/Sources/VLCValueTransformer.h
extras/MacOSX/VLC_app/Sources/VLCValueTransformer.h
+4
-0
extras/MacOSX/VLC_app/Sources/VLCValueTransformer.m
extras/MacOSX/VLC_app/Sources/VLCValueTransformer.m
+23
-0
No files found.
extras/MacOSX/VLC_app/Sources/VLCController.m
View file @
989d4737
...
...
@@ -49,6 +49,9 @@
VLCNonNilAsBoolTransformer
*
nonNilAsBool
;
nonNilAsBool
=
[[[
VLCNonNilAsBoolTransformer
alloc
]
init
]
autorelease
];
[
NSValueTransformer
setValueTransformer
:(
id
)
nonNilAsBool
forName
:
@"NonNilAsBoolTransformer"
];
VLCURLToRepresentedFileNameTransformer
*
urlToRepresentedFileName
;
urlToRepresentedFileName
=
[[[
VLCURLToRepresentedFileNameTransformer
alloc
]
init
]
autorelease
];
[
NSValueTransformer
setValueTransformer
:(
id
)
urlToRepresentedFileName
forName
:
@"URLToRepresentedFileNameTransformer"
];
/***********************************
* categories: Main content
...
...
extras/MacOSX/VLC_app/Sources/VLCMainWindow.m
View file @
989d4737
...
...
@@ -222,6 +222,7 @@
[
NSNumber
numberWithBool
:
NO
],
NSConditionallySetsEnabledBindingOption
,
nil
]];
[
mediaReadingProgressText
bind
:
@"value"
toObject
:
mediaPlayer
withKeyPath
:
@"time.stringValue"
options
:
nil
];
[
mediaDescriptionText
bind
:
@"value"
toObject
:
mediaPlayer
withKeyPath
:
@"description"
options
:
nil
];
[
self
bind
:
@"representedFilename"
toObject
:
mediaPlayer
withKeyPath
:
@"media.url"
options
:
[
NSDictionary
dictionaryWithObject
:
@"URLToRepresentedFileNameTransformer"
forKey
:
NSValueTransformerNameBindingOption
]];
[
self
bind
:
@"title"
toObject
:
mediaPlayer
withKeyPath
:
@"description"
options
:
nil
];
[
navigatorViewToggleButton
bind
:
@"value"
toObject
:
self
withKeyPath
:
@"navigatorViewVisible"
options
:
nil
];
...
...
extras/MacOSX/VLC_app/Sources/VLCValueTransformer.h
View file @
989d4737
...
...
@@ -32,3 +32,7 @@
}
@end
@interface
VLCURLToRepresentedFileNameTransformer
:
NSValueTransformer
{
}
@end
extras/MacOSX/VLC_app/Sources/VLCValueTransformer.m
View file @
989d4737
...
...
@@ -71,3 +71,26 @@
@end
@implementation
VLCURLToRepresentedFileNameTransformer
+
(
Class
)
transformedValueClass
{
return
[
NSURL
class
];
}
+
(
BOOL
)
allowsReverseTransformation
{
return
NO
;
}
-
(
NSString
*
)
transformedValue
:(
id
)
value
{
NSLog
(
@"%@"
,
value
);
if
(
!
[
value
isKindOfClass
:[
NSURL
class
]]
||
!
[
value
isFileURL
]
)
return
@""
;
return
[
value
path
];
}
@end
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