[vlc-commits] qt: bring back native menu for intf dialog popup menu
Pierre Lamot
git at videolan.org
Mon Sep 28 09:38:04 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Sep 18 14:59:57 2020 +0200| [d29a0e9ad045df4b3b8743d9840856b2a4415382] | committer: Pierre Lamot
qt: bring back native menu for intf dialog popup menu
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d29a0e9ad045df4b3b8743d9840856b2a4415382
---
modules/gui/qt/dialogs/dialogs_provider.cpp | 13 ++++---------
modules/gui/qt/maininterface/main_interface.cpp | 5 -----
modules/gui/qt/maininterface/main_interface.hpp | 2 --
modules/gui/qt/player/qml/Player.qml | 7 -------
4 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/modules/gui/qt/dialogs/dialogs_provider.cpp b/modules/gui/qt/dialogs/dialogs_provider.cpp
index 72a96946d3..37975707d1 100644
--- a/modules/gui/qt/dialogs/dialogs_provider.cpp
+++ b/modules/gui/qt/dialogs/dialogs_provider.cpp
@@ -165,15 +165,10 @@ void DialogsProvider::customEvent( QEvent *event )
bool show = (de->i_arg != 0);
if( show )
{
- if( p_intf->p_sys->p_mi )
- p_intf->p_sys->p_mi->popupMenu( show );
- else
- {
- //popping a QMenu prevents mouse release events to be received,
- //this ensures the coherency of the vout mouse state.
- emit releaseMouseEvents();
- popupMenu = VLCMenuBar::PopupMenu( p_intf, show );
- }
+ //popping a QMenu prevents mouse release events to be received,
+ //this ensures the coherency of the vout mouse state.
+ emit releaseMouseEvents();
+ popupMenu = VLCMenuBar::PopupMenu( p_intf, true );
}
break;
}
diff --git a/modules/gui/qt/maininterface/main_interface.cpp b/modules/gui/qt/maininterface/main_interface.cpp
index a2c721c0b5..4472b6754d 100644
--- a/modules/gui/qt/maininterface/main_interface.cpp
+++ b/modules/gui/qt/maininterface/main_interface.cpp
@@ -689,11 +689,6 @@ void MainInterface::emitShow()
emit askShow();
}
-void MainInterface::popupMenu(bool show)
-{
- emit askPopupMenu( show );
-}
-
void MainInterface::emitRaise()
{
emit askRaise();
diff --git a/modules/gui/qt/maininterface/main_interface.hpp b/modules/gui/qt/maininterface/main_interface.hpp
index ed5db4e32c..43acc95233 100644
--- a/modules/gui/qt/maininterface/main_interface.hpp
+++ b/modules/gui/qt/maininterface/main_interface.hpp
@@ -279,7 +279,6 @@ public slots:
void emitBoss();
void emitRaise();
void emitShow();
- void popupMenu( bool show );
virtual void reloadPrefs();
VLCVarChoiceModel* getExtraInterfaces();
@@ -305,7 +304,6 @@ signals:
void askShow();
void askBoss();
void askRaise();
- void askPopupMenu( bool show );
void kc_pressed(); /* easter eggs */
void playlistDockedChanged(bool);
diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index 062ae64820..48972e2735 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -373,10 +373,6 @@ Widgets.NavigableFocusScope {
toolbarAutoHide.setVisible(1000)
mousePosition = Qt.point(x, y)
}
-
- Menus.PopupMenu {
- id: dialogMenu
- }
}
Timer {
@@ -437,8 +433,5 @@ Widgets.NavigableFocusScope {
onAskShow: {
toolbarAutoHide.toggleForceVisible()
}
- onAskPopupMenu: {
- dialogMenu.popup(videoSurface.mousePosition)
- }
}
}
More information about the vlc-commits
mailing list