Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
34302f82
Commit
34302f82
authored
Aug 13, 2008
by
Jean-Philippe Andre
Committed by
Jean-Baptiste Kempf
Aug 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt menus: remove useless FindActionWithText
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
d004a7f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
22 deletions
+8
-22
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+8
-22
No files found.
modules/gui/qt4/menus.cpp
View file @
34302f82
...
@@ -191,7 +191,9 @@ static int VideoAutoMenuBuilder( vlc_object_t *p_object,
...
@@ -191,7 +191,9 @@ static int VideoAutoMenuBuilder( vlc_object_t *p_object,
PUSH_VAR
(
"aspect-ratio"
);
PUSH_VAR
(
"aspect-ratio"
);
PUSH_VAR
(
"crop"
);
PUSH_VAR
(
"crop"
);
PUSH_VAR
(
"video-on-top"
);
PUSH_VAR
(
"video-on-top"
);
#ifdef WIN32
PUSH_VAR
(
"directx-wallpaper"
);
PUSH_VAR
(
"directx-wallpaper"
);
#endif
PUSH_VAR
(
"video-snapshot"
);
PUSH_VAR
(
"video-snapshot"
);
if
(
p_object
)
if
(
p_object
)
...
@@ -232,17 +234,6 @@ static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
...
@@ -232,17 +234,6 @@ static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
return
NULL
;
return
NULL
;
}
}
static
QAction
*
FindActionWithText
(
QMenu
*
menu
,
QString
&
text
)
{
QAction
*
action
;
foreach
(
action
,
menu
->
actions
()
)
{
if
(
action
->
text
()
==
text
)
return
action
;
}
return
NULL
;
}
/*****************************************************************************
/*****************************************************************************
* All normal menus
* All normal menus
* Simple Code
* Simple Code
...
@@ -506,7 +497,9 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
...
@@ -506,7 +497,9 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
ACT_ADD
(
current
,
"aspect-ratio"
,
qtr
(
"&Aspect Ratio"
)
);
ACT_ADD
(
current
,
"aspect-ratio"
,
qtr
(
"&Aspect Ratio"
)
);
ACT_ADD
(
current
,
"crop"
,
qtr
(
"&Crop"
)
);
ACT_ADD
(
current
,
"crop"
,
qtr
(
"&Crop"
)
);
ACT_ADD
(
current
,
"video-on-top"
,
qtr
(
"Always &On Top"
)
);
ACT_ADD
(
current
,
"video-on-top"
,
qtr
(
"Always &On Top"
)
);
/* ACT_ADD( current, "directx-wallpaper", qtr( "DirectX Wallpaper" ) ); */
#ifdef WIN32
ACT_ADD
(
current
,
"directx-wallpaper"
,
qtr
(
"DirectX Wallpaper"
)
);
#endif
ACT_ADD
(
current
,
"video-snapshot"
,
qtr
(
"Sna&pshot"
)
);
ACT_ADD
(
current
,
"video-snapshot"
,
qtr
(
"Sna&pshot"
)
);
/* ACT_ADD( current, "ffmpeg-pp-q", qtr( "Decoder" ) ); */
/* ACT_ADD( current, "ffmpeg-pp-q", qtr( "Decoder" ) ); */
}
}
...
@@ -1235,19 +1228,12 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
...
@@ -1235,19 +1228,12 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
{
{
QAction
*
action
=
FindActionWithVar
(
menu
,
psz_var
);
QAction
*
action
=
FindActionWithVar
(
menu
,
psz_var
);
if
(
!
action
)
if
(
!
action
)
{
/* This is a value */
action
=
FindActionWithText
(
menu
,
text
);
if
(
!
action
)
{
{
action
=
new
QAction
(
text
,
menu
);
action
=
new
QAction
(
text
,
menu
);
menu
->
addAction
(
action
);
menu
->
addAction
(
action
);
}
}
}
/* FIXME action->setText( text ); */
action
->
setToolTip
(
help
);
action
->
setToolTip
(
help
);
action
->
setEnabled
(
i_object_id
!=
0
);
action
->
setEnabled
(
i_object_id
!=
0
);
if
(
i_item_type
==
ITEM_CHECK
)
if
(
i_item_type
==
ITEM_CHECK
)
...
...
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