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
2d47c8c0
Commit
2d47c8c0
authored
Aug 02, 2015
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: Convert VLCOpen to NSWindowController subclass
parent
3a07082a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
24 deletions
+31
-24
extras/package/macosx/Resources/English.lproj/Open.xib
extras/package/macosx/Resources/English.lproj/Open.xib
+3
-3
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+2
-4
modules/gui/macosx/open.h
modules/gui/macosx/open.h
+1
-3
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+25
-14
No files found.
extras/package/macosx/Resources/English.lproj/Open.xib
View file @
2d47c8c0
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.Cocoa.XIB"
version=
"3.0"
toolsVersion=
"
8152.3"
systemVersion=
"14F6
a"
targetRuntime=
"MacOSX.Cocoa"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.Cocoa.XIB"
version=
"3.0"
toolsVersion=
"
7706"
systemVersion=
"14F19
a"
targetRuntime=
"MacOSX.Cocoa"
propertyAccessControl=
"none"
>
<dependencies>
<deployment
version=
"1070"
identifier=
"macosx"
/>
<development
version=
"5100"
identifier=
"xcode"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.CocoaPlugin"
version=
"
8152.3
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.CocoaPlugin"
version=
"
7706
"
/>
</dependencies>
<objects>
<customObject
id=
"-2"
userLabel=
"File's Owner"
customClass=
"VLCOpen"
>
...
...
@@ -126,7 +126,6 @@
<outlet
property=
"okButton"
destination=
"640"
id=
"S9F-WP-A7y"
/>
<outlet
property=
"outputCheckbox"
destination=
"929"
id=
"Gz1-rY-w0Q"
/>
<outlet
property=
"outputSettingsButton"
destination=
"1256"
id=
"ruY-7h-HIS"
/>
<outlet
property=
"panel"
destination=
"636"
id=
"POG-Xe-8j5"
/>
<outlet
property=
"qtkAudioCheckbox"
destination=
"3492"
id=
"5d3-k7-1dB"
/>
<outlet
property=
"qtkAudioDevicePopup"
destination=
"3438"
id=
"Jt3-3n-AjR"
/>
<outlet
property=
"qtkHeightLabel"
destination=
"3349"
id=
"1V9-Wm-BdJ"
/>
...
...
@@ -160,6 +159,7 @@
<outlet
property=
"screenqtkAudioCheckbox"
destination=
"3515"
id=
"Y4X-ro-aSB"
/>
<outlet
property=
"screenqtkAudioPopup"
destination=
"3506"
id=
"gkb-yW-rOf"
/>
<outlet
property=
"tabView"
destination=
"678"
id=
"bM9-Bh-adI"
/>
<outlet
property=
"window"
destination=
"636"
id=
"cOB-1N-Yl8"
/>
</connections>
</customObject>
<customObject
id=
"-1"
userLabel=
"First Responder"
customClass=
"FirstResponder"
/>
...
...
modules/gui/macosx/intf.m
View file @
2d47c8c0
...
...
@@ -140,7 +140,6 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
int
items_at_launch
;
BOOL
nib_main_loaded
;
/* main nibfile */
BOOL
nib_open_loaded
;
/* open nibfile */
BOOL
nib_about_loaded
;
/* about nibfile */
BOOL
nib_prefs_loaded
;
/* preferences xibfile */
BOOL
nib_sprefs_loaded
;
/* simple preferences xibfile */
...
...
@@ -223,7 +222,6 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
-
(
void
)
applicationWillFinishLaunching
:(
NSNotification
*
)
aNotification
{
_open
=
[[
VLCOpen
alloc
]
init
];
_coreinteraction
=
[
VLCCoreInteraction
sharedInstance
];
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
...
...
@@ -540,8 +538,8 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
-
(
VLCOpen
*
)
open
{
if
(
!
nib_open_loaded
)
nib_open_loaded
=
[
NSBundle
loadNibNamed
:
@"Open"
owner
:
_open
];
if
(
!
_open
)
_open
=
[[
VLCOpen
alloc
]
init
];
return
_open
;
}
...
...
modules/gui/macosx/open.h
View file @
2d47c8c0
...
...
@@ -24,9 +24,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
@interface
VLCOpen
:
NSObject
@property
(
readwrite
,
weak
)
IBOutlet
NSWindow
*
panel
;
@interface
VLCOpen
:
NSWindowController
@property
(
readwrite
,
weak
)
IBOutlet
NSTextField
*
mrlTextField
;
@property
(
readwrite
,
weak
)
IBOutlet
NSTextField
*
mrlLabel
;
...
...
modules/gui/macosx/open.m
View file @
2d47c8c0
...
...
@@ -84,6 +84,14 @@ struct display_info_t
#pragma mark -
#pragma mark Init
-
(
id
)
init
{
self
=
[
super
initWithWindowNibName
:
@"Open"
];
return
self
;
}
-
(
void
)
dealloc
{
for
(
int
i
=
0
;
i
<
[
_displayInfos
count
];
i
++
)
{
...
...
@@ -92,13 +100,13 @@ struct display_info_t
}
}
-
(
void
)
awakeFromNib
-
(
void
)
windowDidLoad
{
_output
=
[
VLCOutput
new
];
[
_panel
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenAuxiliary
];
[
self
.
window
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenAuxiliary
];
[
_panel
setTitle
:
_NS
(
"Open Source"
)];
[
self
.
window
setTitle
:
_NS
(
"Open Source"
)];
[
_mrlLabel
setStringValue
:
_NS
(
"Media Resource Locator (MRL)"
)];
[
_okButton
setTitle
:
_NS
(
"Open"
)];
...
...
@@ -391,14 +399,17 @@ struct display_info_t
if
([
NSApp
modalWindow
]
!=
nil
)
return
;
// load window
[
self
window
];
_eyeTVController
=
[[
VLCEyeTVController
alloc
]
init
];
int
i_result
;
[
_tabView
selectTabViewItemAtIndex
:
i_type
];
[
_fileSubCheckbox
setState
:
NSOffState
];
i_result
=
[
NSApp
runModalForWindow
:
_panel
];
[
_panel
close
];
i_result
=
[
NSApp
runModalForWindow
:
self
.
window
];
[
self
.
window
close
];
if
(
i_result
)
{
NSMutableDictionary
*
itemOptionsDictionary
;
...
...
@@ -568,7 +579,7 @@ struct display_info_t
-
(
IBAction
)
expandMRLfieldAction
:(
id
)
sender
{
NSRect
windowRect
=
[
_panel
frame
];
NSRect
windowRect
=
[
self
.
window
frame
];
NSRect
viewRect
=
[
_mrlView
frame
];
if
([
_mrlButton
state
]
==
NSOffState
)
{
...
...
@@ -591,10 +602,10 @@ struct display_info_t
windowRect
.
size
.
height
=
windowRect
.
size
.
height
+
viewRect
.
size
.
height
;
}
[[
_panel
animator
]
setFrame
:
windowRect
display
:
YES
];
[[
self
.
window
animator
]
setFrame
:
windowRect
display
:
YES
];
if
([
_mrlButton
state
]
==
NSOnState
)
[[
_panel
contentView
]
addSubview
:
_mrlView
];
[[
self
.
window
contentView
]
addSubview
:
_mrlView
];
}
-
(
void
)
openFileGeneric
...
...
@@ -669,7 +680,7 @@ struct display_info_t
b_outputNibLoaded
=
[
NSBundle
loadNibNamed
:
@"StreamOutput"
owner
:
_output
];
[
NSApp
beginSheet
:
_output
.
outputSheet
modalForWindow:
self
.
panel
modalForWindow:
self
.
window
modalDelegate:
self
didEndSelector:
NULL
contextInfo:
nil
];
...
...
@@ -1023,9 +1034,9 @@ struct display_info_t
{
if
(
sender
==
_netModeMatrix
)
{
if
([[
sender
selectedCell
]
tag
]
==
0
)
[
_panel
makeFirstResponder
:
_netUDPPortTextField
];
[
self
.
window
makeFirstResponder
:
_netUDPPortTextField
];
else
if
([[
sender
selectedCell
]
tag
]
==
1
)
[
_panel
makeFirstResponder
:
_netUDPMAddressTextField
];
[
self
.
window
makeFirstResponder
:
_netUDPMAddressTextField
];
else
msg_Warn
(
VLCIntf
,
"Unknown sender tried to change UDP/RTP mode"
);
}
...
...
@@ -1041,13 +1052,13 @@ struct display_info_t
[
_netUDPPortTextField
setIntValue
:
[
_netUDPPortStepper
intValue
]];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
VLCOpenTextFieldWasClicked
object:
_netUDPPortTextField
];
[
_panel
makeFirstResponder
:
_netUDPPortTextField
];
[
self
.
window
makeFirstResponder
:
_netUDPPortTextField
];
}
else
if
(
i_tag
==
1
)
{
[
_netUDPMPortTextField
setIntValue
:
[
_netUDPMPortStepper
intValue
]];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
VLCOpenTextFieldWasClicked
object:
_netUDPMPortTextField
];
[
_panel
makeFirstResponder
:
_netUDPMPortTextField
];
[
self
.
window
makeFirstResponder
:
_netUDPMPortTextField
];
}
[
self
openNetInfoChanged
:
nil
];
...
...
@@ -1098,7 +1109,7 @@ struct display_info_t
{
if
(
sender
==
_netOpenUDPButton
)
{
[
NSApp
beginSheet
:
self
.
netUDPPanel
modalForWindow:
self
.
panel
modalForWindow:
self
.
window
modalDelegate:
self
didEndSelector:
NULL
contextInfo:
nil
];
...
...
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