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
d496ba57
Commit
d496ba57
authored
Feb 18, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: advanced prefs: add support for config sections
close #7971
parent
65103f63
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
2 deletions
+55
-2
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs.m
+2
-2
modules/gui/macosx/prefs_widgets.h
modules/gui/macosx/prefs_widgets.h
+9
-0
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/prefs_widgets.m
+44
-0
No files found.
modules/gui/macosx/prefs.m
View file @
d496ba57
...
@@ -385,13 +385,13 @@ static VLCPrefs *_o_sharedMainInstance = nil;
...
@@ -385,13 +385,13 @@ static VLCPrefs *_o_sharedMainInstance = nil;
}
}
}
}
if
(
module_is_main
(
p_module
)
&&
CONFIG_ITEM
(
configType
))
{
if
(
module_is_main
(
p_module
)
&&
(
CONFIG_ITEM
(
configType
)
||
configType
==
CONFIG_SECTION
))
{
if
(
categoryItem
&&
[
self
isSubCategoryGeneral
:
lastsubcat
])
if
(
categoryItem
&&
[
self
isSubCategoryGeneral
:
lastsubcat
])
[[
categoryItem
options
]
addObject
:[[
VLCTreeLeafItem
alloc
]
initWithConfigItem
:
&
p_configs
[
j
]]];
[[
categoryItem
options
]
addObject
:[[
VLCTreeLeafItem
alloc
]
initWithConfigItem
:
&
p_configs
[
j
]]];
else
if
(
subCategoryItem
)
else
if
(
subCategoryItem
)
[[
subCategoryItem
options
]
addObject
:[[
VLCTreeLeafItem
alloc
]
initWithConfigItem
:
&
p_configs
[
j
]]];
[[
subCategoryItem
options
]
addObject
:[[
VLCTreeLeafItem
alloc
]
initWithConfigItem
:
&
p_configs
[
j
]]];
}
}
else
if
(
!
module_is_main
(
p_module
)
&&
CONFIG_ITEM
(
configType
))
{
else
if
(
!
module_is_main
(
p_module
)
&&
(
CONFIG_ITEM
(
configType
)
||
configType
==
CONFIG_SECTION
))
{
if
(
!
[[
subCategoryItem
children
]
containsObject
:
pluginItem
])
if
(
!
[[
subCategoryItem
children
]
containsObject
:
pluginItem
])
[[
subCategoryItem
children
]
addObject
:
pluginItem
];
[[
subCategoryItem
children
]
addObject
:
pluginItem
];
...
...
modules/gui/macosx/prefs_widgets.h
View file @
d496ba57
...
@@ -208,6 +208,15 @@ static NSMenu *o_keys_menu = nil;
...
@@ -208,6 +208,15 @@ static NSMenu *o_keys_menu = nil;
@end
@end
@interface
SectionControl
:
VLCConfigControl
{
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
;
@end
//#undef CONFIG_ITEM_LIST_STRING
//#undef CONFIG_ITEM_LIST_STRING
//#undef CONFIG_ITEM_RANGED_INTEGER
//#undef CONFIG_ITEM_RANGED_INTEGER
modules/gui/macosx/prefs_widgets.m
View file @
d496ba57
...
@@ -838,6 +838,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
...
@@ -838,6 +838,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
case
CONFIG_ITEM_MODULE_LIST_CAT
:
case
CONFIG_ITEM_MODULE_LIST_CAT
:
p_control
=
[[
ModuleListConfigControl
alloc
]
initWithItem
:
_p_item
withView
:
o_parent_view
];
p_control
=
[[
ModuleListConfigControl
alloc
]
initWithItem
:
_p_item
withView
:
o_parent_view
];
break
;
break
;
case
CONFIG_SECTION
:
p_control
=
[[
SectionControl
alloc
]
initWithItem
:
_p_item
withView
:
o_parent_view
];
break
;
default:
default:
break
;
break
;
}
}
...
@@ -2315,3 +2318,44 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
...
@@ -2315,3 +2318,44 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
withObject:
anObject
];
withObject:
anObject
];
}
}
@end
@end
@implementation
SectionControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_tooltip
;
mainFrame
.
size
.
height
=
17
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
0
;
if
([
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
/* add the label */
if
(
p_item
->
psz_text
)
o_labelString
=
_NS
((
char
*
)
p_item
->
psz_text
);
else
o_labelString
=
@""
;
NSDictionary
*
boldAttributes
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
[
NSFont
boldSystemFontOfSize
:[
NSFont
systemFontSize
]],
NSFontAttributeName
,
nil
];
NSAttributedString
*
o_bold_string
=
[[
NSAttributedString
alloc
]
initWithString
:
o_labelString
attributes
:
boldAttributes
];
ADD_LABEL
(
o_label
,
mainFrame
,
1
,
0
,
@""
,
@""
)
[
o_label
setAttributedStringValue
:
o_bold_string
];
[
o_label
sizeToFit
];
[
o_bold_string
release
];
[
o_label
setAutoresizingMask
:
NSViewNotSizable
];
[
self
addSubview
:
o_label
];
}
return
self
;
}
@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