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
c810198e
Commit
c810198e
authored
Feb 10, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge ConfigKeyToString and KeyToString
parent
dc689548
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
15 additions
and
44 deletions
+15
-44
include/vlc_keys.h
include/vlc_keys.h
+1
-1
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+1
-1
modules/gui/qt4/util/customwidgets.cpp
modules/gui/qt4/util/customwidgets.cpp
+8
-20
modules/gui/qt4/util/customwidgets.hpp
modules/gui/qt4/util/customwidgets.hpp
+1
-1
modules/gui/skins2/events/evt_key.cpp
modules/gui/skins2/events/evt_key.cpp
+1
-1
src/config/configuration.h
src/config/configuration.h
+0
-1
src/config/file.c
src/config/file.c
+1
-1
src/config/keys.c
src/config/keys.c
+1
-17
src/libvlccore.sym
src/libvlccore.sym
+1
-1
No files found.
include/vlc_keys.h
View file @
c810198e
...
...
@@ -86,7 +86,7 @@
#define KEY_MOUSEWHEELLEFT 0x00F20000
#define KEY_MOUSEWHEELRIGHT 0x00F30000
VLC_EXPORT
(
char
*
,
KeyToString
,
(
uint_fast32_t
i_key
)
)
LIBVLC_USED
;
VLC_EXPORT
(
char
*
,
vlc_keycode2str
,
(
uint_fast32_t
i_key
)
)
LIBVLC_USED
;
typedef
enum
vlc_key
{
ACTIONID_NONE
=
0
,
...
...
modules/gui/macosx/simple_prefs.m
View file @
c810198e
...
...
@@ -87,7 +87,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
if
(
val
&
KEY_MODIFIER_COMMAND
)
[
o_temp_str
appendString
:
[
NSString
stringWithUTF8String
:
"
\xE2\x8C\x98
"
]];
char
*
base
=
KeyToString
(
val
&
~
KEY_MODIFIER
);
char
*
base
=
vlc_keycode2str
(
val
&
~
KEY_MODIFIER
);
if
(
base
)
{
[
o_temp_str
appendString
:
[
NSString
stringWithUTF8String
:
base
]];
...
...
modules/gui/qt4/util/customwidgets.cpp
View file @
c810198e
...
...
@@ -285,27 +285,15 @@ int qtWheelEventToVLCKey( QWheelEvent *e )
return
i_vlck
;
}
QString
VLCKeyToString
(
int
val
)
QString
VLCKeyToString
(
unsigned
val
)
{
char
*
base
=
KeyToString
(
val
&
~
KEY_MODIFIER
);
QString
r
=
""
;
if
(
val
&
KEY_MODIFIER_CTRL
)
r
+=
qfu
(
"Ctrl+"
);
if
(
val
&
KEY_MODIFIER_ALT
)
r
+=
qfu
(
"Alt+"
);
if
(
val
&
KEY_MODIFIER_SHIFT
)
r
+=
qfu
(
"Shift+"
);
if
(
val
&
KEY_MODIFIER_META
)
r
+=
qfu
(
"Meta+"
);
if
(
base
)
{
r
+=
qfu
(
base
);
free
(
base
);
}
else
r
+=
qtr
(
"Unset"
);
char
*
base
=
vlc_keycode2str
(
val
);
if
(
base
==
NULL
)
return
qtr
(
"Unset"
);
QString
r
=
qfu
(
base
);
free
(
base
);
return
r
;
}
...
...
modules/gui/qt4/util/customwidgets.hpp
View file @
c810198e
...
...
@@ -163,7 +163,7 @@ class QInputEvent;
int
qtKeyModifiersToVLC
(
QInputEvent
*
e
);
int
qtEventToVLCKey
(
QKeyEvent
*
e
);
int
qtWheelEventToVLCKey
(
QWheelEvent
*
e
);
QString
VLCKeyToString
(
int
val
);
QString
VLCKeyToString
(
unsigned
val
);
#endif
modules/gui/skins2/events/evt_key.cpp
View file @
c810198e
...
...
@@ -39,7 +39,7 @@ const string EvtKey::getAsString() const
msg_Warn
(
getIntf
(),
"Unknown action type"
);
// Add the key
char
*
keyName
=
KeyToString
(
m_key
);
char
*
keyName
=
vlc_keycode2str
(
m_key
&
~
KEY_MODIFIER
);
if
(
keyName
)
{
event
+=
(
string
)
":"
+
keyName
;
...
...
src/config/configuration.h
View file @
c810198e
...
...
@@ -50,7 +50,6 @@ static inline int IsConfigFloatType (int type)
}
uint_fast32_t
ConfigStringToKey
(
const
char
*
);
char
*
ConfigKeyToString
(
uint_fast32_t
);
extern
vlc_rwlock_t
config_lock
;
...
...
src/config/file.c
View file @
c810198e
...
...
@@ -549,7 +549,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
int64_t
val
=
b_retain
?
p_item
->
saved
.
i
:
p_item
->
value
.
i
;
if
(
p_item
->
i_type
==
CONFIG_ITEM_KEY
)
{
char
*
psz_key
=
ConfigKeyToString
(
val
);
char
*
psz_key
=
vlc_keycode2str
(
val
);
config_Write
(
file
,
p_item
->
psz_text
,
N_
(
"key"
),
val
==
p_item
->
orig
.
i
,
p_item
->
psz_name
,
"%s"
,
...
...
src/config/keys.c
View file @
c810198e
...
...
@@ -148,22 +148,6 @@ static char *utf8_cp (uint_fast32_t cp, char *buf)
return
buf
;
}
char
*
KeyToString
(
uint_fast32_t
sym
)
{
key_descriptor_t
*
d
;
d
=
bsearch
((
void
*
)(
uintptr_t
)
sym
,
vlc_keys
,
vlc_num_keys
,
sizeof
(
vlc_keys
[
0
]),
cmpkey
);
if
(
d
)
return
strdup
(
d
->
psz_key_string
);
char
buf
[
5
];
if
(
utf8_cp
(
sym
,
buf
))
return
strdup
(
buf
);
return
NULL
;
}
uint_fast32_t
ConfigStringToKey
(
const
char
*
name
)
{
uint_fast32_t
mods
=
0
;
...
...
@@ -193,7 +177,7 @@ uint_fast32_t ConfigStringToKey (const char *name)
return
(
vlc_towc
(
name
,
&
cp
)
>
0
)
?
(
mods
|
cp
)
:
0
;
}
char
*
ConfigKeyToString
(
uint_fast32_t
code
)
char
*
vlc_keycode2str
(
uint_fast32_t
code
)
{
char
*
str
,
buf
[
5
];
uintptr_t
key
=
code
&
~
KEY_MODIFIER
;
...
...
src/libvlccore.sym
View file @
c810198e
...
...
@@ -679,4 +679,4 @@ xml_Delete
xml_ReaderCreate
xml_ReaderDelete
xml_ReaderReset
KeyToString
vlc_keycode2str
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