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
b7923c3e
Commit
b7923c3e
authored
Feb 23, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt, prefs, global hotkeys configuration, step 1.
parent
213731a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+19
-3
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
b7923c3e
...
...
@@ -1143,9 +1143,11 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
QLineEdit *actionSearch = new QLineEdit;*/
table
=
new
QTreeWidget
;
table
->
setColumnCount
(
2
);
table
->
setColumnCount
(
3
);
table
->
headerItem
()
->
setText
(
0
,
qtr
(
"Action"
)
);
table
->
headerItem
()
->
setText
(
1
,
qtr
(
"Shortcut"
)
);
table
->
headerItem
()
->
setText
(
2
,
qtr
(
"Global"
)
);
table
->
setAlternatingRowColors
(
true
);
shortcutValue
=
new
KeyShortcutEdit
;
shortcutValue
->
setReadOnly
(
true
);
...
...
@@ -1177,8 +1179,6 @@ void KeySelectorControl::finish()
label
->
setToolTip
(
formatTooltip
(
qtr
(
p_item
->
psz_longtext
)
)
);
/* Fill the table */
table
->
setColumnCount
(
2
);
table
->
setAlternatingRowColors
(
true
);
/* Get the main Module */
module_t
*
p_main
=
module_get_main
();
...
...
@@ -1197,6 +1197,7 @@ void KeySelectorControl::finish()
/* If we are a key option not empty */
if
(
p_item
->
i_type
&
CONFIG_ITEM
&&
p_item
->
psz_name
&&
strstr
(
p_item
->
psz_name
,
"key-"
)
&&
!
strstr
(
p_item
->
psz_name
,
"global-key"
)
&&
!
EMPTY_STR
(
p_item
->
psz_text
)
)
{
/*
...
...
@@ -1213,6 +1214,21 @@ void KeySelectorControl::finish()
treeItem
->
setText
(
1
,
VLCKeyToString
(
p_item
->
value
.
i
)
);
treeItem
->
setData
(
1
,
Qt
::
UserRole
,
QVariant
(
p_item
->
value
.
i
)
);
table
->
addTopLevelItem
(
treeItem
);
continue
;
}
if
(
p_item
->
i_type
&
CONFIG_ITEM
&&
p_item
->
psz_name
&&
strstr
(
p_item
->
psz_name
,
"global-key"
)
&&
!
EMPTY_STR
(
p_item
->
psz_text
)
)
{
QList
<
QTreeWidgetItem
*>
list
=
table
->
findItems
(
qtr
(
p_item
->
psz_text
),
Qt
::
MatchExactly
);
if
(
list
.
count
()
>
1
)
{
list
[
0
]
->
setText
(
2
,
VLCKeyToString
(
p_item
->
value
.
i
)
);
list
[
0
]
->
setData
(
2
,
Qt
::
UserRole
,
QVariant
(
p_item
->
value
.
i
)
);
}
}
}
module_config_free
(
p_config
);
...
...
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