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
ae06612f
Commit
ae06612f
authored
Jan 22, 2011
by
Jean-Philippe André
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: really close ExtensionDialog when user presses ESC
parent
92432ec2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
modules/gui/qt4/dialogs/extensions.cpp
modules/gui/qt4/dialogs/extensions.cpp
+16
-0
modules/gui/qt4/dialogs/extensions.hpp
modules/gui/qt4/dialogs/extensions.hpp
+2
-0
No files found.
modules/gui/qt4/dialogs/extensions.cpp
View file @
ae06612f
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include <QComboBox>
#include <QComboBox>
#include <QCloseEvent>
#include <QCloseEvent>
#include <QCoreApplication>
#include <QCoreApplication>
#include <QKeyEvent>
#include "util/customwidgets.hpp"
#include "util/customwidgets.hpp"
ExtensionsDialogProvider
*
ExtensionsDialogProvider
::
instance
=
NULL
;
ExtensionsDialogProvider
*
ExtensionsDialogProvider
::
instance
=
NULL
;
...
@@ -681,6 +682,21 @@ void ExtensionDialog::closeEvent( QCloseEvent *event )
...
@@ -681,6 +682,21 @@ void ExtensionDialog::closeEvent( QCloseEvent *event )
extension_DialogClosed
(
p_dialog
);
extension_DialogClosed
(
p_dialog
);
}
}
/** Grab some keyboard input (ESC, ...) and handle actions manually */
void
ExtensionDialog
::
keyPressEvent
(
QKeyEvent
*
event
)
{
assert
(
p_dialog
!=
NULL
);
switch
(
event
->
key
()
)
{
case
Qt
:
:
Key_Escape
:
close
();
return
;
default:
QDialog
::
keyPressEvent
(
event
);
return
;
}
}
void
ExtensionDialog
::
parentDestroyed
()
void
ExtensionDialog
::
parentDestroyed
()
{
{
msg_Dbg
(
p_intf
,
"About to destroy dialog '%s'"
,
p_dialog
->
psz_title
);
msg_Dbg
(
p_intf
,
"About to destroy dialog '%s'"
,
p_dialog
->
psz_title
);
...
...
modules/gui/qt4/dialogs/extensions.hpp
View file @
ae06612f
...
@@ -34,6 +34,7 @@ class QObject;
...
@@ -34,6 +34,7 @@ class QObject;
class
QGridLayout
;
class
QGridLayout
;
class
QSignalMapper
;
class
QSignalMapper
;
class
QCloseEvent
;
class
QCloseEvent
;
class
QKeyEvent
;
class
ExtensionsDialogProvider
;
class
ExtensionsDialogProvider
;
class
ExtensionDialog
;
class
ExtensionDialog
;
...
@@ -106,6 +107,7 @@ private:
...
@@ -106,6 +107,7 @@ private:
protected:
protected:
virtual
void
closeEvent
(
QCloseEvent
*
);
virtual
void
closeEvent
(
QCloseEvent
*
);
virtual
void
keyPressEvent
(
QKeyEvent
*
);
private
slots
:
private
slots
:
int
TriggerClick
(
QObject
*
object
);
int
TriggerClick
(
QObject
*
object
);
...
...
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