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
a05072b5
Commit
a05072b5
authored
Dec 26, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: prefsItem: namespace TYPE_*
parent
6f8e8326
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
25 deletions
+26
-25
modules/gui/qt4/components/complete_preferences.cpp
modules/gui/qt4/components/complete_preferences.cpp
+18
-16
modules/gui/qt4/components/complete_preferences.hpp
modules/gui/qt4/components/complete_preferences.hpp
+8
-9
No files found.
modules/gui/qt4/components/complete_preferences.cpp
View file @
a05072b5
...
...
@@ -108,7 +108,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
data
->
help
=
qtr
(
psz_help
);
else
data
->
help
.
clear
();
data
->
i_type
=
TYPE_CATEGORY
;
data
->
i_type
=
PrefsItemData
::
TYPE_CATEGORY
;
data
->
i_object_id
=
p_item
->
value
.
i
;
/* This is a category, put a nice icon */
...
...
@@ -151,7 +151,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
p_item
->
value
.
i
==
SUBCAT_AUDIO_GENERAL
)
)
{
/* Data still contains the correct thing */
data
->
i_type
=
TYPE_CATSUBCAT
;
data
->
i_type
=
PrefsItemData
::
TYPE_CATSUBCAT
;
data
->
i_subcat_id
=
p_item
->
value
.
i
;
data
->
name
=
qtr
(
config_CategoryNameGet
(
p_item
->
value
.
i
)
);
psz_help
=
config_CategoryHelpGet
(
p_item
->
value
.
i
);
...
...
@@ -174,7 +174,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
data_sub
->
help
=
qtr
(
psz_help
);
else
data_sub
->
help
.
clear
();
data_sub
->
i_type
=
TYPE_SUBCATEGORY
;
data_sub
->
i_type
=
PrefsItemData
::
TYPE_SUBCATEGORY
;
data_sub
->
i_object_id
=
p_item
->
value
.
i
;
/* Create a new TreeWidget */
...
...
@@ -269,7 +269,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
if
(
!
b_found
)
continue
;
PrefsItemData
*
module_data
=
new
PrefsItemData
();
module_data
->
i_type
=
TYPE_MODULE
;
module_data
->
i_type
=
PrefsItemData
::
TYPE_MODULE
;
module_data
->
psz_name
=
strdup
(
module_get_object
(
p_module
)
);
module_data
->
name
=
qtr
(
module_get_name
(
p_module
,
false
)
);
module_data
->
help
.
clear
();
...
...
@@ -581,9 +581,9 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
{
/* Find our module */
module_t
*
p_module
=
NULL
;
if
(
data
->
i_type
==
TYPE_CATEGORY
)
if
(
data
->
i_type
==
PrefsItemData
::
TYPE_CATEGORY
)
return
;
else
if
(
data
->
i_type
==
TYPE_MODULE
)
else
if
(
data
->
i_type
==
PrefsItemData
::
TYPE_MODULE
)
p_module
=
module_find
(
data
->
psz_name
);
else
{
...
...
@@ -596,15 +596,16 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
*
p_item
=
p_config
,
*
p_end
=
p_config
+
confsize
;
if
(
data
->
i_type
==
TYPE_SUBCATEGORY
||
data
->
i_type
==
TYPE_CATSUBCAT
)
if
(
data
->
i_type
==
PrefsItemData
::
TYPE_SUBCATEGORY
||
data
->
i_type
==
PrefsItemData
::
TYPE_CATSUBCAT
)
{
while
(
p_item
<
p_end
)
{
if
(
p_item
->
i_type
==
CONFIG_SUBCATEGORY
&&
(
(
data
->
i_type
==
TYPE_SUBCATEGORY
&&
p_item
->
value
.
i
==
data
->
i_object_id
)
||
(
data
->
i_type
==
TYPE_CATSUBCAT
&&
p_item
->
value
.
i
==
data
->
i_subcat_id
)
)
)
(
(
data
->
i_type
==
PrefsItemData
::
TYPE_SUBCATEGORY
&&
p_item
->
value
.
i
==
data
->
i_object_id
)
||
(
data
->
i_type
==
PrefsItemData
::
TYPE_CATSUBCAT
&&
p_item
->
value
.
i
==
data
->
i_subcat_id
)
)
)
break
;
p_item
++
;
}
...
...
@@ -618,7 +619,8 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
help
=
QString
(
data
->
help
);
if
(
data
->
i_type
==
TYPE_SUBCATEGORY
||
data
->
i_type
==
TYPE_CATSUBCAT
)
if
(
data
->
i_type
==
PrefsItemData
::
TYPE_SUBCATEGORY
||
data
->
i_type
==
PrefsItemData
::
TYPE_CATSUBCAT
)
{
head
=
QString
(
data
->
name
);
p_item
++
;
// Why that ?
...
...
@@ -658,9 +660,9 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
if
(
p_item
)
do
{
if
(
(
(
data
->
i_type
==
TYPE_SUBCATEGORY
&&
if
(
(
(
data
->
i_type
==
PrefsItemData
::
TYPE_SUBCATEGORY
&&
p_item
->
value
.
i
!=
data
->
i_object_id
)
||
(
data
->
i_type
==
TYPE_CATSUBCAT
&&
(
data
->
i_type
==
PrefsItemData
::
TYPE_CATSUBCAT
&&
p_item
->
value
.
i
!=
data
->
i_subcat_id
)
)
&&
(
p_item
->
i_type
==
CONFIG_CATEGORY
||
p_item
->
i_type
==
CONFIG_SUBCATEGORY
)
)
...
...
@@ -702,8 +704,8 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
else
i_line
++
;
controls
.
append
(
control
);
}
while
(
!
(
(
data
->
i_type
==
TYPE_SUBCATEGORY
||
data
->
i_type
==
TYPE_CATSUBCAT
)
&&
while
(
!
(
(
data
->
i_type
==
PrefsItemData
::
TYPE_SUBCATEGORY
||
data
->
i_type
==
PrefsItemData
::
TYPE_CATSUBCAT
)
&&
(
p_item
->
i_type
==
CONFIG_CATEGORY
||
p_item
->
i_type
==
CONFIG_SUBCATEGORY
)
)
&&
(
++
p_item
<
p_end
)
);
...
...
modules/gui/qt4/components/complete_preferences.hpp
View file @
a05072b5
...
...
@@ -34,14 +34,6 @@
#include <QTreeWidget>
#include <QSet>
enum
{
TYPE_CATEGORY
,
TYPE_CATSUBCAT
,
TYPE_SUBCATEGORY
,
TYPE_MODULE
};
class
AdvPrefsPanel
;
class
QLabel
;
class
QVBoxLayout
;
...
...
@@ -56,7 +48,14 @@ public:
AdvPrefsPanel
*
panel
;
int
i_object_id
;
int
i_subcat_id
;
int
i_type
;
enum
prefsType
{
TYPE_CATEGORY
,
TYPE_CATSUBCAT
,
TYPE_SUBCATEGORY
,
TYPE_MODULE
};
prefsType
i_type
;
char
*
psz_name
;
bool
b_loaded
;
QString
name
;
...
...
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