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
d3100ba4
Commit
d3100ba4
authored
Apr 05, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Update Preferences buttons to please any OS/DE.
parent
20a60c3f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
10 deletions
+20
-10
modules/gui/qt4/dialogs/preferences.cpp
modules/gui/qt4/dialogs/preferences.cpp
+11
-8
modules/gui/qt4/dialogs/preferences.hpp
modules/gui/qt4/dialogs/preferences.hpp
+1
-2
modules/gui/qt4/util/qvlcframe.hpp
modules/gui/qt4/util/qvlcframe.hpp
+8
-0
No files found.
modules/gui/qt4/dialogs/preferences.cpp
View file @
d3100ba4
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include <QCheckBox>
#include <QCheckBox>
#include <QScrollArea>
#include <QScrollArea>
#include <QMessageBox>
#include <QMessageBox>
#include <QDialogButtonBox>
PrefsDialog
*
PrefsDialog
::
instance
=
NULL
;
PrefsDialog
*
PrefsDialog
::
instance
=
NULL
;
...
@@ -85,14 +85,17 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
...
@@ -85,14 +85,17 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
setSmall
();
setSmall
();
QPushButton
*
save
,
*
cancel
,
*
reset
;
QDialogButtonBox
*
buttonsBox
=
new
QDialogButtonBox
();
QHBoxLayout
*
buttonsLayout
=
QVLCFrame
::
doButtons
(
this
,
NULL
,
QPushButton
*
save
=
new
QPushButton
(
qtr
(
"&Save"
)
);
&
save
,
_
(
"Save"
),
QPushButton
*
cancel
=
new
QPushButton
(
qtr
(
"&Cancel"
)
);
&
cancel
,
_
(
"Cancel"
),
QPushButton
*
reset
=
new
QPushButton
(
qtr
(
"&Reset Preferences"
)
);
&
reset
,
_
(
"Reset Preferences"
)
);
main_layout
->
addLayout
(
buttonsLayout
,
4
,
0
,
1
,
3
);
setLayout
(
main_layout
);
buttonsBox
->
addButton
(
save
,
QDialogButtonBox
::
AcceptRole
);
buttonsBox
->
addButton
(
cancel
,
QDialogButtonBox
::
RejectRole
);
buttonsBox
->
addButton
(
reset
,
QDialogButtonBox
::
ActionRole
);
main_layout
->
addWidget
(
buttonsBox
,
4
,
0
,
1
,
3
);
setLayout
(
main_layout
);
BUTTONACT
(
save
,
save
()
);
BUTTONACT
(
save
,
save
()
);
BUTTONACT
(
cancel
,
cancel
()
);
BUTTONACT
(
cancel
,
cancel
()
);
...
...
modules/gui/qt4/dialogs/preferences.hpp
View file @
d3100ba4
...
@@ -75,8 +75,6 @@ private:
...
@@ -75,8 +75,6 @@ private:
QGridLayout
*
main_layout
;
QGridLayout
*
main_layout
;
// QLabel *panel_label;
static
PrefsDialog
*
instance
;
static
PrefsDialog
*
instance
;
private
slots
:
private
slots
:
void
changePanel
(
QTreeWidgetItem
*
);
void
changePanel
(
QTreeWidgetItem
*
);
...
@@ -86,6 +84,7 @@ private slots:
...
@@ -86,6 +84,7 @@ private slots:
void
save
();
void
save
();
void
cancel
();
void
cancel
();
void
reset
();
void
reset
();
void
close
(){
save
();
};
};
};
#endif
#endif
modules/gui/qt4/util/qvlcframe.hpp
View file @
d3100ba4
...
@@ -110,12 +110,20 @@ protected:
...
@@ -110,12 +110,20 @@ protected:
{
{
hide
();
hide
();
}
}
void
close
()
{
hide
();
}
void
keyPressEvent
(
QKeyEvent
*
keyEvent
)
void
keyPressEvent
(
QKeyEvent
*
keyEvent
)
{
{
if
(
keyEvent
->
key
()
==
Qt
::
Key_Escape
)
if
(
keyEvent
->
key
()
==
Qt
::
Key_Escape
)
{
{
cancel
();
cancel
();
}
}
else
if
(
keyEvent
->
key
()
==
Qt
::
Key_Enter
)
{
close
();
}
}
}
};
};
...
...
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