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
a7963bfa
Commit
a7963bfa
authored
Oct 12, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: use config_GetPszChoices() for module items
parent
2ef7e0e7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
37 deletions
+26
-37
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+20
-31
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+3
-3
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+3
-3
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
a7963bfa
...
@@ -81,10 +81,10 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
...
@@ -81,10 +81,10 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
switch
(
p_item
->
i_type
)
switch
(
p_item
->
i_type
)
{
{
case
CONFIG_ITEM_MODULE
:
case
CONFIG_ITEM_MODULE
:
p_control
=
new
ModuleConfigControl
(
p_this
,
p_item
,
parent
,
false
);
p_control
=
new
StringListConfigControl
(
p_this
,
p_item
,
parent
);
break
;
break
;
case
CONFIG_ITEM_MODULE_CAT
:
case
CONFIG_ITEM_MODULE_CAT
:
p_control
=
new
ModuleConfigControl
(
p_this
,
p_item
,
parent
,
true
);
p_control
=
new
ModuleConfigControl
(
p_this
,
p_item
,
parent
);
break
;
break
;
case
CONFIG_ITEM_MODULE_LIST
:
case
CONFIG_ITEM_MODULE_LIST
:
p_control
=
new
ModuleListConfigControl
(
p_this
,
p_item
,
parent
,
false
);
p_control
=
new
ModuleListConfigControl
(
p_this
,
p_item
,
parent
,
false
);
...
@@ -509,13 +509,13 @@ void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf,
...
@@ -509,13 +509,13 @@ void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf,
/********* Module **********/
/********* Module **********/
ModuleConfigControl
::
ModuleConfigControl
(
vlc_object_t
*
_p_this
,
ModuleConfigControl
::
ModuleConfigControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
_p_item
,
QWidget
*
p
,
bool
bycat
)
:
module_config_t
*
_p_item
,
QWidget
*
p
)
:
VStringConfigControl
(
_p_this
,
_p_item
)
VStringConfigControl
(
_p_this
,
_p_item
)
{
{
label
=
new
QLabel
(
qtr
(
p_item
->
psz_text
),
p
);
label
=
new
QLabel
(
qtr
(
p_item
->
psz_text
),
p
);
combo
=
new
QComboBox
(
p
);
combo
=
new
QComboBox
(
p
);
combo
->
setMinimumWidth
(
MINWIDTH_BOX
);
combo
->
setMinimumWidth
(
MINWIDTH_BOX
);
finish
(
bycat
);
finish
(
);
}
}
void
ModuleConfigControl
::
fillGrid
(
QGridLayout
*
l
,
int
line
)
void
ModuleConfigControl
::
fillGrid
(
QGridLayout
*
l
,
int
line
)
...
@@ -525,15 +525,15 @@ void ModuleConfigControl::fillGrid( QGridLayout *l, int line )
...
@@ -525,15 +525,15 @@ void ModuleConfigControl::fillGrid( QGridLayout *l, int line )
}
}
ModuleConfigControl
::
ModuleConfigControl
(
vlc_object_t
*
_p_this
,
ModuleConfigControl
::
ModuleConfigControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
_p_item
,
QLabel
*
_label
,
QComboBox
*
_combo
,
module_config_t
*
_p_item
,
QLabel
*
_label
,
QComboBox
*
_combo
)
bool
bycat
)
:
VStringConfigControl
(
_p_this
,
_p_item
)
:
VStringConfigControl
(
_p_this
,
_p_item
)
{
{
combo
=
_combo
;
combo
=
_combo
;
label
=
_label
;
label
=
_label
;
finish
(
bycat
);
finish
(
);
}
}
void
ModuleConfigControl
::
finish
(
bool
bycat
)
void
ModuleConfigControl
::
finish
(
)
{
{
combo
->
setEditable
(
false
);
combo
->
setEditable
(
false
);
...
@@ -545,8 +545,6 @@ void ModuleConfigControl::finish( bool bycat )
...
@@ -545,8 +545,6 @@ void ModuleConfigControl::finish( bool bycat )
{
{
module_t
*
p_parser
=
p_list
[
i
];
module_t
*
p_parser
=
p_list
[
i
];
if
(
bycat
)
{
if
(
!
strcmp
(
module_get_object
(
p_parser
),
"main"
)
)
continue
;
if
(
!
strcmp
(
module_get_object
(
p_parser
),
"main"
)
)
continue
;
unsigned
confsize
;
unsigned
confsize
;
...
@@ -567,15 +565,6 @@ void ModuleConfigControl::finish( bool bycat )
...
@@ -567,15 +565,6 @@ void ModuleConfigControl::finish( bool bycat )
}
}
module_config_free
(
p_config
);
module_config_free
(
p_config
);
}
}
else
if
(
module_provides
(
p_parser
,
p_item
->
psz_type
)
)
{
combo
->
addItem
(
qtr
(
module_GetLongName
(
p_parser
)
),
QVariant
(
module_get_object
(
p_parser
)
)
);
if
(
p_item
->
value
.
psz
&&
!
strcmp
(
p_item
->
value
.
psz
,
module_get_object
(
p_parser
)
)
)
combo
->
setCurrentIndex
(
combo
->
count
()
-
1
);
}
}
module_list_free
(
p_list
);
module_list_free
(
p_list
);
if
(
p_item
->
psz_longtext
)
if
(
p_item
->
psz_longtext
)
...
...
modules/gui/qt4/components/preferences_widgets.hpp
View file @
a7963bfa
...
@@ -386,9 +386,9 @@ protected:
...
@@ -386,9 +386,9 @@ protected:
class
ModuleConfigControl
:
public
VStringConfigControl
class
ModuleConfigControl
:
public
VStringConfigControl
{
{
public:
public:
ModuleConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QWidget
*
,
bool
);
ModuleConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QWidget
*
);
ModuleConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QLabel
*
,
ModuleConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QLabel
*
,
QComboBox
*
,
bool
);
QComboBox
*
);
virtual
QString
getValue
()
const
;
virtual
QString
getValue
()
const
;
protected:
protected:
virtual
void
changeVisibility
(
bool
b
)
virtual
void
changeVisibility
(
bool
b
)
...
@@ -398,7 +398,7 @@ protected:
...
@@ -398,7 +398,7 @@ protected:
}
}
virtual
void
fillGrid
(
QGridLayout
*
,
int
);
virtual
void
fillGrid
(
QGridLayout
*
,
int
);
private:
private:
void
finish
(
bool
);
void
finish
(
);
QLabel
*
label
;
QLabel
*
label
;
QComboBox
*
combo
;
QComboBox
*
combo
;
};
};
...
...
modules/gui/qt4/components/simple_preferences.cpp
View file @
a7963bfa
...
@@ -221,7 +221,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -221,7 +221,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_BOOL
(
"overlay"
,
overlay
);
CONFIG_BOOL
(
"overlay"
,
overlay
);
CONFIG_BOOL
(
"video-on-top"
,
alwaysOnTop
);
CONFIG_BOOL
(
"video-on-top"
,
alwaysOnTop
);
CONFIG_BOOL
(
"video-deco"
,
windowDecorations
);
CONFIG_BOOL
(
"video-deco"
,
windowDecorations
);
CONFIG_GENERIC
(
"vout"
,
Module
,
ui
.
voutLabel
,
outputModule
);
CONFIG_GENERIC
(
"vout"
,
StringList
,
ui
.
voutLabel
,
outputModule
);
#ifdef WIN32
#ifdef WIN32
CONFIG_GENERIC
(
"directx-device"
,
StringList
,
ui
.
dxDeviceLabel
,
CONFIG_GENERIC
(
"directx-device"
,
StringList
,
ui
.
dxDeviceLabel
,
...
@@ -350,12 +350,12 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -350,12 +350,12 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
volNormSpin
);
volNormSpin
);
CONFIG_GENERIC
(
"audio-replay-gain-mode"
,
StringList
,
ui
.
replayLabel
,
CONFIG_GENERIC
(
"audio-replay-gain-mode"
,
StringList
,
ui
.
replayLabel
,
replayCombo
);
replayCombo
);
CONFIG_GENERIC
(
"audio-visual"
,
Module
,
ui
.
visuLabel
,
CONFIG_GENERIC
(
"audio-visual"
,
StringList
,
ui
.
visuLabel
,
visualisation
);
visualisation
);
CONFIG_BOOL
(
"audio-time-stretch"
,
autoscaleBox
);
CONFIG_BOOL
(
"audio-time-stretch"
,
autoscaleBox
);
/* Audio Output Specifics */
/* Audio Output Specifics */
CONFIG_GENERIC
(
"aout"
,
Module
,
ui
.
outputLabel
,
outputModule
);
CONFIG_GENERIC
(
"aout"
,
StringList
,
ui
.
outputLabel
,
outputModule
);
CONNECT
(
ui
.
outputModule
,
currentIndexChanged
(
int
),
CONNECT
(
ui
.
outputModule
,
currentIndexChanged
(
int
),
this
,
updateAudioOptions
(
int
)
);
this
,
updateAudioOptions
(
int
)
);
...
...
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