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
2dc2da86
Commit
2dc2da86
authored
Dec 05, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: menus: rename MenusManager to MenuBar.
as *Manager seems disliked.
parent
7cf467ae
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
68 deletions
+68
-68
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+1
-1
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+1
-1
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+9
-9
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+2
-2
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+10
-10
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+37
-37
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+6
-6
modules/gui/qt4/recents.cpp
modules/gui/qt4/recents.cpp
+2
-2
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
2dc2da86
...
@@ -272,7 +272,7 @@ void BackgroundWidget::paintEvent( QPaintEvent *e )
...
@@ -272,7 +272,7 @@ void BackgroundWidget::paintEvent( QPaintEvent *e )
void
BackgroundWidget
::
contextMenuEvent
(
QContextMenuEvent
*
event
)
void
BackgroundWidget
::
contextMenuEvent
(
QContextMenuEvent
*
event
)
{
{
QVLCMenuManage
r
::
PopupMenu
(
p_intf
,
true
);
VLCMenuBa
r
::
PopupMenu
(
p_intf
,
true
);
event
->
accept
();
event
->
accept
();
}
}
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
2dc2da86
...
@@ -120,7 +120,7 @@ void StandardPLPanel::popupPlView( const QPoint &point )
...
@@ -120,7 +120,7 @@ void StandardPLPanel::popupPlView( const QPoint &point )
QModelIndexList
list
=
selection
->
selectedIndexes
();
QModelIndexList
list
=
selection
->
selectedIndexes
();
if
(
!
model
->
popup
(
index
,
globalPoint
,
list
)
)
if
(
!
model
->
popup
(
index
,
globalPoint
,
list
)
)
QVLCMenuManage
r
::
PopupMenu
(
p_intf
,
true
);
VLCMenuBa
r
::
PopupMenu
(
p_intf
,
true
);
}
}
void
StandardPLPanel
::
popupSelectColumn
(
QPoint
)
void
StandardPLPanel
::
popupSelectColumn
(
QPoint
)
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
2dc2da86
...
@@ -102,10 +102,10 @@ DialogsProvider::~DialogsProvider()
...
@@ -102,10 +102,10 @@ DialogsProvider::~DialogsProvider()
delete
menusUpdateMapper
;
delete
menusUpdateMapper
;
delete
SDMapper
;
delete
SDMapper
;
QVLCMenuManage
r
::
PopupMenu
(
p_intf
,
false
);
VLCMenuBa
r
::
PopupMenu
(
p_intf
,
false
);
QVLCMenuManage
r
::
AudioPopupMenu
(
p_intf
,
false
);
VLCMenuBa
r
::
AudioPopupMenu
(
p_intf
,
false
);
QVLCMenuManage
r
::
VideoPopupMenu
(
p_intf
,
false
);
VLCMenuBa
r
::
VideoPopupMenu
(
p_intf
,
false
);
QVLCMenuManage
r
::
MiscPopupMenu
(
p_intf
,
false
);
VLCMenuBa
r
::
MiscPopupMenu
(
p_intf
,
false
);
}
}
void
DialogsProvider
::
quit
()
void
DialogsProvider
::
quit
()
...
@@ -152,13 +152,13 @@ void DialogsProvider::customEvent( QEvent *event )
...
@@ -152,13 +152,13 @@ void DialogsProvider::customEvent( QEvent *event )
vlmDialog
();
break
;
vlmDialog
();
break
;
#endif
#endif
case
INTF_DIALOG_POPUPMENU
:
case
INTF_DIALOG_POPUPMENU
:
QVLCMenuManage
r
::
PopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
VLCMenuBa
r
::
PopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
case
INTF_DIALOG_AUDIOPOPUPMENU
:
case
INTF_DIALOG_AUDIOPOPUPMENU
:
QVLCMenuManage
r
::
AudioPopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
VLCMenuBa
r
::
AudioPopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
case
INTF_DIALOG_VIDEOPOPUPMENU
:
case
INTF_DIALOG_VIDEOPOPUPMENU
:
QVLCMenuManage
r
::
VideoPopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
VLCMenuBa
r
::
VideoPopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
case
INTF_DIALOG_MISCPOPUPMENU
:
case
INTF_DIALOG_MISCPOPUPMENU
:
QVLCMenuManage
r
::
MiscPopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
VLCMenuBa
r
::
MiscPopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
case
INTF_DIALOG_WIZARD
:
case
INTF_DIALOG_WIZARD
:
case
INTF_DIALOG_STREAMWIZARD
:
case
INTF_DIALOG_STREAMWIZARD
:
openAndStreamingDialogs
();
break
;
openAndStreamingDialogs
();
break
;
...
@@ -724,7 +724,7 @@ void DialogsProvider::loadSubtitlesFile()
...
@@ -724,7 +724,7 @@ void DialogsProvider::loadSubtitlesFile()
void
DialogsProvider
::
menuAction
(
QObject
*
data
)
void
DialogsProvider
::
menuAction
(
QObject
*
data
)
{
{
QVLCMenuManage
r
::
DoAction
(
data
);
VLCMenuBa
r
::
DoAction
(
data
);
}
}
void
DialogsProvider
::
menuUpdateAction
(
QObject
*
data
)
void
DialogsProvider
::
menuUpdateAction
(
QObject
*
data
)
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
2dc2da86
...
@@ -83,12 +83,12 @@ enum {
...
@@ -83,12 +83,12 @@ enum {
class
QEvent
;
class
QEvent
;
class
QSignalMapper
;
class
QSignalMapper
;
class
QVLCMenuManage
r
;
class
VLCMenuBa
r
;
class
DialogsProvider
:
public
QObject
class
DialogsProvider
:
public
QObject
{
{
Q_OBJECT
Q_OBJECT
friend
class
QVLCMenuManage
r
;
friend
class
VLCMenuBa
r
;
public:
public:
static
DialogsProvider
*
getInstance
()
static
DialogsProvider
*
getInstance
()
...
...
modules/gui/qt4/main_interface.cpp
View file @
2dc2da86
...
@@ -146,7 +146,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
...
@@ -146,7 +146,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/************
/************
* Menu Bar *
* Menu Bar *
************/
************/
QVLCMenuManage
r
::
createMenuBar
(
this
,
p_intf
);
VLCMenuBa
r
::
createMenuBar
(
this
,
p_intf
);
CONNECT
(
THEMIM
->
getIM
(),
voutListChanged
(
vout_thread_t
**
,
int
),
CONNECT
(
THEMIM
->
getIM
(),
voutListChanged
(
vout_thread_t
**
,
int
),
this
,
destroyPopupMenu
()
);
this
,
destroyPopupMenu
()
);
...
@@ -570,12 +570,12 @@ inline void MainInterface::showTab( QWidget *widget )
...
@@ -570,12 +570,12 @@ inline void MainInterface::showTab( QWidget *widget )
void
MainInterface
::
destroyPopupMenu
()
void
MainInterface
::
destroyPopupMenu
()
{
{
QVLCMenuManage
r
::
PopupMenu
(
p_intf
,
false
);
VLCMenuBa
r
::
PopupMenu
(
p_intf
,
false
);
}
}
void
MainInterface
::
popupMenu
(
const
QPoint
&
)
void
MainInterface
::
popupMenu
(
const
QPoint
&
)
{
{
QVLCMenuManage
r
::
PopupMenu
(
p_intf
,
true
);
VLCMenuBa
r
::
PopupMenu
(
p_intf
,
true
);
}
}
void
MainInterface
::
toggleFSC
()
void
MainInterface
::
toggleFSC
()
...
@@ -1002,7 +1002,7 @@ void MainInterface::createSystray()
...
@@ -1002,7 +1002,7 @@ void MainInterface::createSystray()
systrayMenu
=
new
QMenu
(
qtr
(
"VLC media player"
),
this
);
systrayMenu
=
new
QMenu
(
qtr
(
"VLC media player"
),
this
);
systrayMenu
->
setIcon
(
iconVLC
);
systrayMenu
->
setIcon
(
iconVLC
);
QVLCMenuManage
r
::
updateSystrayMenu
(
this
,
p_intf
,
true
);
VLCMenuBa
r
::
updateSystrayMenu
(
this
,
p_intf
,
true
);
sysTray
->
show
();
sysTray
->
show
();
CONNECT
(
sysTray
,
activated
(
QSystemTrayIcon
::
ActivationReason
),
CONNECT
(
sysTray
,
activated
(
QSystemTrayIcon
::
ActivationReason
),
...
@@ -1062,7 +1062,7 @@ void MainInterface::toggleUpdateSystrayMenu()
...
@@ -1062,7 +1062,7 @@ void MainInterface::toggleUpdateSystrayMenu()
#endif
#endif
}
}
if
(
sysTray
)
if
(
sysTray
)
QVLCMenuManage
r
::
updateSystrayMenu
(
this
,
p_intf
);
VLCMenuBa
r
::
updateSystrayMenu
(
this
,
p_intf
);
}
}
/* First Item of the systray menu */
/* First Item of the systray menu */
...
@@ -1074,14 +1074,14 @@ void MainInterface::showUpdateSystrayMenu()
...
@@ -1074,14 +1074,14 @@ void MainInterface::showUpdateSystrayMenu()
showNormal
();
showNormal
();
activateWindow
();
activateWindow
();
QVLCMenuManage
r
::
updateSystrayMenu
(
this
,
p_intf
);
VLCMenuBa
r
::
updateSystrayMenu
(
this
,
p_intf
);
}
}
/* First Item of the systray menu */
/* First Item of the systray menu */
void
MainInterface
::
hideUpdateSystrayMenu
()
void
MainInterface
::
hideUpdateSystrayMenu
()
{
{
hide
();
hide
();
QVLCMenuManage
r
::
updateSystrayMenu
(
this
,
p_intf
);
VLCMenuBa
r
::
updateSystrayMenu
(
this
,
p_intf
);
}
}
/* Click on systray Icon */
/* Click on systray Icon */
...
@@ -1093,7 +1093,7 @@ void MainInterface::handleSystrayClick(
...
@@ -1093,7 +1093,7 @@ void MainInterface::handleSystrayClick(
case
QSystemTrayIcon
:
:
Trigger
:
case
QSystemTrayIcon
:
:
Trigger
:
case
QSystemTrayIcon
:
:
DoubleClick
:
case
QSystemTrayIcon
:
:
DoubleClick
:
#ifdef Q_WS_MAC
#ifdef Q_WS_MAC
QVLCMenuManage
r
::
updateSystrayMenu
(
this
,
p_intf
);
VLCMenuBa
r
::
updateSystrayMenu
(
this
,
p_intf
);
#else
#else
toggleUpdateSystrayMenu
();
toggleUpdateSystrayMenu
();
#endif
#endif
...
@@ -1128,7 +1128,7 @@ void MainInterface::updateSystrayTooltipName( const QString& name )
...
@@ -1128,7 +1128,7 @@ void MainInterface::updateSystrayTooltipName( const QString& name )
}
}
}
}
QVLCMenuManage
r
::
updateSystrayMenu
(
this
,
p_intf
);
VLCMenuBa
r
::
updateSystrayMenu
(
this
,
p_intf
);
}
}
/**
/**
...
@@ -1149,7 +1149,7 @@ void MainInterface::updateSystrayTooltipStatus( int i_status )
...
@@ -1149,7 +1149,7 @@ void MainInterface::updateSystrayTooltipStatus( int i_status )
sysTray
->
setToolTip
(
qtr
(
"VLC media player"
)
);
sysTray
->
setToolTip
(
qtr
(
"VLC media player"
)
);
break
;
break
;
}
}
QVLCMenuManage
r
::
updateSystrayMenu
(
this
,
p_intf
);
VLCMenuBa
r
::
updateSystrayMenu
(
this
,
p_intf
);
}
}
void
MainInterface
::
changeEvent
(
QEvent
*
event
)
void
MainInterface
::
changeEvent
(
QEvent
*
event
)
...
...
modules/gui/qt4/menus.cpp
View file @
2dc2da86
...
@@ -82,7 +82,7 @@ enum
...
@@ -82,7 +82,7 @@ enum
static
QActionGroup
*
currentGroup
;
static
QActionGroup
*
currentGroup
;
QMenu
*
QVLCMenuManage
r
::
recentsMenu
=
NULL
;
QMenu
*
VLCMenuBa
r
::
recentsMenu
=
NULL
;
/**
/**
* @brief Add static entries to DP in menus
* @brief Add static entries to DP in menus
...
@@ -113,7 +113,7 @@ QAction *addDPStaticEntry( QMenu *menu,
...
@@ -113,7 +113,7 @@ QAction *addDPStaticEntry( QMenu *menu,
else
else
action
=
menu
->
addAction
(
text
,
THEDP
,
member
);
action
=
menu
->
addAction
(
text
,
THEDP
,
member
);
}
}
action
->
setData
(
QVLCMenuManage
r
::
ACTION_STATIC
);
action
->
setData
(
VLCMenuBa
r
::
ACTION_STATIC
);
return
action
;
return
action
;
}
}
...
@@ -139,9 +139,9 @@ QAction* addMIMStaticEntry( intf_thread_t *p_intf,
...
@@ -139,9 +139,9 @@ QAction* addMIMStaticEntry( intf_thread_t *p_intf,
{
{
action
=
menu
->
addAction
(
text
,
THEMIM
,
member
);
action
=
menu
->
addAction
(
text
,
THEMIM
,
member
);
}
}
action
->
setData
(
QVLCMenuManage
r
::
ACTION_STATIC
|
action
->
setData
(
VLCMenuBa
r
::
ACTION_STATIC
|
(
bStatic
)
?
QVLCMenuManage
r
::
ACTION_ALWAYS_ENABLED
(
bStatic
)
?
VLCMenuBa
r
::
ACTION_ALWAYS_ENABLED
:
QVLCMenuManage
r
::
ACTION_NONE
:
VLCMenuBa
r
::
ACTION_NONE
);
);
return
action
;
return
action
;
}
}
...
@@ -151,7 +151,7 @@ QAction* addMIMStaticEntry( intf_thread_t *p_intf,
...
@@ -151,7 +151,7 @@ QAction* addMIMStaticEntry( intf_thread_t *p_intf,
* @param menu the menu in which the entries will be disabled
* @param menu the menu in which the entries will be disabled
* @param enable if false, disable all entries
* @param enable if false, disable all entries
**/
**/
void
QVLCMenuManage
r
::
EnableStaticEntries
(
QMenu
*
menu
,
bool
enable
=
true
)
void
VLCMenuBa
r
::
EnableStaticEntries
(
QMenu
*
menu
,
bool
enable
=
true
)
{
{
if
(
!
menu
)
return
;
if
(
!
menu
)
return
;
...
@@ -180,7 +180,7 @@ inline int DeleteNonStaticEntries( QMenu *menu )
...
@@ -180,7 +180,7 @@ inline int DeleteNonStaticEntries( QMenu *menu )
QList
<
QAction
*
>
actions
=
menu
->
actions
();
QList
<
QAction
*
>
actions
=
menu
->
actions
();
for
(
int
i
=
0
;
i
<
actions
.
count
();
++
i
)
for
(
int
i
=
0
;
i
<
actions
.
count
();
++
i
)
{
{
if
(
actions
[
i
]
->
data
().
toInt
()
&
QVLCMenuManage
r
::
ACTION_NO_CLEANUP
)
if
(
actions
[
i
]
->
data
().
toInt
()
&
VLCMenuBa
r
::
ACTION_NO_CLEANUP
)
i_ret
++
;
i_ret
++
;
else
else
delete
actions
[
i
];
delete
actions
[
i
];
...
@@ -306,7 +306,7 @@ static inline void addActionWithCheckbox( QMenu *_menu, QVariant val, QString ti
...
@@ -306,7 +306,7 @@ static inline void addActionWithCheckbox( QMenu *_menu, QVariant val, QString ti
/**
/**
* Main Menu Bar Creation
* Main Menu Bar Creation
**/
**/
void
QVLCMenuManage
r
::
createMenuBar
(
MainInterface
*
mi
,
void
VLCMenuBa
r
::
createMenuBar
(
MainInterface
*
mi
,
intf_thread_t
*
p_intf
)
intf_thread_t
*
p_intf
)
{
{
/* QMainWindows->menuBar()
/* QMainWindows->menuBar()
...
@@ -334,7 +334,7 @@ void QVLCMenuManager::createMenuBar( MainInterface *mi,
...
@@ -334,7 +334,7 @@ void QVLCMenuManager::createMenuBar( MainInterface *mi,
* Media ( File ) Menu
* Media ( File ) Menu
* Opening, streaming and quit
* Opening, streaming and quit
**/
**/
QMenu
*
QVLCMenuManage
r
::
FileMenu
(
intf_thread_t
*
p_intf
,
QWidget
*
parent
,
MainInterface
*
mi
)
QMenu
*
VLCMenuBa
r
::
FileMenu
(
intf_thread_t
*
p_intf
,
QWidget
*
parent
,
MainInterface
*
mi
)
{
{
QMenu
*
menu
=
new
QMenu
(
parent
);
QMenu
*
menu
=
new
QMenu
(
parent
);
QAction
*
action
;
QAction
*
action
;
...
@@ -398,7 +398,7 @@ QMenu *QVLCMenuManager::FileMenu( intf_thread_t *p_intf, QWidget *parent, MainIn
...
@@ -398,7 +398,7 @@ QMenu *QVLCMenuManager::FileMenu( intf_thread_t *p_intf, QWidget *parent, MainIn
/**
/**
* Tools, like Media Information, Preferences or Messages
* Tools, like Media Information, Preferences or Messages
**/
**/
QMenu
*
QVLCMenuManage
r
::
ToolsMenu
(
QMenu
*
menu
)
QMenu
*
VLCMenuBa
r
::
ToolsMenu
(
QMenu
*
menu
)
{
{
addDPStaticEntry
(
menu
,
qtr
(
"&Effects and Filters"
),
":/menu/settings"
,
addDPStaticEntry
(
menu
,
qtr
(
"&Effects and Filters"
),
":/menu/settings"
,
SLOT
(
extendedDialog
()
),
"Ctrl+E"
);
SLOT
(
extendedDialog
()
),
"Ctrl+E"
);
...
@@ -440,7 +440,7 @@ QMenu *QVLCMenuManager::ToolsMenu( QMenu *menu )
...
@@ -440,7 +440,7 @@ QMenu *QVLCMenuManager::ToolsMenu( QMenu *menu )
* Interface modification, load other interfaces, activate Extensions
* Interface modification, load other interfaces, activate Extensions
* \param current, set to NULL for menu creation, else for menu update
* \param current, set to NULL for menu creation, else for menu update
**/
**/
QMenu
*
QVLCMenuManage
r
::
ViewMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
current
,
MainInterface
*
_mi
)
QMenu
*
VLCMenuBa
r
::
ViewMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
current
,
MainInterface
*
_mi
)
{
{
QAction
*
action
;
QAction
*
action
;
QMenu
*
menu
;
QMenu
*
menu
;
...
@@ -531,7 +531,7 @@ QMenu *QVLCMenuManager::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInt
...
@@ -531,7 +531,7 @@ QMenu *QVLCMenuManager::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInt
/**
/**
* Interface Sub-Menu, to list extras interface and skins
* Interface Sub-Menu, to list extras interface and skins
**/
**/
QMenu
*
QVLCMenuManage
r
::
InterfacesMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
current
)
QMenu
*
VLCMenuBa
r
::
InterfacesMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
current
)
{
{
QVector
<
vlc_object_t
*>
objects
;
QVector
<
vlc_object_t
*>
objects
;
QVector
<
const
char
*>
varnames
;
QVector
<
const
char
*>
varnames
;
...
@@ -544,7 +544,7 @@ QMenu *QVLCMenuManager::InterfacesMenu( intf_thread_t *p_intf, QMenu *current )
...
@@ -544,7 +544,7 @@ QMenu *QVLCMenuManager::InterfacesMenu( intf_thread_t *p_intf, QMenu *current )
/**
/**
* Extensions menu: populate the current menu with extensions
* Extensions menu: populate the current menu with extensions
**/
**/
void
QVLCMenuManage
r
::
ExtensionsMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
extMenu
)
void
VLCMenuBa
r
::
ExtensionsMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
extMenu
)
{
{
/* Get ExtensionsManager and load extensions if needed */
/* Get ExtensionsManager and load extensions if needed */
ExtensionsManager
*
extMgr
=
ExtensionsManager
::
getInstance
(
p_intf
);
ExtensionsManager
*
extMgr
=
ExtensionsManager
::
getInstance
(
p_intf
);
...
@@ -571,19 +571,19 @@ static inline void VolumeEntries( intf_thread_t *p_intf, QMenu *current )
...
@@ -571,19 +571,19 @@ static inline void VolumeEntries( intf_thread_t *p_intf, QMenu *current )
QAction
*
action
=
current
->
addAction
(
qtr
(
"Increase Volume"
),
QAction
*
action
=
current
->
addAction
(
qtr
(
"Increase Volume"
),
ActionsManager
::
getInstance
(
p_intf
),
SLOT
(
AudioUp
()
)
);
ActionsManager
::
getInstance
(
p_intf
),
SLOT
(
AudioUp
()
)
);
action
->
setData
(
QVLCMenuManage
r
::
ACTION_STATIC
);
action
->
setData
(
VLCMenuBa
r
::
ACTION_STATIC
);
action
=
current
->
addAction
(
qtr
(
"Decrease Volume"
),
action
=
current
->
addAction
(
qtr
(
"Decrease Volume"
),
ActionsManager
::
getInstance
(
p_intf
),
SLOT
(
AudioDown
()
)
);
ActionsManager
::
getInstance
(
p_intf
),
SLOT
(
AudioDown
()
)
);
action
->
setData
(
QVLCMenuManage
r
::
ACTION_STATIC
);
action
->
setData
(
VLCMenuBa
r
::
ACTION_STATIC
);
action
=
current
->
addAction
(
qtr
(
"Mute"
),
action
=
current
->
addAction
(
qtr
(
"Mute"
),
ActionsManager
::
getInstance
(
p_intf
),
SLOT
(
toggleMuteAudio
()
)
);
ActionsManager
::
getInstance
(
p_intf
),
SLOT
(
toggleMuteAudio
()
)
);
action
->
setData
(
QVLCMenuManage
r
::
ACTION_STATIC
);
action
->
setData
(
VLCMenuBa
r
::
ACTION_STATIC
);
}
}
/**
/**
* Main Audio Menu
* Main Audio Menu
**/
**/
QMenu
*
QVLCMenuManage
r
::
AudioMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
current
)
QMenu
*
VLCMenuBa
r
::
AudioMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
current
)
{
{
QVector
<
vlc_object_t
*>
objects
;
QVector
<
vlc_object_t
*>
objects
;
QVector
<
const
char
*>
varnames
;
QVector
<
const
char
*>
varnames
;
...
@@ -614,7 +614,7 @@ QMenu *QVLCMenuManager::AudioMenu( intf_thread_t *p_intf, QMenu * current )
...
@@ -614,7 +614,7 @@ QMenu *QVLCMenuManager::AudioMenu( intf_thread_t *p_intf, QMenu * current )
}
}
/* Subtitles */
/* Subtitles */
QMenu
*
QVLCMenuManage
r
::
SubtitleMenu
(
QMenu
*
current
)
QMenu
*
VLCMenuBa
r
::
SubtitleMenu
(
QMenu
*
current
)
{
{
QAction
*
action
;
QAction
*
action
;
QMenu
*
submenu
=
new
QMenu
(
qtr
(
"&Subtitles Track"
),
current
);
QMenu
*
submenu
=
new
QMenu
(
qtr
(
"&Subtitles Track"
),
current
);
...
@@ -630,7 +630,7 @@ QMenu *QVLCMenuManager::SubtitleMenu( QMenu *current )
...
@@ -630,7 +630,7 @@ QMenu *QVLCMenuManager::SubtitleMenu( QMenu *current )
* Main Video Menu
* Main Video Menu
* Subtitles are part of Video.
* Subtitles are part of Video.
**/
**/
QMenu
*
QVLCMenuManage
r
::
VideoMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
current
,
bool
b_subtitle
)
QMenu
*
VLCMenuBa
r
::
VideoMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
current
,
bool
b_subtitle
)
{
{
vout_thread_t
*
p_vout
;
vout_thread_t
*
p_vout
;
input_thread_t
*
p_input
;
input_thread_t
*
p_input
;
...
@@ -687,7 +687,7 @@ QMenu *QVLCMenuManager::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b
...
@@ -687,7 +687,7 @@ QMenu *QVLCMenuManager::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b
* Navigation Menu
* Navigation Menu
* For DVD, MP4, MOV and other chapter based format
* For DVD, MP4, MOV and other chapter based format
**/
**/
QMenu
*
QVLCMenuManage
r
::
NavigMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
)
QMenu
*
VLCMenuBa
r
::
NavigMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
)
{
{
QAction
*
action
;
QAction
*
action
;
QMenu
*
submenu
;
QMenu
*
submenu
;
...
@@ -715,7 +715,7 @@ QMenu *QVLCMenuManager::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
...
@@ -715,7 +715,7 @@ QMenu *QVLCMenuManager::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
return
RebuildNavigMenu
(
p_intf
,
menu
);
return
RebuildNavigMenu
(
p_intf
,
menu
);
}
}
QMenu
*
QVLCMenuManage
r
::
RebuildNavigMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
)
QMenu
*
VLCMenuBa
r
::
RebuildNavigMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
)
{
{
/* */
/* */
input_thread_t
*
p_object
;
input_thread_t
*
p_object
;
...
@@ -742,7 +742,7 @@ QMenu *QVLCMenuManager::RebuildNavigMenu( intf_thread_t *p_intf, QMenu *menu )
...
@@ -742,7 +742,7 @@ QMenu *QVLCMenuManager::RebuildNavigMenu( intf_thread_t *p_intf, QMenu *menu )
/**
/**
* Help/About Menu
* Help/About Menu
**/
**/
QMenu
*
QVLCMenuManage
r
::
HelpMenu
(
QWidget
*
parent
)
QMenu
*
VLCMenuBa
r
::
HelpMenu
(
QWidget
*
parent
)
{
{
QMenu
*
menu
=
new
QMenu
(
parent
);
QMenu
*
menu
=
new
QMenu
(
parent
);
addDPStaticEntry
(
menu
,
qtr
(
"&Help..."
)
,
addDPStaticEntry
(
menu
,
qtr
(
"&Help..."
)
,
...
@@ -774,7 +774,7 @@ QMenu *QVLCMenuManager::HelpMenu( QWidget *parent )
...
@@ -774,7 +774,7 @@ QMenu *QVLCMenuManager::HelpMenu( QWidget *parent )
Populate( p_intf, menu, varnames, objects ); \
Populate( p_intf, menu, varnames, objects ); \
menu->popup( QCursor::pos() ); \
menu->popup( QCursor::pos() ); \
void
QVLCMenuManage
r
::
PopupPlayEntries
(
QMenu
*
menu
,
void
VLCMenuBa
r
::
PopupPlayEntries
(
QMenu
*
menu
,
intf_thread_t
*
p_intf
,
intf_thread_t
*
p_intf
,
input_thread_t
*
p_input
)
input_thread_t
*
p_input
)
{
{
...
@@ -796,7 +796,7 @@ void QVLCMenuManager::PopupPlayEntries( QMenu *menu,
...
@@ -796,7 +796,7 @@ void QVLCMenuManager::PopupPlayEntries( QMenu *menu,
}
}
}
}
void
QVLCMenuManage
r
::
PopupMenuControlEntries
(
QMenu
*
menu
,
intf_thread_t
*
p_intf
,
void
VLCMenuBa
r
::
PopupMenuControlEntries
(
QMenu
*
menu
,
intf_thread_t
*
p_intf
,
bool
b_normal
)
bool
b_normal
)
{
{
QAction
*
action
;
QAction
*
action
;
...
@@ -861,7 +861,7 @@ void QVLCMenuManager::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_int
...
@@ -861,7 +861,7 @@ void QVLCMenuManager::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_int
menu
->
addSeparator
();
menu
->
addSeparator
();
}
}
void
QVLCMenuManage
r
::
PopupMenuPlaylistControlEntries
(
QMenu
*
menu
,
void
VLCMenuBa
r
::
PopupMenuPlaylistControlEntries
(
QMenu
*
menu
,
intf_thread_t
*
p_intf
)
intf_thread_t
*
p_intf
)
{
{
bool
bEnable
=
THEMIM
->
getInput
()
!=
NULL
;
bool
bEnable
=
THEMIM
->
getInput
()
!=
NULL
;
...
@@ -889,7 +889,7 @@ void QVLCMenuManager::PopupMenuPlaylistControlEntries( QMenu *menu,
...
@@ -889,7 +889,7 @@ void QVLCMenuManager::PopupMenuPlaylistControlEntries( QMenu *menu,
menu
->
addSeparator
();
menu
->
addSeparator
();
}
}
void
QVLCMenuManage
r
::
PopupMenuStaticEntries
(
QMenu
*
menu
)
void
VLCMenuBa
r
::
PopupMenuStaticEntries
(
QMenu
*
menu
)
{
{
QMenu
*
openmenu
=
new
QMenu
(
qtr
(
"Open a Media"
),
menu
);
QMenu
*
openmenu
=
new
QMenu
(
qtr
(
"Open a Media"
),
menu
);
addDPStaticEntry
(
openmenu
,
qtr
(
"&Open File..."
),
addDPStaticEntry
(
openmenu
,
qtr
(
"&Open File..."
),
...
@@ -916,7 +916,7 @@ void QVLCMenuManager::PopupMenuStaticEntries( QMenu *menu )
...
@@ -916,7 +916,7 @@ void QVLCMenuManager::PopupMenuStaticEntries( QMenu *menu )
}
}
/* Video Tracks and Subtitles tracks */
/* Video Tracks and Subtitles tracks */
void
QVLCMenuManage
r
::
VideoPopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
void
VLCMenuBa
r
::
VideoPopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
{
{
POPUP_BOILERPLATE
POPUP_BOILERPLATE
if
(
p_input
)
if
(
p_input
)
...
@@ -932,7 +932,7 @@ void QVLCMenuManager::VideoPopupMenu( intf_thread_t *p_intf, bool show )
...
@@ -932,7 +932,7 @@ void QVLCMenuManager::VideoPopupMenu( intf_thread_t *p_intf, bool show )
}
}
/* Audio Tracks */
/* Audio Tracks */
void
QVLCMenuManage
r
::
AudioPopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
void
VLCMenuBa
r
::
AudioPopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
{
{
POPUP_BOILERPLATE
POPUP_BOILERPLATE
if
(
p_input
)
if
(
p_input
)
...
@@ -946,7 +946,7 @@ void QVLCMenuManager::AudioPopupMenu( intf_thread_t *p_intf, bool show )
...
@@ -946,7 +946,7 @@ void QVLCMenuManager::AudioPopupMenu( intf_thread_t *p_intf, bool show )
}
}
/* Navigation stuff, and general menus ( open ), used only for skins */
/* Navigation stuff, and general menus ( open ), used only for skins */
void
QVLCMenuManage
r
::
MiscPopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
void
VLCMenuBa
r
::
MiscPopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
{
{
POPUP_BOILERPLATE
POPUP_BOILERPLATE
...
@@ -974,7 +974,7 @@ void QVLCMenuManager::MiscPopupMenu( intf_thread_t *p_intf, bool show )
...
@@ -974,7 +974,7 @@ void QVLCMenuManager::MiscPopupMenu( intf_thread_t *p_intf, bool show )
}
}
/* Main Menu that sticks everything together */
/* Main Menu that sticks everything together */
void
QVLCMenuManage
r
::
PopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
void
VLCMenuBa
r
::
PopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
{
{
POPUP_BOILERPLATE
POPUP_BOILERPLATE
...
@@ -1102,7 +1102,7 @@ void QVLCMenuManager::PopupMenu( intf_thread_t *p_intf, bool show )
...
@@ -1102,7 +1102,7 @@ void QVLCMenuManager::PopupMenu( intf_thread_t *p_intf, bool show )
* Systray Menu *
* Systray Menu *
************************************************************************/
************************************************************************/
void
QVLCMenuManage
r
::
updateSystrayMenu
(
MainInterface
*
mi
,
void
VLCMenuBa
r
::
updateSystrayMenu
(
MainInterface
*
mi
,
intf_thread_t
*
p_intf
,
intf_thread_t
*
p_intf
,
bool
b_force_visible
)
bool
b_force_visible
)
{
{
...
@@ -1150,7 +1150,7 @@ void QVLCMenuManager::updateSystrayMenu( MainInterface *mi,
...
@@ -1150,7 +1150,7 @@ void QVLCMenuManager::updateSystrayMenu( MainInterface *mi,
/*************************************************************************
/*************************************************************************
* Builders for automenus
* Builders for automenus
*************************************************************************/
*************************************************************************/
QMenu
*
QVLCMenuManage
r
::
Populate
(
intf_thread_t
*
p_intf
,
QMenu
*
VLCMenuBa
r
::
Populate
(
intf_thread_t
*
p_intf
,
QMenu
*
current
,
QMenu
*
current
,
QVector
<
const
char
*>
&
varnames
,
QVector
<
const
char
*>
&
varnames
,
QVector
<
vlc_object_t
*>
&
objects
)
QVector
<
vlc_object_t
*>
&
objects
)
...
@@ -1223,7 +1223,7 @@ static bool IsMenuEmpty( const char *psz_var,
...
@@ -1223,7 +1223,7 @@ static bool IsMenuEmpty( const char *psz_var,
#define TEXT_OR_VAR qfu ( text.psz_string ? text.psz_string : psz_var )
#define TEXT_OR_VAR qfu ( text.psz_string ? text.psz_string : psz_var )
void
QVLCMenuManage
r
::
UpdateItem
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
,
void
VLCMenuBa
r
::
UpdateItem
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
,
const
char
*
psz_var
,
vlc_object_t
*
p_object
,
bool
b_submenu
)
const
char
*
psz_var
,
vlc_object_t
*
p_object
,
bool
b_submenu
)
{
{
vlc_value_t
val
,
text
;
vlc_value_t
val
,
text
;
...
@@ -1358,7 +1358,7 @@ static bool CheckTitle( vlc_object_t *p_object, const char *psz_var )
...
@@ -1358,7 +1358,7 @@ static bool CheckTitle( vlc_object_t *p_object, const char *psz_var )
}
}
int
QVLCMenuManage
r
::
CreateChoicesMenu
(
QMenu
*
submenu
,
const
char
*
psz_var
,
int
VLCMenuBa
r
::
CreateChoicesMenu
(
QMenu
*
submenu
,
const
char
*
psz_var
,
vlc_object_t
*
p_object
,
bool
b_root
)
vlc_object_t
*
p_object
,
bool
b_root
)
{
{
vlc_value_t
val
,
val_list
,
text_list
;
vlc_value_t
val
,
val_list
,
text_list
;
...
@@ -1454,7 +1454,7 @@ int QVLCMenuManager::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
...
@@ -1454,7 +1454,7 @@ int QVLCMenuManager::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
return
submenu
->
isEmpty
()
?
VLC_EGENERIC
:
VLC_SUCCESS
;
return
submenu
->
isEmpty
()
?
VLC_EGENERIC
:
VLC_SUCCESS
;
}
}
void
QVLCMenuManage
r
::
CreateAndConnect
(
QMenu
*
menu
,
const
char
*
psz_var
,
void
VLCMenuBa
r
::
CreateAndConnect
(
QMenu
*
menu
,
const
char
*
psz_var
,
const
QString
&
text
,
const
QString
&
help
,
const
QString
&
text
,
const
QString
&
help
,
int
i_item_type
,
vlc_object_t
*
p_obj
,
int
i_item_type
,
vlc_object_t
*
p_obj
,
vlc_value_t
val
,
int
i_val_type
,
vlc_value_t
val
,
int
i_val_type
,
...
@@ -1501,7 +1501,7 @@ void QVLCMenuManager::CreateAndConnect( QMenu *menu, const char *psz_var,
...
@@ -1501,7 +1501,7 @@ void QVLCMenuManager::CreateAndConnect( QMenu *menu, const char *psz_var,
menu
->
addAction
(
action
);
menu
->
addAction
(
action
);
}
}
void
QVLCMenuManage
r
::
DoAction
(
QObject
*
data
)
void
VLCMenuBa
r
::
DoAction
(
QObject
*
data
)
{
{
MenuItemData
*
itemData
=
qobject_cast
<
MenuItemData
*>
(
data
);
MenuItemData
*
itemData
=
qobject_cast
<
MenuItemData
*>
(
data
);
vlc_object_t
*
p_object
=
itemData
->
p_obj
;
vlc_object_t
*
p_object
=
itemData
->
p_obj
;
...
@@ -1515,7 +1515,7 @@ void QVLCMenuManager::DoAction( QObject *data )
...
@@ -1515,7 +1515,7 @@ void QVLCMenuManager::DoAction( QObject *data )
var_Set
(
p_object
,
itemData
->
psz_var
,
itemData
->
val
);
var_Set
(
p_object
,
itemData
->
psz_var
,
itemData
->
val
);
}
}
void
QVLCMenuManage
r
::
updateRecents
(
intf_thread_t
*
p_intf
)
void
VLCMenuBa
r
::
updateRecents
(
intf_thread_t
*
p_intf
)
{
{
if
(
recentsMenu
)
if
(
recentsMenu
)
{
{
...
...
modules/gui/qt4/menus.hpp
View file @
2dc2da86
...
@@ -69,7 +69,7 @@ private:
...
@@ -69,7 +69,7 @@ private:
int
i_val_type
;
int
i_val_type
;
};
};
class
QVLCMenuManage
r
:
public
QObject
class
VLCMenuBa
r
:
public
QObject
{
{
Q_OBJECT
Q_OBJECT
friend
class
MenuFunc
;
friend
class
MenuFunc
;
...
@@ -155,7 +155,7 @@ private:
...
@@ -155,7 +155,7 @@ private:
public
slots
:
public
slots
:
static
void
updateRecents
(
intf_thread_t
*
);
static
void
updateRecents
(
intf_thread_t
*
);
};
};
Q_DECLARE_OPERATORS_FOR_FLAGS
(
QVLCMenuManage
r
::
actionflags
)
Q_DECLARE_OPERATORS_FOR_FLAGS
(
VLCMenuBa
r
::
actionflags
)
class
MenuFunc
:
public
QObject
class
MenuFunc
:
public
QObject
{
{
...
@@ -169,10 +169,10 @@ public:
...
@@ -169,10 +169,10 @@ public:
{
{
switch
(
id
)
switch
(
id
)
{
{
case
1
:
QVLCMenuManage
r
::
AudioMenu
(
p_intf
,
menu
);
break
;
case
1
:
VLCMenuBa
r
::
AudioMenu
(
p_intf
,
menu
);
break
;
case
2
:
QVLCMenuManage
r
::
VideoMenu
(
p_intf
,
menu
);
break
;
case
2
:
VLCMenuBa
r
::
VideoMenu
(
p_intf
,
menu
);
break
;
case
3
:
QVLCMenuManage
r
::
RebuildNavigMenu
(
p_intf
,
menu
);
break
;
case
3
:
VLCMenuBa
r
::
RebuildNavigMenu
(
p_intf
,
menu
);
break
;
case
4
:
QVLCMenuManage
r
::
ViewMenu
(
p_intf
,
menu
);
break
;
case
4
:
VLCMenuBa
r
::
ViewMenu
(
p_intf
,
menu
);
break
;
}
}
}
}
private:
private:
...
...
modules/gui/qt4/recents.cpp
View file @
2dc2da86
...
@@ -103,7 +103,7 @@ void RecentsMRL::addRecent( const QString &mrl )
...
@@ -103,7 +103,7 @@ void RecentsMRL::addRecent( const QString &mrl )
if
(
stack
->
count
()
>
RECENTS_LIST_SIZE
)
if
(
stack
->
count
()
>
RECENTS_LIST_SIZE
)
stack
->
takeLast
();
stack
->
takeLast
();
}
}
QVLCMenuManage
r
::
updateRecents
(
p_intf
);
VLCMenuBa
r
::
updateRecents
(
p_intf
);
save
();
save
();
}
}
...
@@ -113,7 +113,7 @@ void RecentsMRL::clear()
...
@@ -113,7 +113,7 @@ void RecentsMRL::clear()
return
;
return
;
stack
->
clear
();
stack
->
clear
();
if
(
isActive
)
QVLCMenuManage
r
::
updateRecents
(
p_intf
);
if
(
isActive
)
VLCMenuBa
r
::
updateRecents
(
p_intf
);
save
();
save
();
}
}
...
...
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