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
b9bfa887
Commit
b9bfa887
authored
Feb 20, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: menus, minor code reorg.
parent
5987ab5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
26 deletions
+29
-26
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+29
-26
No files found.
modules/gui/qt4/menus.cpp
View file @
b9bfa887
...
...
@@ -110,6 +110,26 @@ void addDPStaticEntry( QMenu *menu,
action
->
setData
(
true
);
}
/***
* Same for MIM
***/
void
addMIMStaticEntry
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
,
const
QString
text
,
const
char
*
icon
,
const
char
*
member
)
{
if
(
strlen
(
icon
)
>
0
)
{
QAction
*
action
=
menu
->
addAction
(
text
,
THEMIM
,
member
);
action
->
setIcon
(
QIcon
(
icon
)
);
}
else
{
menu
->
addAction
(
text
,
THEMIM
,
member
);
}
}
/**
* @brief Enable all static entries, disable the others
* @param enable if false, disable all entries
...
...
@@ -144,24 +164,18 @@ int DeleteNonStaticEntries( QMenu *menu )
return
i_ret
;
}
/***
* Same for MIM
***/
void
addMIMStaticEntry
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
,
const
QString
text
,
const
char
*
icon
,
const
char
*
member
)
/**
* \return QAction associated to psz_var variable
**/
static
QAction
*
FindActionWithVar
(
QMenu
*
menu
,
const
char
*
psz_var
)
{
if
(
strlen
(
icon
)
>
0
)
{
QAction
*
action
=
menu
->
addAction
(
text
,
THEMIM
,
member
);
action
->
setIcon
(
QIcon
(
icon
)
);
}
else
QList
<
QAction
*
>
actions
=
menu
->
actions
();
for
(
int
i
=
0
;
i
<
actions
.
size
();
++
i
)
{
menu
->
addAction
(
text
,
THEMIM
,
member
);
if
(
actions
[
i
]
->
data
().
toString
()
==
psz_var
)
return
actions
[
i
];
}
return
NULL
;
}
/*****************************************************************************
...
...
@@ -225,17 +239,6 @@ static int AudioAutoMenuBuilder( aout_instance_t *p_object,
return
VLC_SUCCESS
;
}
static
QAction
*
FindActionWithVar
(
QMenu
*
menu
,
const
char
*
psz_var
)
{
QList
<
QAction
*
>
actions
=
menu
->
actions
();
for
(
int
i
=
0
;
i
<
actions
.
size
();
++
i
)
{
if
(
actions
[
i
]
->
data
().
toString
()
==
psz_var
)
return
actions
[
i
];
}
return
NULL
;
}
/*****************************************************************************
* All normal menus
* Simple Code
...
...
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