Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
86e63937
Commit
86e63937
authored
Nov 06, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - SPrefs: use a switch to remove stupid iterative ifs.
parent
d2d0350a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+10
-4
No files found.
modules/gui/qt4/components/simple_preferences.cpp
View file @
86e63937
...
@@ -460,6 +460,7 @@ void SPrefsPanel::updateAudioOptions( int number)
...
@@ -460,6 +460,7 @@ void SPrefsPanel::updateAudioOptions( int number)
optionWidgets
[
fileW
]
->
setVisible
(
(
value
==
"aout_file"
)
);
optionWidgets
[
fileW
]
->
setVisible
(
(
value
==
"aout_file"
)
);
}
}
/* Function called from the main Preferences dialog on each SPrefs Panel */
void
SPrefsPanel
::
apply
()
void
SPrefsPanel
::
apply
()
{
{
msg_Dbg
(
p_intf
,
"Trying to save the %i simple panel"
,
number
);
msg_Dbg
(
p_intf
,
"Trying to save the %i simple panel"
,
number
);
...
@@ -472,8 +473,9 @@ void SPrefsPanel::apply()
...
@@ -472,8 +473,9 @@ void SPrefsPanel::apply()
c
->
doApply
(
p_intf
);
c
->
doApply
(
p_intf
);
}
}
/* Devices */
switch
(
number
)
if
(
number
==
SPrefsInputAndCodecs
)
{
case
SPrefsInputAndCodecs
:
{
{
/* Device default selection */
/* Device default selection */
char
*
psz_devicepath
=
char
*
psz_devicepath
=
...
@@ -526,18 +528,20 @@ void SPrefsPanel::apply()
...
@@ -526,18 +528,20 @@ void SPrefsPanel::apply()
#endif
#endif
//CaCi( "dv-caching" ) too short...
//CaCi( "dv-caching" ) too short...
}
}
break
;
}
}
/* Interfaces */
/* Interfaces */
if
(
number
==
SPrefsInterface
)
case
SPrefsInterface
:
{
{
if
(
qobject_cast
<
QRadioButton
*>
(
optionWidgets
[
skinRB
])
->
isChecked
()
)
if
(
qobject_cast
<
QRadioButton
*>
(
optionWidgets
[
skinRB
])
->
isChecked
()
)
config_PutPsz
(
p_intf
,
"intf"
,
"skins2"
);
config_PutPsz
(
p_intf
,
"intf"
,
"skins2"
);
if
(
qobject_cast
<
QRadioButton
*>
(
optionWidgets
[
qtRB
])
->
isChecked
()
)
if
(
qobject_cast
<
QRadioButton
*>
(
optionWidgets
[
qtRB
])
->
isChecked
()
)
config_PutPsz
(
p_intf
,
"intf"
,
"qt4"
);
config_PutPsz
(
p_intf
,
"intf"
,
"qt4"
);
break
;
}
}
if
(
number
==
SPrefsAudio
)
case
SPrefsAudio
:
{
{
bool
b_normChecked
=
bool
b_normChecked
=
qobject_cast
<
QCheckBox
*>
(
optionWidgets
[
normalizerChB
])
->
isChecked
();
qobject_cast
<
QCheckBox
*>
(
optionWidgets
[
normalizerChB
])
->
isChecked
();
...
@@ -564,6 +568,8 @@ void SPrefsPanel::apply()
...
@@ -564,6 +568,8 @@ void SPrefsPanel::apply()
if
(
b_normChecked
)
qs_filter
.
append
(
":volnorm"
);
if
(
b_normChecked
)
qs_filter
.
append
(
":volnorm"
);
}
}
config_PutPsz
(
p_intf
,
"audio-filter"
,
qtu
(
qs_filter
)
);
config_PutPsz
(
p_intf
,
"audio-filter"
,
qtu
(
qs_filter
)
);
break
;
}
}
}
}
}
...
...
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