Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
b80f556a
Commit
b80f556a
authored
Aug 11, 2008
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fix key capture for hotkeys when setting new ones.
parent
941863db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
modules/gui/macosx/simple_prefs.h
modules/gui/macosx/simple_prefs.h
+1
-3
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+16
-3
No files found.
modules/gui/macosx/simple_prefs.h
View file @
b80f556a
...
...
@@ -205,12 +205,10 @@
-
(
void
)
showHotkeySettings
;
-
(
NSInteger
)
numberOfRowsInTableView
:(
NSTableView
*
)
aTableView
;
-
(
id
)
tableView
:(
NSTableView
*
)
aTableView
objectValueForTableColumn
:(
NSTableColumn
*
)
aTableColumn
row
:(
NSInteger
)
rowIndex
;
-
(
void
)
changeHotkeyTo
:
(
int
)
i_theNewKey
;
-
(
BOOL
)
changeHotkeyTo
:
(
int
)
i_theNewKey
;
@end
@interface
VLCHotkeyChangeWindow
:
NSWindow
-
(
void
)
keyDown
:(
NSEvent
*
)
theEvent
;
@end
modules/gui/macosx/simple_prefs.m
View file @
b80f556a
...
...
@@ -1187,7 +1187,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
}
}
-
(
void
)
changeHotkeyTo
:
(
int
)
i_theNewKey
-
(
BOOL
)
changeHotkeyTo
:
(
int
)
i_theNewKey
{
int
i_returnValue
;
i_returnValue
=
[
o_hotkeysNonUseableKeys
indexOfObject
:
[
NSNumber
numberWithInt
:
i_theNewKey
]];
...
...
@@ -1196,6 +1196,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[
o_hotkeys_change_keys_lbl
setStringValue
:
_NS
(
"Invalid combination"
)];
[
o_hotkeys_change_taken_lbl
setStringValue
:
_NS
(
"Regrettably, these keys cannot be assigned as hotkey shortcuts."
)];
[
o_hotkeys_change_ok_btn
setEnabled
:
NO
];
return
NO
;
}
else
{
...
...
@@ -1217,6 +1218,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[
o_hotkeys_change_taken_lbl
setStringValue
:
@""
];
[
o_hotkeys_change_ok_btn
setEnabled
:
YES
];
return
YES
;
}
}
...
...
@@ -1228,13 +1230,23 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
@implementation
VLCHotkeyChangeWindow
-
(
BOOL
)
acceptsFirstResponder
{
return
YES
;
}
-
(
BOOL
)
becomeFirstResponder
{
return
YES
;
}
-
(
BOOL
)
resignFirstResponder
{
/* We need to stay the first responder or we'll miss the user's input */
return
NO
;
}
-
(
void
)
keyDown
:(
NSEvent
*
)
o_theEvent
-
(
BOOL
)
performKeyEquivalent
:(
NSEvent
*
)
o_theEvent
{
unichar
key
;
int
i_key
=
0
;
...
...
@@ -1255,8 +1267,9 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
if
(
key
)
{
i_key
|=
CocoaKeyToVLC
(
key
);
[[[
VLCMain
sharedInstance
]
getSimplePreferences
]
changeHotkeyTo
:
i_key
];
return
[[[
VLCMain
sharedInstance
]
getSimplePreferences
]
changeHotkeyTo
:
i_key
];
}
return
FALSE
;
}
@end
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