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
2d83cb8b
Commit
2d83cb8b
authored
Feb 06, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: added 2 options: 'macosx-pause-minimized' and 'macosx-video-autoresize' (fixes #5861)
parent
08159b75
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1180 additions
and
27 deletions
+1180
-27
extras/package/macosx/Resources/English.lproj/Preferences.xib
...as/package/macosx/Resources/English.lproj/Preferences.xib
+1144
-22
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+11
-5
modules/gui/macosx/macosx.m
modules/gui/macosx/macosx.m
+12
-0
modules/gui/macosx/simple_prefs.h
modules/gui/macosx/simple_prefs.h
+2
-0
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+6
-0
modules/video_output/macosx.m
modules/video_output/macosx.m
+5
-0
No files found.
extras/package/macosx/Resources/English.lproj/Preferences.xib
View file @
2d83cb8b
This diff is collapsed.
Click to expand it.
modules/gui/macosx/MainWindow.m
View file @
2d83cb8b
...
...
@@ -764,8 +764,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
if
(
b_dark_interface
)
{
[
self
miniaturize
:
sender
];
if
([[
VLCMain
sharedInstance
]
activeVideoPlayback
])
[[
VLCCoreInteraction
sharedInstance
]
pause
];
if
(
config_GetInt
(
VLCIntf
,
"macosx-pause-minimized"
))
{
if
([[
VLCMain
sharedInstance
]
activeVideoPlayback
])
[[
VLCCoreInteraction
sharedInstance
]
pause
];
}
}
else
[
super
performMiniaturize
:
sender
];
...
...
@@ -908,10 +911,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
-
(
void
)
someWindowWillMiniaturize
:(
NSNotification
*
)
notification
{
if
([
notification
object
]
==
o_nonembedded_window
||
[
notification
object
]
==
self
)
if
(
config_GetInt
(
VLCIntf
,
"macosx-pause-minimized"
)
)
{
if
([[
VLCMain
sharedInstance
]
activeVideoPlayback
])
[[
VLCCoreInteraction
sharedInstance
]
pause
];
if
([
notification
object
]
==
o_nonembedded_window
||
[
notification
object
]
==
self
)
{
if
([[
VLCMain
sharedInstance
]
activeVideoPlayback
])
[[
VLCCoreInteraction
sharedInstance
]
pause
];
}
}
}
...
...
modules/gui/macosx/macosx.m
View file @
2d83cb8b
...
...
@@ -92,6 +92,16 @@ void WindowClose ( vout_window_t * );
#define SAVEVOL_TEXT N_( "Automatically save the volume on exit" )
#define KEEPSIZE_TEXT N_( "Resize interface to the native video size" )
#define KEEPSIZE_LONGTEXT N_( "You have two choices:\n" \
" - The interface will resize to the native video size\n" \
" - The video will fit to the interface size\n " \
"By default, interface resize to the native video size." )
#define PAUSE_MINIMIZED_TEXT N_( "Pause the video playback when minimized" )
#define PAUSE_MINIMIZED_LONGTEXT N_( \
"With this option enabled, the playback will be automatically paused when minimizing the window." )
vlc_module_begin ()
set_description( N_("Mac OS X interface") )
set_capability( "interface", 200 )
...
...
@@ -110,6 +120,8 @@ vlc_module_begin ()
add_obsolete_bool( "macosx-stretch" ) /* since 2.0.0 */
add_obsolete_bool( "macosx-background" ) /* since 2.0.0 */
add_obsolete_bool( "macosx-eq-keep" ) /* since 2.0.0 */
add_bool( "macosx-video-autoresize", true, KEEPSIZE_TEXT, KEEPSIZE_LONGTEXT, false )
add_bool( "macosx-pause-minimized", false, PAUSE_MINIMIZED_TEXT, PAUSE_MINIMIZED_LONGTEXT, false )
add_submodule ()
set_description( "Mac OS X Video Output Provider" )
...
...
modules/gui/macosx/simple_prefs.h
View file @
2d83cb8b
...
...
@@ -102,6 +102,8 @@
IBOutlet
id
o_intf_last_update_lbl
;
IBOutlet
id
o_intf_enableGrowl_ckb
;
IBOutlet
id
o_intf_nativefullscreen_ckb
;
IBOutlet
id
o_intf_autoresize_ckb
;
IBOutlet
id
o_intf_pauseminimized_ckb
;
IBOutlet
id
o_osd_encoding_pop
;
IBOutlet
id
o_osd_encoding_txt
;
...
...
modules/gui/macosx/simple_prefs.m
View file @
2d83cb8b
...
...
@@ -277,6 +277,8 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[
o_intf_update_ckb
setTitle
:
_NS
(
"Automatically check for updates"
)];
[
o_intf_last_update_lbl
setStringValue
:
@""
];
[
o_intf_enableGrowl_ckb
setTitle
:
_NS
(
"Enable Growl notifications (on playlist item change)"
)];
[
o_intf_autoresize_ckb
setTitle
:
_NS
(
"Resize interface to the native video size"
)];
[
o_intf_pauseminimized_ckb
setTitle
:
_NS
(
"Pause the video playback when minimized"
)];
/* Subtitles and OSD */
[
o_osd_encoding_txt
setStringValue
:
_NS
(
"Default Encoding"
)];
...
...
@@ -485,6 +487,8 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
[
o_intf_style_dark_bcell
setState
:
NO
];
[
o_intf_style_bright_bcell
setState
:
YES
];
}
[
self
setupButton
:
o_intf_autoresize_ckb
forBoolValue
:
"macosx-video-autoresize"
];
[
self
setupButton
:
o_intf_pauseminimized_ckb
forBoolValue
:
"macosx-pause-minimized"
];
/******************
* audio settings *
...
...
@@ -818,6 +822,8 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
config_PutInt
(
p_intf
,
"macosx-mediakeys"
,
[
o_intf_mediakeys_ckb
state
]
);
config_PutInt
(
p_intf
,
"macosx-interfacestyle"
,
[
o_intf_style_dark_bcell
state
]
);
config_PutInt
(
p_intf
,
"macosx-nativefullscreenmode"
,
[
o_intf_nativefullscreen_ckb
state
]
);
config_PutInt
(
p_intf
,
"macosx-pause-minimized"
,
[
o_intf_pauseminimized_ckb
state
]
);
config_PutInt
(
p_intf
,
"macosx-video-autoresize"
,
[
o_intf_autoresize_ckb
state
]
);
if
(
[
o_intf_enableGrowl_ckb
state
]
==
NSOnState
)
{
tmpString
=
getString
(
"control"
);
...
...
modules/video_output/macosx.m
View file @
2d83cb8b
...
...
@@ -336,6 +336,11 @@ static int Control (vout_display_t *vd, int query, va_list ap)
case
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
:
case
VOUT_DISPLAY_CHANGE_SOURCE_CROP
:
{
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
)
{
if
(
!
config_GetInt
(
vd
,
"macosx-video-autoresize"
))
return
VLC_SUCCESS
;
}
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSPoint
topleftbase
;
NSPoint
topleftscreen
;
...
...
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