Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
cacd39b8
Commit
cacd39b8
authored
Oct 31, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preferences, audio, save the normalizer activation and clean.
parent
ad9ca44d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
16 deletions
+59
-16
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+0
-2
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+3
-0
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+47
-10
modules/gui/qt4/components/simple_preferences.hpp
modules/gui/qt4/components/simple_preferences.hpp
+5
-0
modules/gui/qt4/ui/sprefs_audio.ui
modules/gui/qt4/ui/sprefs_audio.ui
+4
-4
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
cacd39b8
...
...
@@ -28,7 +28,6 @@
* - Finish implementation (see WX)
* - Improvements over WX
* - Validator for modulelist
* - Implement update stuff using a general Updated signal
*/
#include "components/preferences_widgets.hpp"
...
...
@@ -685,7 +684,6 @@ void ModuleListConfigControl::onUpdate( int value )
}
}
}
emit
Updated
();
}
/**************************************************************************
...
...
modules/gui/qt4/components/preferences_widgets.hpp
View file @
cacd39b8
...
...
@@ -85,8 +85,11 @@ protected:
QString
_name
;
QWidget
*
widget
;
bool
_advanced
;
#if 0
/* You shouldn't use that now..*/
signals:
void Updated();
#endif
};
/*******************************************************
...
...
modules/gui/qt4/components/simple_preferences.cpp
View file @
cacd39b8
...
...
@@ -215,9 +215,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
detectionDolby
);
CONFIG_GENERIC
(
"headphone-dolby"
,
Bool
,
NULL
,
headphoneEffect
);
// CONFIG_GENERIC( "" , Bool, NULL, ); activation of normalizer //FIXME
CONFIG_GENERIC_NO_BOOL
(
"norm-max-level"
,
Float
,
NULL
,
volNorm
alizer
);
volNorm
Spin
);
CONFIG_GENERIC
(
"audio-visual"
,
Module
,
NULL
,
visualisation
);
/* Audio Output Specifics */
...
...
@@ -271,6 +271,16 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONNECT
(
ui
.
lastfm
,
stateChanged
(
int
),
this
,
lastfm_Changed
(
int
)
);
/* Normalizer */
normalizerBox
=
ui
.
volNormBox
;
CONNECT
(
ui
.
volNormBox
,
toggled
(
bool
),
ui
.
volNormSpin
,
setEnabled
(
bool
)
);
qs_filter
=
qfu
(
config_GetPsz
(
p_intf
,
"audio-filter"
)
);
bool
b_normalizer
=
(
qs_filter
.
contains
(
"volnorm"
)
);
{
ui
.
volNormBox
->
setChecked
(
b_normalizer
);
ui
.
volNormSpin
->
setEnabled
(
b_normalizer
);
}
END_SPREFS_CAT
;
/* Input and Codecs Panel Implementation */
...
...
@@ -327,14 +337,14 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
#endif
/* interface */
p_config
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"intf"
);
if
(
p_config
->
value
.
psz
&&
strcmp
(
p_config
->
value
.
psz
,
"qt4"
))
{
ui
.
qt4
->
setChecked
(
true
);
}
if
(
p_config
->
value
.
psz
&&
strcmp
(
p_config
->
value
.
psz
,
"skins2"
))
char
*
psz_intf
=
config_GetPsz
(
p_intf
,
"intf"
);
if
(
psz_intf
)
{
msg_Dbg
(
p_intf
,
"Interface in config file: %s"
,
psz_intf
);
if
(
strstr
(
psz_intf
,
"skin"
)
)
ui
.
skins
->
setChecked
(
true
);
else
if
(
strstr
(
psz_intf
,
"qt"
)
)
ui
.
qt4
->
setChecked
(
true
);
}
skinInterfaceButton
=
ui
.
skins
;
qtInterfaceButton
=
ui
.
qt4
;
...
...
@@ -435,6 +445,33 @@ void SPrefsPanel::apply()
if
(
qtInterfaceButton
->
isChecked
()
)
config_PutPsz
(
p_intf
,
"intf"
,
"qt4"
);
}
if
(
number
==
SPrefsAudio
)
{
bool
b_normChecked
=
normalizerBox
->
isChecked
();
if
(
qs_filter
.
isEmpty
()
)
{
/* the psz_filter is already empty, so we just append it needed */
if
(
b_normChecked
)
qs_filter
=
"volnorm"
;
}
else
/* Not Empty */
{
if
(
qs_filter
.
contains
(
"volnorm"
)
)
{
/* The qs_filter not empty and contains "volnorm" that we have to remove */
if
(
!
b_normChecked
)
{
/* Ugly :D */
qs_filter
.
remove
(
"volnorm:"
);
qs_filter
.
remove
(
":volnorm"
);
qs_filter
.
remove
(
"volnorm"
);
}
}
else
/* qs_filter not empty, but doesn't have volnorm inside already */
if
(
b_normChecked
)
qs_filter
.
append
(
":volnorm"
);
}
config_PutPsz
(
p_intf
,
"audio-filter"
,
qtu
(
qs_filter
)
);
}
}
void
SPrefsPanel
::
clean
()
...
...
modules/gui/qt4/components/simple_preferences.hpp
View file @
cacd39b8
...
...
@@ -43,6 +43,8 @@ class ConfigControl;
class
QComboBox
;
class
QLineEdit
;
class
QRadioButton
;
class
QCheckBox
;
class
QString
;
class
SPrefsCatList
:
public
QWidget
{
...
...
@@ -72,6 +74,7 @@ private:
int
number
;
/* this is ugly and bad until I found a new solution */
QWidget
*
alsa_options
;
QWidget
*
oss_options
;
QWidget
*
directx_options
;
...
...
@@ -80,6 +83,8 @@ private:
QLineEdit
*
inputDevice
;
QRadioButton
*
skinInterfaceButton
;
QRadioButton
*
qtInterfaceButton
;
QString
qs_filter
;
QCheckBox
*
normalizerBox
;
/* Display only the options for the selected audio output */
private
slots
:
...
...
modules/gui/qt4/ui/sprefs_audio.ui
View file @
cacd39b8
...
...
@@ -255,7 +255,7 @@
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="vol
umeNormalizer
" >
<widget class="QCheckBox" name="vol
NormBox
" >
<property name="text" >
<string>_("Volume normalizer")</string>
</property>
...
...
@@ -269,7 +269,7 @@
</widget>
</item>
<item row="1" column="1" >
<widget class="QDoubleSpinBox" name="volNorm
alizer
" >
<widget class="QDoubleSpinBox" name="volNorm
Spin
" >
<property name="alignment" >
<set>Qt::AlignRight</set>
</property>
...
...
@@ -333,8 +333,8 @@
<tabstop>OSSBrowse</tabstop>
<tabstop>fileBrowseButton</tabstop>
<tabstop>headphoneEffect</tabstop>
<tabstop>vol
umeNormalizer
</tabstop>
<tabstop>volNorm
alizer
</tabstop>
<tabstop>vol
NormBox
</tabstop>
<tabstop>volNorm
Spin
</tabstop>
<tabstop>visualisation</tabstop>
</tabstops>
<resources/>
...
...
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