Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
eb241138
Commit
eb241138
authored
Jul 25, 2009
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: added another option to disable media key support specifically for background usage
parent
a066a057
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
6 deletions
+34
-6
extras/package/macosx/Resources/English.lproj/Preferences.nib/classes.nib
...acosx/Resources/English.lproj/Preferences.nib/classes.nib
+1
-0
extras/package/macosx/Resources/English.lproj/Preferences.nib/info.nib
...e/macosx/Resources/English.lproj/Preferences.nib/info.nib
+1
-1
extras/package/macosx/Resources/English.lproj/Preferences.nib/keyedobjects.nib
.../Resources/English.lproj/Preferences.nib/keyedobjects.nib
+0
-0
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+2
-0
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+15
-3
modules/gui/macosx/macosx.m
modules/gui/macosx/macosx.m
+8
-2
modules/gui/macosx/simple_prefs.h
modules/gui/macosx/simple_prefs.h
+1
-0
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+6
-0
No files found.
extras/package/macosx/Resources/English.lproj/Preferences.nib/classes.nib
View file @
eb241138
...
@@ -123,6 +123,7 @@
...
@@ -123,6 +123,7 @@
"o_intf_fspanel_ckb" = id;
"o_intf_fspanel_ckb" = id;
"o_intf_lang_pop" = id;
"o_intf_lang_pop" = id;
"o_intf_lang_txt" = id;
"o_intf_lang_txt" = id;
"o_intf_mediakeys_bg_ckb" = id;
"o_intf_mediakeys_ckb" = id;
"o_intf_mediakeys_ckb" = id;
"o_intf_network_box" = id;
"o_intf_network_box" = id;
"o_intf_view" = id;
"o_intf_view" = id;
...
...
extras/package/macosx/Resources/English.lproj/Preferences.nib/info.nib
View file @
eb241138
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<key>
IBEditorPositions
</key>
<key>
IBEditorPositions
</key>
<dict>
<dict>
<key>
2311
</key>
<key>
2311
</key>
<string>
345 3
78 590 293
0 0 1280 778
</string>
<string>
345 3
56 590 315
0 0 1280 778
</string>
<key>
2330
</key>
<key>
2330
</key>
<string>
345 222 590 502 0 0 1280 778
</string>
<string>
345 222 590 502 0 0 1280 778
</string>
<key>
2440
</key>
<key>
2440
</key>
...
...
extras/package/macosx/Resources/English.lproj/Preferences.nib/keyedobjects.nib
View file @
eb241138
No preview for this file type
modules/gui/macosx/intf.h
View file @
eb241138
...
@@ -426,6 +426,8 @@ struct intf_sys_t
...
@@ -426,6 +426,8 @@ struct intf_sys_t
{
{
BOOL
b_justJumped
;
BOOL
b_justJumped
;
BOOL
b_mediaKeySupport
;
BOOL
b_mediaKeySupport
;
BOOL
b_activeInBackground
;
BOOL
b_active
;
}
}
-
(
void
)
coreChangedMediaKeySupportSetting
:
(
NSNotification
*
)
o_notification
;
-
(
void
)
coreChangedMediaKeySupportSetting
:
(
NSNotification
*
)
o_notification
;
...
...
modules/gui/macosx/intf.m
View file @
eb241138
...
@@ -2825,8 +2825,11 @@ end:
...
@@ -2825,8 +2825,11 @@ end:
-
(
void
)
awakeFromNib
-
(
void
)
awakeFromNib
{
{
b_mediaKeySupport
=
config_GetInt
(
VLCIntf
,
"macosx-mediakeys"
);
b_active
=
b_mediaKeySupport
=
config_GetInt
(
VLCIntf
,
"macosx-mediakeys"
);
b_activeInBackground
=
config_GetInt
(
VLCIntf
,
"macosx-mediakeys-background"
);
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
coreChangedMediaKeySupportSetting
:
)
name
:
@"VLCMediaKeySupportSettingChanged"
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
coreChangedMediaKeySupportSetting
:
)
name
:
@"VLCMediaKeySupportSettingChanged"
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
appGotActiveOrInactive
:
)
name
:
@"NSApplicationDidBecomeActiveNotification"
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
appGotActiveOrInactive
:
)
name
:
@"NSApplicationWillResignActiveNotification"
object
:
nil
];
}
}
-
(
void
)
dealloc
-
(
void
)
dealloc
...
@@ -2835,15 +2838,24 @@ end:
...
@@ -2835,15 +2838,24 @@ end:
[
super
dealloc
];
[
super
dealloc
];
}
}
-
(
void
)
appGotActiveOrInactive
:
(
NSNotification
*
)
o_notification
{
if
((
[[
o_notification
name
]
isEqualToString
:
@"NSApplicationWillResignActiveNotification"
]
&&
!
b_activeInBackground
)
||
!
b_mediaKeySupport
)
b_active
=
NO
;
else
b_active
=
YES
;
}
-
(
void
)
coreChangedMediaKeySupportSetting
:
(
NSNotification
*
)
o_notification
-
(
void
)
coreChangedMediaKeySupportSetting
:
(
NSNotification
*
)
o_notification
{
{
b_mediaKeySupport
=
config_GetInt
(
VLCIntf
,
"macosx-mediakeys"
);
b_active
=
b_mediaKeySupport
=
config_GetInt
(
VLCIntf
,
"macosx-mediakeys"
);
b_activeInBackground
=
config_GetInt
(
VLCIntf
,
"macosx-mediakeys-background"
);
}
}
-
(
void
)
sendEvent
:
(
NSEvent
*
)
event
-
(
void
)
sendEvent
:
(
NSEvent
*
)
event
{
{
if
(
b_
mediaKeySupport
)
if
(
b_
active
)
{
{
if
(
[
event
type
]
==
NSSystemDefined
&&
[
event
subtype
]
==
8
)
if
(
[
event
type
]
==
NSSystemDefined
&&
[
event
subtype
]
==
8
)
{
{
...
...
modules/gui/macosx/macosx.m
View file @
eb241138
...
@@ -87,13 +87,17 @@ void CloseVideoGL ( vlc_object_t * );
...
@@ -87,13 +87,17 @@ void CloseVideoGL ( vlc_object_t * );
#define EQ_KEEP_LONGTEXT N_("By default, VLC keeps the last equalizer settings before " \
#define EQ_KEEP_LONGTEXT N_("By default, VLC keeps the last equalizer settings before " \
"termination. This feature can be disabled here.")
"termination. This feature can be disabled here.")
#define USE_APPLE_REMOTE_TEXT N_("
Allow playback control
with the Apple Remote")
#define USE_APPLE_REMOTE_TEXT N_("
Control playback
with the Apple Remote")
#define USE_APPLE_REMOTE_LONGTEXT N_("By default, VLC can be remotely controlled with the Apple Remote.")
#define USE_APPLE_REMOTE_LONGTEXT N_("By default, VLC can be remotely controlled with the Apple Remote.")
#define USE_MEDIAKEYS_TEXT N_("
Allow playback control with the
media keys")
#define USE_MEDIAKEYS_TEXT N_("
Control playback with
media keys")
#define USE_MEDIAKEYS_LONGTEXT N_("By default, VLC can be controlled using the media keys on modern Apple " \
#define USE_MEDIAKEYS_LONGTEXT N_("By default, VLC can be controlled using the media keys on modern Apple " \
"keyboards.")
"keyboards.")
#define USE_MEDIAKEYS_BACKGROUND_TEXT N_("Use media key control when VLC is in background")
#define USE_MEDIAKEYS_BACKGROUND_LONGTEXT N_("By default, VLC will accept media key events also when being " \
"in background.")
vlc_module_begin ()
vlc_module_begin ()
set_description( N_("Mac OS X interface") )
set_description( N_("Mac OS X interface") )
set_capability( "interface", 200 )
set_capability( "interface", 200 )
...
@@ -112,6 +116,8 @@ vlc_module_begin ()
...
@@ -112,6 +116,8 @@ vlc_module_begin ()
false )
false )
add_bool( "macosx-mediakeys", 1, NULL, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT,
add_bool( "macosx-mediakeys", 1, NULL, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT,
false )
false )
add_bool( "macosx-mediakeys-background", 1, NULL, USE_MEDIAKEYS_BACKGROUND_TEXT, USE_MEDIAKEYS_BACKGROUND_LONGTEXT,
false )
add_submodule ()
add_submodule ()
set_description( "Mac OS X OpenGL" )
set_description( "Mac OS X OpenGL" )
...
...
modules/gui/macosx/simple_prefs.h
View file @
eb241138
...
@@ -91,6 +91,7 @@
...
@@ -91,6 +91,7 @@
IBOutlet
id
o_intf_fspanel_ckb
;
IBOutlet
id
o_intf_fspanel_ckb
;
IBOutlet
id
o_intf_appleremote_ckb
;
IBOutlet
id
o_intf_appleremote_ckb
;
IBOutlet
id
o_intf_mediakeys_ckb
;
IBOutlet
id
o_intf_mediakeys_ckb
;
IBOutlet
id
o_intf_mediakeys_bg_ckb
;
IBOutlet
id
o_intf_lang_pop
;
IBOutlet
id
o_intf_lang_pop
;
IBOutlet
id
o_intf_lang_txt
;
IBOutlet
id
o_intf_lang_txt
;
IBOutlet
id
o_intf_network_box
;
IBOutlet
id
o_intf_network_box
;
...
...
modules/gui/macosx/simple_prefs.m
View file @
eb241138
...
@@ -265,6 +265,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
...
@@ -265,6 +265,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[
o_intf_network_box
setTitle
:
_NS
(
"Privacy / Network Interaction"
)];
[
o_intf_network_box
setTitle
:
_NS
(
"Privacy / Network Interaction"
)];
[
o_intf_appleremote_ckb
setTitle
:
_NS
(
"Control playback with the Apple Remote"
)];
[
o_intf_appleremote_ckb
setTitle
:
_NS
(
"Control playback with the Apple Remote"
)];
[
o_intf_mediakeys_ckb
setTitle
:
_NS
(
"Control playback with media keys"
)];
[
o_intf_mediakeys_ckb
setTitle
:
_NS
(
"Control playback with media keys"
)];
[
o_intf_mediakeys_bg_ckb
setTitle
:
_NS
(
"...when VLC is in background"
)];
/* Subtitles and OSD */
/* Subtitles and OSD */
[
o_osd_encoding_txt
setStringValue
:
_NS
(
"Default Encoding"
)];
[
o_osd_encoding_txt
setStringValue
:
_NS
(
"Default Encoding"
)];
...
@@ -451,6 +452,8 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
...
@@ -451,6 +452,8 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
[
self
setupButton
:
o_intf_embedded_ckb
forBoolValue
:
"embedded-video"
];
[
self
setupButton
:
o_intf_embedded_ckb
forBoolValue
:
"embedded-video"
];
[
self
setupButton
:
o_intf_appleremote_ckb
forBoolValue
:
"macosx-appleremote"
];
[
self
setupButton
:
o_intf_appleremote_ckb
forBoolValue
:
"macosx-appleremote"
];
[
self
setupButton
:
o_intf_mediakeys_ckb
forBoolValue
:
"macosx-mediakeys"
];
[
self
setupButton
:
o_intf_mediakeys_ckb
forBoolValue
:
"macosx-mediakeys"
];
[
self
setupButton
:
o_intf_mediakeys_bg_ckb
forBoolValue
:
"macosx-mediakeys-background"
];
[
o_intf_mediakeys_bg_ckb
setEnabled
:
[
o_intf_mediakeys_ckb
state
]];
/******************
/******************
* audio settings *
* audio settings *
...
@@ -779,6 +782,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
...
@@ -779,6 +782,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
config_PutInt
(
p_intf
,
"embedded-video"
,
[
o_intf_embedded_ckb
state
]
);
config_PutInt
(
p_intf
,
"embedded-video"
,
[
o_intf_embedded_ckb
state
]
);
config_PutInt
(
p_intf
,
"macosx-appleremote"
,
[
o_intf_appleremote_ckb
state
]
);
config_PutInt
(
p_intf
,
"macosx-appleremote"
,
[
o_intf_appleremote_ckb
state
]
);
config_PutInt
(
p_intf
,
"macosx-mediakeys"
,
[
o_intf_mediakeys_ckb
state
]
);
config_PutInt
(
p_intf
,
"macosx-mediakeys"
,
[
o_intf_mediakeys_ckb
state
]
);
config_PutInt
(
p_intf
,
"macosx-mediakeys-background"
,
[
o_intf_mediakeys_bg_ckb
state
]
);
/* activate stuff without restart */
/* activate stuff without restart */
if
(
[
o_intf_appleremote_ckb
state
]
==
YES
)
if
(
[
o_intf_appleremote_ckb
state
]
==
YES
)
...
@@ -1079,6 +1083,8 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
...
@@ -1079,6 +1083,8 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
-
(
IBAction
)
interfaceSettingChanged
:(
id
)
sender
-
(
IBAction
)
interfaceSettingChanged
:(
id
)
sender
{
{
if
(
sender
==
o_intf_mediakeys_ckb
)
[
o_intf_mediakeys_bg_ckb
setEnabled
:
[
o_intf_mediakeys_ckb
state
]];
b_intfSettingChanged
=
YES
;
b_intfSettingChanged
=
YES
;
}
}
...
...
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