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
c95d33f9
Commit
c95d33f9
authored
Aug 02, 2015
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: Convert VLCPrefs to NSWindowController subclass
parent
e91c0ed1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
19 deletions
+22
-19
extras/package/macosx/Resources/English.lproj/Preferences.xib
...as/package/macosx/Resources/English.lproj/Preferences.xib
+3
-3
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+0
-4
modules/gui/macosx/prefs.h
modules/gui/macosx/prefs.h
+1
-2
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs.m
+18
-10
No files found.
extras/package/macosx/Resources/English.lproj/Preferences.xib
View file @
c95d33f9
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.Cocoa.XIB"
version=
"3.0"
toolsVersion=
"
8152.3"
systemVersion=
"15A216g
"
targetRuntime=
"MacOSX.Cocoa"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.Cocoa.XIB"
version=
"3.0"
toolsVersion=
"
7706"
systemVersion=
"14F19a
"
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=
"VLCPrefs"
>
<connections>
<outlet
property=
"cancelButton"
destination=
"1543"
id=
"xKX-e8-dhh"
/>
<outlet
property=
"prefsView"
destination=
"1537"
id=
"Yv9-bn-gFQ"
/>
<outlet
property=
"prefsWindow"
destination=
"1530"
id=
"GrB-uU-B7B"
/>
<outlet
property=
"resetButton"
destination=
"1542"
id=
"2QZ-tp-Blv"
/>
<outlet
property=
"saveButton"
destination=
"1541"
id=
"Ng1-aE-PqI"
/>
<outlet
property=
"showBasicButton"
destination=
"3642"
id=
"E0I-T2-hF5"
/>
<outlet
property=
"titleLabel"
destination=
"2257"
id=
"Dzk-M9-HUc"
/>
<outlet
property=
"tree"
destination=
"1534"
id=
"ZfU-1d-7BL"
/>
<outlet
property=
"window"
destination=
"1530"
id=
"tB4-5c-gLR"
/>
</connections>
</customObject>
<customObject
id=
"-1"
userLabel=
"First Responder"
customClass=
"FirstResponder"
/>
...
...
modules/gui/macosx/intf.m
View file @
c95d33f9
...
...
@@ -141,7 +141,6 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
BOOL
nib_main_loaded
;
/* main nibfile */
BOOL
nib_about_loaded
;
/* about nibfile */
BOOL
nib_prefs_loaded
;
/* preferences xibfile */
BOOL
nib_coredialogs_loaded
;
/* CoreDialogs nibfile */
BOOL
b_active_videoplayback
;
...
...
@@ -556,9 +555,6 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
if
(
!
_prefs
)
_prefs
=
[[
VLCPrefs
alloc
]
init
];
if
(
!
nib_prefs_loaded
)
nib_prefs_loaded
=
[
NSBundle
loadNibNamed
:
@"Preferences"
owner
:
_prefs
];
return
_prefs
;
}
...
...
modules/gui/macosx/prefs.h
View file @
c95d33f9
...
...
@@ -27,9 +27,8 @@
/*****************************************************************************
* VLCPrefs interface
*****************************************************************************/
@interface
VLCPrefs
:
NS
Object
@interface
VLCPrefs
:
NS
WindowController
@property
(
readwrite
,
weak
)
IBOutlet
NSWindow
*
prefsWindow
;
@property
(
readwrite
,
weak
)
IBOutlet
NSTextField
*
titleLabel
;
@property
(
readwrite
,
weak
)
IBOutlet
NSOutlineView
*
tree
;
@property
(
readwrite
,
weak
)
IBOutlet
NSScrollView
*
prefsView
;
...
...
modules/gui/macosx/prefs.m
View file @
c95d33f9
...
...
@@ -155,15 +155,23 @@
@implementation
VLCPrefs
-
(
void
)
awakeFromNib
-
(
id
)
init
{
self
=
[
super
initWithWindowNibName
:
@"Preferences"
];
return
self
;
}
-
(
void
)
windowDidLoad
{
o_emptyView
=
[[
NSView
alloc
]
init
];
_rootTreeItem
=
[[
VLCTreeMainItem
alloc
]
init
];
[
_prefsW
indow
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenAuxiliary
];
[
_prefsW
indow
setHidesOnDeactivate
:
YES
];
[
self
.
w
indow
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenAuxiliary
];
[
self
.
w
indow
setHidesOnDeactivate
:
YES
];
[
_prefsW
indow
setTitle
:
_NS
(
"Preferences"
)];
[
self
.
w
indow
setTitle
:
_NS
(
"Preferences"
)];
[
_saveButton
setTitle
:
_NS
(
"Save"
)];
[
_cancelButton
setTitle
:
_NS
(
"Cancel"
)];
[
_resetButton
setTitle
:
_NS
(
"Reset All"
)];
...
...
@@ -183,9 +191,9 @@
-
(
void
)
showPrefsWithLevel
:(
NSInteger
)
iWindow_level
{
[
self
.
prefsW
indow
setLevel
:
iWindow_level
];
[
self
.
prefsW
indow
center
];
[
self
.
prefsW
indow
makeKeyAndOrderFront
:
self
];
[
self
.
w
indow
setLevel
:
iWindow_level
];
[
self
.
w
indow
center
];
[
self
.
w
indow
makeKeyAndOrderFront
:
self
];
[
_rootTreeItem
resetView
];
}
...
...
@@ -195,17 +203,17 @@
[
_rootTreeItem
applyChanges
];
[[
VLCCoreInteraction
sharedInstance
]
fixPreferences
];
config_SaveConfigFile
(
VLCIntf
);
[
_prefsW
indow
orderOut
:
self
];
[
self
.
w
indow
orderOut
:
self
];
}
-
(
IBAction
)
closePrefs
:
(
id
)
sender
{
[
_prefsW
indow
orderOut
:
self
];
[
self
.
w
indow
orderOut
:
self
];
}
-
(
IBAction
)
showSimplePrefs
:
(
id
)
sender
{
[
_prefsW
indow
orderOut
:
self
];
[
self
.
w
indow
orderOut
:
self
];
[[[
VLCMain
sharedInstance
]
simplePreferences
]
showSimplePrefs
];
}
...
...
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