Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
5df99e7a
Commit
5df99e7a
authored
Sep 03, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setfillVLCConfigCombo: deal with string config items
parent
d8f97741
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+17
-6
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
5df99e7a
...
...
@@ -529,12 +529,20 @@ QString StringListConfigControl::getValue() const
}
void
setfillVLCConfigCombo
(
const
char
*
configname
,
intf_thread_t
*
p_intf
,
QComboBox
*
combo
)
QComboBox
*
combo
)
{
module_config_t
*
p_config
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
configname
);
if
(
p_config
)
{
QVariant
def
;
bool
string
=
(
p_config
->
i_type
&
0xF0
)
==
CONFIG_ITEM_STRING
;
if
(
string
)
def
=
QVariant
(
qfu
(
p_config
->
value
.
psz
)
);
else
def
=
QVariant
(
p_config
->
value
.
i
);
if
(
p_config
->
pf_update_list
)
{
vlc_value_t
val
;
...
...
@@ -548,12 +556,15 @@ void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf,
for
(
int
i_index
=
0
;
i_index
<
p_config
->
i_list
;
i_index
++
)
{
combo
->
addItem
(
qtr
(
p_config
->
ppsz_list_text
[
i_index
]),
QVariant
(
p_config
->
pi_list
[
i_index
]
)
);
if
(
p_config
->
value
.
i
==
p_config
->
pi_list
[
i_index
]
)
{
QVariant
value
;
if
(
string
)
value
=
QVariant
(
qfu
(
p_config
->
ppsz_list
[
i_index
])
);
else
value
=
QVariant
(
p_config
->
pi_list
[
i_index
]
);
combo
->
addItem
(
qtr
(
p_config
->
ppsz_list_text
[
i_index
]),
value
);
if
(
def
==
value
)
combo
->
setCurrentIndex
(
i_index
);
}
}
if
(
p_config
->
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