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
c57446ee
Commit
c57446ee
authored
Aug 20, 2012
by
Sebastien Zwickert
Committed by
Konstantin Pavlov
Aug 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: Repack module_config_t.
Signed-off-by:
Konstantin Pavlov
<
thresh@videolan.org
>
parent
bf5839b4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
48 deletions
+48
-48
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+8
-8
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/prefs_widgets.m
+25
-25
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+15
-15
No files found.
modules/gui/macosx/open.m
View file @
c57446ee
...
...
@@ -373,11 +373,11 @@ static VLCOpen *_o_sharedMainInstance = nil;
if
(
p_item
)
{
for
(
i_index
=
0
;
p_item
->
ppsz_list
&&
p_item
->
ppsz_list
[
i_index
];
for
(
i_index
=
0
;
p_item
->
list
.
psz
&&
p_item
->
list
.
psz
[
i_index
];
i_index
++
)
{
[
o_file_sub_encoding_pop
addItemWithTitle
:
[
NSString
stringWithUTF8String
:
p_item
->
ppsz_list
[
i_index
]]];
[
NSString
stringWithUTF8String
:
p_item
->
list
.
psz
[
i_index
]]];
}
[
o_file_sub_encoding_pop
selectItemWithTitle
:
[
NSString
stringWithUTF8String
:
p_item
->
value
.
psz
]];
...
...
@@ -387,10 +387,10 @@ static VLCOpen *_o_sharedMainInstance = nil;
if
(
p_item
)
{
for
(
i_index
=
0
;
i_index
<
p_item
->
i_lis
t
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_item
->
list_coun
t
;
i_index
++
)
{
[
o_file_sub_align_pop
addItemWithTitle
:
_NS
(
p_item
->
ppsz_
list_text
[
i_index
])];
_NS
(
p_item
->
list_text
[
i_index
])];
}
[
o_file_sub_align_pop
selectItemAtIndex
:
p_item
->
value
.
i
];
}
...
...
@@ -399,10 +399,10 @@ static VLCOpen *_o_sharedMainInstance = nil;
if
(
p_item
)
{
for
(
i_index
=
0
;
i_index
<
p_item
->
i_lis
t
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_item
->
list_coun
t
;
i_index
++
)
{
[
o_file_sub_size_pop
addItemWithTitle
:
_NS
(
p_item
->
ppsz_
list_text
[
i_index
])];
if
(
p_item
->
value
.
i
==
p_item
->
pi_list
[
i_index
]
)
[
o_file_sub_size_pop
addItemWithTitle
:
_NS
(
p_item
->
list_text
[
i_index
])];
if
(
p_item
->
value
.
i
==
p_item
->
list
.
i
[
i_index
]
)
{
[
o_file_sub_size_pop
selectItemAtIndex
:
i_index
];
}
...
...
@@ -452,7 +452,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
{
[
o_options
addObject
:
[
NSString
stringWithFormat
:
@"freetype-rel-fontsize=%i"
,
p_item
->
pi_list
[[
o_file_sub_size_pop
indexOfSelectedItem
]]]];
p_item
->
list
.
i
[[
o_file_sub_size_pop
indexOfSelectedItem
]]]];
}
}
NSArray
*
components
=
[[
o_file_starttime_fld
stringValue
]
componentsSeparatedByString
:
@":"
];
...
...
modules/gui/macosx/prefs_widgets.m
View file @
c57446ee
...
...
@@ -794,7 +794,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
case
CONFIG_ITEM_STRING
:
case
CONFIG_ITEM_PASSWORD
:
if
(
!
_p_item
->
i_lis
t
)
if
(
!
_p_item
->
list_coun
t
)
{
p_control
=
[[
StringConfigControl
alloc
]
initWithItem:
_p_item
...
...
@@ -821,7 +821,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
withView:
o_parent_view
];
break
;
case
CONFIG_ITEM_INTEGER
:
if
(
_p_item
->
i_lis
t
)
if
(
_p_item
->
list_coun
t
)
{
p_control
=
[[
IntegerListConfigControl
alloc
]
initWithItem:
_p_item
...
...
@@ -1082,12 +1082,12 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
ADD_COMBO
(
o_combo
,
mainFrame
,
[
o_label
frame
].
size
.
width
,
-
2
,
0
,
o_textfieldTooltip
)
[
o_combo
setAutoresizingMask
:
NSViewWidthSizable
];
for
(
i_index
=
0
;
i_index
<
p_item
->
i_lis
t
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_item
->
list_coun
t
;
i_index
++
)
{
if
(
!
p_item
->
value
.
psz
&&
!
p_item
->
ppsz_list
[
i_index
]
)
if
(
!
p_item
->
value
.
psz
&&
!
p_item
->
list
.
psz
[
i_index
]
)
[
o_combo
selectItemAtIndex
:
i_index
];
else
if
(
p_item
->
value
.
psz
&&
p_item
->
ppsz_list
[
i_index
]
&&
!
strcmp
(
p_item
->
value
.
psz
,
p_item
->
ppsz_list
[
i_index
]
)
)
else
if
(
p_item
->
value
.
psz
&&
p_item
->
list
.
psz
[
i_index
]
&&
!
strcmp
(
p_item
->
value
.
psz
,
p_item
->
list
.
psz
[
i_index
]
)
)
[
o_combo
selectItemAtIndex
:
i_index
];
}
[
self
addSubview
:
o_combo
];
...
...
@@ -1118,8 +1118,8 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
-
(
char
*
)
stringValue
{
if
(
[
o_combo
indexOfSelectedItem
]
>=
0
)
{
if
(
p_item
->
ppsz_list
[[
o_combo
indexOfSelectedItem
]]
!=
NULL
)
return
strdup
(
p_item
->
ppsz_list
[[
o_combo
indexOfSelectedItem
]]
);
if
(
p_item
->
list
.
psz
[[
o_combo
indexOfSelectedItem
]]
!=
NULL
)
return
strdup
(
p_item
->
list
.
psz
[[
o_combo
indexOfSelectedItem
]]
);
}
else
{
if
(
[[
VLCMain
sharedInstance
]
delocalizeString
:
[
o_combo
stringValue
]]
!=
NULL
)
return
strdup
(
[[
VLCMain
sharedInstance
]
delocalizeString
:
[
o_combo
stringValue
]]
);
...
...
@@ -1133,12 +1133,12 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
[
o_combo
reloadData
];
char
*
psz_value
=
config_GetPsz
(
VLCIntf
,
p_item
->
psz_name
);
for
(
i_index
=
0
;
i_index
<
p_item
->
i_lis
t
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_item
->
list_coun
t
;
i_index
++
)
{
if
(
!
psz_value
&&
!
p_item
->
ppsz_list
[
i_index
]
)
if
(
!
psz_value
&&
!
p_item
->
list
.
psz
[
i_index
]
)
[
o_combo
selectItemAtIndex
:
i_index
];
else
if
(
psz_value
&&
p_item
->
ppsz_list
[
i_index
]
&&
!
strcmp
(
psz_value
,
p_item
->
ppsz_list
[
i_index
]
)
)
else
if
(
psz_value
&&
p_item
->
list
.
psz
[
i_index
]
&&
!
strcmp
(
psz_value
,
p_item
->
list
.
psz
[
i_index
]
)
)
[
o_combo
selectItemAtIndex
:
i_index
];
}
...
...
@@ -1150,16 +1150,16 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
@implementation
StringListConfigControl
(
NSComboBoxDataSource
)
-
(
NSInteger
)
numberOfItemsInComboBox
:(
NSComboBox
*
)
aComboBox
{
return
p_item
->
i_lis
t
;
return
p_item
->
list_coun
t
;
}
-
(
id
)
comboBox
:(
NSComboBox
*
)
aComboBox
objectValueForItemAtIndex
:(
NSInteger
)
i_index
{
if
(
p_item
->
ppsz_list_text
&&
p_item
->
ppsz_
list_text
[
i_index
]
)
if
(
p_item
->
list_text
&&
p_item
->
list_text
[
i_index
]
)
{
return
_NS
((
char
*
)
p_item
->
ppsz_
list_text
[
i_index
]);
return
_NS
((
char
*
)
p_item
->
list_text
[
i_index
]);
}
else
return
_NS
((
char
*
)
p_item
->
ppsz_list
[
i_index
]);
return
_NS
((
char
*
)
p_item
->
list
.
psz
[
i_index
]);
}
@end
...
...
@@ -1573,9 +1573,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
ADD_COMBO
(
o_combo
,
mainFrame
,
[
o_label
frame
].
size
.
width
,
-
2
,
0
,
o_textfieldTooltip
)
[
o_combo
setAutoresizingMask
:
NSViewWidthSizable
];
for
(
i_index
=
0
;
i_index
<
p_item
->
i_lis
t
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_item
->
list_coun
t
;
i_index
++
)
{
if
(
p_item
->
value
.
i
==
p_item
->
pi_list
[
i_index
]
)
if
(
p_item
->
value
.
i
==
p_item
->
list
.
i
[
i_index
]
)
{
[
o_combo
selectItemAtIndex
:
i_index
];
}
...
...
@@ -1608,7 +1608,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
-
(
int
)
intValue
{
if
(
[
o_combo
indexOfSelectedItem
]
>=
0
)
return
p_item
->
pi_list
[[
o_combo
indexOfSelectedItem
]];
return
p_item
->
list
.
i
[[
o_combo
indexOfSelectedItem
]];
else
return
[
o_combo
intValue
];
}
...
...
@@ -1617,9 +1617,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
int
i_index
;
[
o_combo
reloadData
];
for
(
i_index
=
0
;
i_index
<
p_item
->
i_lis
t
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_item
->
list_coun
t
;
i_index
++
)
{
if
(
config_GetInt
(
VLCIntf
,
p_item
->
psz_name
)
==
p_item
->
pi_list
[
i_index
]
)
if
(
config_GetInt
(
VLCIntf
,
p_item
->
psz_name
)
==
p_item
->
list
.
i
[
i_index
]
)
{
[
o_combo
selectItemAtIndex
:
i_index
];
}
...
...
@@ -1631,15 +1631,15 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
@implementation
IntegerListConfigControl
(
NSComboBoxDataSource
)
-
(
NSInteger
)
numberOfItemsInComboBox
:(
NSComboBox
*
)
aComboBox
{
return
p_item
->
i_lis
t
;
return
p_item
->
list_coun
t
;
}
-
(
id
)
comboBox
:(
NSComboBox
*
)
aComboBox
objectValueForItemAtIndex
:(
NSInteger
)
i_index
{
if
(
p_item
->
ppsz_list_text
&&
p_item
->
ppsz_
list_text
[
i_index
]
)
return
_NS
((
char
*
)
p_item
->
ppsz_
list_text
[
i_index
]);
if
(
p_item
->
list_text
&&
p_item
->
list_text
[
i_index
]
)
return
_NS
((
char
*
)
p_item
->
list_text
[
i_index
]);
else
return
[
NSString
stringWithFormat
:
@"%i"
,
p_item
->
pi_list
[
i_index
]];
return
[
NSString
stringWithFormat
:
@"%i"
,
p_item
->
list
.
i
[
i_index
]];
}
@end
...
...
modules/gui/macosx/simple_prefs.m
View file @
c57446ee
...
...
@@ -364,23 +364,23 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
/* serious problem, if no item found */
assert
(
p_item
);
for
(
int
i
=
0
;
i
<
p_item
->
i_lis
t
;
i
++
)
for
(
int
i
=
0
;
i
<
p_item
->
list_coun
t
;
i
++
)
{
NSMenuItem
*
mi
;
if
(
p_item
->
ppsz_
list_text
!=
NULL
)
mi
=
[[
NSMenuItem
alloc
]
initWithTitle
:
_NS
(
p_item
->
ppsz_
list_text
[
i
]
)
action
:
NULL
keyEquivalent
:
@""
];
else
if
(
p_item
->
ppsz_list
[
i
]
&&
strcmp
(
p_item
->
ppsz_list
[
i
],
""
)
==
0
)
if
(
p_item
->
list_text
!=
NULL
)
mi
=
[[
NSMenuItem
alloc
]
initWithTitle
:
_NS
(
p_item
->
list_text
[
i
]
)
action
:
NULL
keyEquivalent
:
@""
];
else
if
(
p_item
->
list
.
psz
[
i
]
&&
strcmp
(
p_item
->
list
.
psz
[
i
],
""
)
==
0
)
{
[[
object
menu
]
addItem
:
[
NSMenuItem
separatorItem
]];
continue
;
}
else
if
(
p_item
->
ppsz_list
[
i
]
)
mi
=
[[
NSMenuItem
alloc
]
initWithTitle
:
[
NSString
stringWithUTF8String
:
p_item
->
ppsz_list
[
i
]]
action
:
NULL
keyEquivalent
:
@""
];
else
if
(
p_item
->
list
.
psz
[
i
]
)
mi
=
[[
NSMenuItem
alloc
]
initWithTitle
:
[
NSString
stringWithUTF8String
:
p_item
->
list
.
psz
[
i
]]
action
:
NULL
keyEquivalent
:
@""
];
else
msg_Err
(
p_intf
,
"item %d of pref %s failed to be created"
,
i
,
name
);
[
mi
setRepresentedObject
:[
NSString
stringWithUTF8String
:
p_item
->
ppsz_list
[
i
]]];
[
mi
setRepresentedObject
:[
NSString
stringWithUTF8String
:
p_item
->
list
.
psz
[
i
]]];
[[
object
menu
]
addItem
:
[
mi
autorelease
]];
if
(
p_item
->
value
.
psz
&&
!
strcmp
(
p_item
->
value
.
psz
,
p_item
->
ppsz_list
[
i
]
)
)
if
(
p_item
->
value
.
psz
&&
!
strcmp
(
p_item
->
value
.
psz
,
p_item
->
list
.
psz
[
i
]
)
)
[
object
selectItem
:[
object
lastItem
]];
}
[
object
setToolTip
:
_NS
(
p_item
->
psz_longtext
)];
...
...
@@ -396,18 +396,18 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
/* serious problem, if no item found */
assert
(
p_item
);
for
(
int
i
=
0
;
i
<
p_item
->
i_lis
t
;
i
++
)
for
(
int
i
=
0
;
i
<
p_item
->
list_coun
t
;
i
++
)
{
NSMenuItem
*
mi
;
if
(
p_item
->
ppsz_
list_text
!=
NULL
)
mi
=
[[
NSMenuItem
alloc
]
initWithTitle
:
_NS
(
p_item
->
ppsz_
list_text
[
i
]
)
action
:
NULL
keyEquivalent
:
@""
];
else
if
(
p_item
->
pi_list
[
i
]
)
mi
=
[[
NSMenuItem
alloc
]
initWithTitle
:
[
NSString
stringWithFormat
:
@"%d"
,
p_item
->
pi_list
[
i
]]
action
:
NULL
keyEquivalent
:
@""
];
if
(
p_item
->
list_text
!=
NULL
)
mi
=
[[
NSMenuItem
alloc
]
initWithTitle
:
_NS
(
p_item
->
list_text
[
i
]
)
action
:
NULL
keyEquivalent
:
@""
];
else
if
(
p_item
->
list
.
i
[
i
]
)
mi
=
[[
NSMenuItem
alloc
]
initWithTitle
:
[
NSString
stringWithFormat
:
@"%d"
,
p_item
->
list
.
i
[
i
]]
action
:
NULL
keyEquivalent
:
@""
];
else
msg_Err
(
p_intf
,
"item %d of pref %s failed to be created"
,
i
,
name
);
[
mi
setRepresentedObject
:[
NSNumber
numberWithInt
:
p_item
->
pi_list
[
i
]]];
[
mi
setRepresentedObject
:[
NSNumber
numberWithInt
:
p_item
->
list
.
i
[
i
]]];
[[
object
menu
]
addItem
:
[
mi
autorelease
]];
if
(
p_item
->
value
.
i
==
p_item
->
pi_list
[
i
]
)
if
(
p_item
->
value
.
i
==
p_item
->
list
.
i
[
i
]
)
[
object
selectItem
:[
object
lastItem
]];
}
[
object
setToolTip
:
_NS
(
p_item
->
psz_longtext
)];
...
...
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