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
09630cc1
Commit
09630cc1
authored
Nov 06, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Hotkeys Preferences: * Create the QLabel warning only if needed,
* Fix the "empty value, empty text" key bug.
parent
f437e6eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+9
-9
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+3
-2
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
09630cc1
...
@@ -1039,7 +1039,7 @@ void KeySelectorControl::finish()
...
@@ -1039,7 +1039,7 @@ void KeySelectorControl::finish()
module_config_t
*
p_item
=
p_main
->
p_config
+
i
;
module_config_t
*
p_item
=
p_main
->
p_config
+
i
;
if
(
p_item
->
i_type
&
CONFIG_ITEM
&&
p_item
->
psz_name
&&
if
(
p_item
->
i_type
&
CONFIG_ITEM
&&
p_item
->
psz_name
&&
strstr
(
p_item
->
psz_name
,
"key-"
)
)
strstr
(
p_item
->
psz_name
,
"key-"
)
&&
!
EMPTY_STR
(
p_item
->
psz_text
)
)
{
{
QTreeWidgetItem
*
treeItem
=
new
QTreeWidgetItem
();
QTreeWidgetItem
*
treeItem
=
new
QTreeWidgetItem
();
treeItem
->
setText
(
0
,
qtr
(
p_item
->
psz_text
)
);
treeItem
->
setText
(
0
,
qtr
(
p_item
->
psz_text
)
);
...
@@ -1124,11 +1124,9 @@ KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values,
...
@@ -1124,11 +1124,9 @@ KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values,
setWindowTitle
(
qtr
(
"Hotkey for "
)
+
qfu
(
keyToChange
)
);
setWindowTitle
(
qtr
(
"Hotkey for "
)
+
qfu
(
keyToChange
)
);
QVBoxLayout
*
l
=
new
QVBoxLayout
(
this
);
vLayout
=
new
QVBoxLayout
(
this
);
selected
=
new
QLabel
(
qtr
(
"Press the new keys for "
)
+
qfu
(
keyToChange
)
);
selected
=
new
QLabel
(
qtr
(
"Press the new keys for "
)
+
qfu
(
keyToChange
)
);
warning
=
new
QLabel
();
vLayout
->
addWidget
(
selected
,
Qt
::
AlignCenter
);
l
->
addWidget
(
selected
,
Qt
::
AlignCenter
);
l
->
addWidget
(
warning
,
Qt
::
AlignCenter
);
buttonBox
=
new
QDialogButtonBox
;
buttonBox
=
new
QDialogButtonBox
;
QPushButton
*
ok
=
new
QPushButton
(
qtr
(
"OK"
)
);
QPushButton
*
ok
=
new
QPushButton
(
qtr
(
"OK"
)
);
...
@@ -1136,7 +1134,7 @@ KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values,
...
@@ -1136,7 +1134,7 @@ KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values,
buttonBox
->
addButton
(
ok
,
QDialogButtonBox
::
AcceptRole
);
buttonBox
->
addButton
(
ok
,
QDialogButtonBox
::
AcceptRole
);
buttonBox
->
addButton
(
cancel
,
QDialogButtonBox
::
RejectRole
);
buttonBox
->
addButton
(
cancel
,
QDialogButtonBox
::
RejectRole
);
l
->
addWidget
(
buttonBox
);
vLayout
->
addWidget
(
buttonBox
);
buttonBox
->
hide
();
buttonBox
->
hide
();
CONNECT
(
buttonBox
,
accepted
(),
this
,
accept
()
);
CONNECT
(
buttonBox
,
accepted
(),
this
,
accept
()
);
...
@@ -1160,10 +1158,12 @@ void KeyInputDialog::checkForConflicts( int i_vlckey )
...
@@ -1160,10 +1158,12 @@ void KeyInputDialog::checkForConflicts( int i_vlckey )
if
(
conflicts
)
if
(
conflicts
)
{
{
warning
->
setText
(
QLabel
*
warning
=
new
QLabel
(
qtr
(
"Warning: the key is already assigned to
\"
"
)
+
qtr
(
"Warning: the key is already assigned to
\"
"
)
+
qfu
(
p_current
->
psz_text
)
+
"
\"
"
);
qfu
(
p_current
->
psz_text
)
+
"
\"
"
);
buttonBox
->
hide
();
warning
->
setWordWrap
(
true
);
vLayout
->
insertWidget
(
1
,
warning
);
buttonBox
->
show
();
}
}
else
accept
();
else
accept
();
}
}
...
...
modules/gui/qt4/components/preferences_widgets.hpp
View file @
09630cc1
...
@@ -51,6 +51,7 @@ class QTreeWidgetItem;
...
@@ -51,6 +51,7 @@ class QTreeWidgetItem;
class
QGroupBox
;
class
QGroupBox
;
class
QGridLayout
;
class
QGridLayout
;
class
QDialogButtonBox
;
class
QDialogButtonBox
;
class
QVBoxLayout
;
class
ConfigControl
:
public
QObject
class
ConfigControl
:
public
QObject
{
{
...
@@ -421,8 +422,8 @@ private:
...
@@ -421,8 +422,8 @@ private:
void
keyPressEvent
(
QKeyEvent
*
);
void
keyPressEvent
(
QKeyEvent
*
);
void
wheelEvent
(
QWheelEvent
*
);
void
wheelEvent
(
QWheelEvent
*
);
QLabel
*
selected
;
QLabel
*
selected
;
Q
Label
*
warning
;
Q
VBoxLayout
*
vLayout
;
const
char
*
keyToChange
;
const
char
*
keyToChange
;
QList
<
module_config_t
*>
values
;
QList
<
module_config_t
*>
values
;
QDialogButtonBox
*
buttonBox
;
QDialogButtonBox
*
buttonBox
;
};
};
...
...
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