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
9a78b063
Commit
9a78b063
authored
Oct 11, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A bit of cleanup
parent
ba0aca83
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
112 deletions
+91
-112
modules/gui/qt4/components/preferences.cpp
modules/gui/qt4/components/preferences.cpp
+91
-112
No files found.
modules/gui/qt4/components/preferences.cpp
View file @
9a78b063
...
...
@@ -61,11 +61,6 @@
PrefsTree
::
PrefsTree
(
intf_thread_t
*
_p_intf
,
QWidget
*
_parent
)
:
QTreeWidget
(
_parent
),
p_intf
(
_p_intf
)
{
module_t
*
p_module
;
vlc_list_t
*
p_list
=
vlc_list_find
(
p_intf
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
if
(
!
p_list
)
return
;
setColumnCount
(
1
);
setIconSize
(
QSize
(
ITEM_HEIGHT
,
ITEM_HEIGHT
)
);
setAlternatingRowColors
(
true
);
...
...
@@ -83,14 +78,20 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
/* Build the tree for the main module */
int
i_index
;
module_t
*
p_module
;
vlc_list_t
*
p_list
=
vlc_list_find
(
p_intf
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
bool
found
=
true
;
if
(
!
p_list
)
return
;
for
(
i_index
=
0
;
i_index
<
p_list
->
i_count
;
i_index
++
)
{
p_module
=
(
module_t
*
)
p_list
->
p_values
[
i_index
].
p_object
;
if
(
!
strcmp
(
p_module
->
psz_object_name
,
"main"
)
)
break
;
if
(
!
strcmp
(
p_module
->
psz_object_name
,
"main"
)
)
{
found
=
true
;
break
;
}
if
(
i_index
<
p_list
->
i_count
)
{
}
assert
(
found
);
module_config_t
*
p_item
=
p_module
->
p_config
;
PrefsItemData
*
data
=
NULL
;
QTreeWidgetItem
*
current_item
=
NULL
;
...
...
@@ -182,7 +183,6 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
break
;
}
}
while
(
p_item
->
i_type
!=
CONFIG_HINT_END
&&
p_item
++
);
}
/* Build the tree of plugins */
for
(
int
i_index
=
0
;
i_index
<
p_list
->
i_count
;
i_index
++
)
...
...
@@ -284,7 +284,6 @@ void PrefsTree::cleanAll()
doAll
(
true
);
}
/// \todo When cleaning, we should remove the panel ?
void
PrefsTree
::
doAll
(
bool
doclean
)
{
for
(
int
i_cat_index
=
0
;
i_cat_index
<
topLevelItemCount
();
...
...
@@ -350,29 +349,9 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
p_module
=
(
module_t
*
)
vlc_object_get
(
p_intf
,
data
->
i_object_id
);
else
{
/* List the plugins */
int
i_index
;
vlc_bool_t
b_found
=
VLC_FALSE
;
vlc_list_t
*
p_list
=
vlc_list_find
(
p_intf
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
if
(
!
p_list
)
return
;
for
(
i_index
=
0
;
i_index
<
p_list
->
i_count
;
i_index
++
)
{
p_module
=
(
module_t
*
)
p_list
->
p_values
[
i_index
].
p_object
;
if
(
!
strcmp
(
p_module
->
psz_object_name
,
"main"
)
)
{
b_found
=
VLC_TRUE
;
break
;
}
}
if
(
!
p_module
&&
!
b_found
)
{
msg_Warn
(
p_intf
,
"unable to create preferences (main not found)"
);
return
;
}
if
(
p_module
)
vlc_object_yield
(
p_module
);
vlc_list_release
(
p_list
);
p_module
=
config_FindModule
(
p_intf
,
"main"
);
assert
(
p_module
);
vlc_object_yield
(
p_module
);
}
if
(
p_module
->
b_submodule
)
...
...
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