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
2828486c
Commit
2828486c
authored
Apr 14, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: add option to hide effects button in control bar
parent
534f8d2f
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
238 additions
and
1640 deletions
+238
-1640
extras/package/macosx/Resources/English.lproj/MainMenu.xib
extras/package/macosx/Resources/English.lproj/MainMenu.xib
+101
-1637
modules/gui/macosx/ControlsBar.h
modules/gui/macosx/ControlsBar.h
+1
-0
modules/gui/macosx/ControlsBar.m
modules/gui/macosx/ControlsBar.m
+118
-3
modules/gui/macosx/MainMenu.h
modules/gui/macosx/MainMenu.h
+2
-0
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+11
-0
modules/gui/macosx/macosx.m
modules/gui/macosx/macosx.m
+5
-0
No files found.
extras/package/macosx/Resources/English.lproj/MainMenu.xib
View file @
2828486c
This diff is collapsed.
Click to expand it.
modules/gui/macosx/ControlsBar.h
View file @
2828486c
...
...
@@ -141,6 +141,7 @@
-
(
void
)
setShuffle
;
-
(
IBAction
)
shuffle
:(
id
)
sender
;
-
(
void
)
toggleEffectsButton
;
-
(
void
)
toggleJumpButtons
;
-
(
void
)
togglePlaymodeButtons
;
...
...
modules/gui/macosx/ControlsBar.m
View file @
2828486c
...
...
@@ -140,7 +140,7 @@
if
([[
o_bottombar_view
window
]
styleMask
]
&
NSResizableWindowMask
)
[
o_resize_view
removeFromSuperviewWithoutNeedingDisplay
];
// remove fullscreen button for lion fullscreen
if
(
b_nativeFullscreenMode
)
{
float
f_width
=
[
o_fullscreen_btn
frame
].
size
.
width
;
...
...
@@ -531,7 +531,7 @@ frame.origin.x = f_width + frame.origin.x; \
// time field and progress bar are moved in super method!
}
b_show_jump_buttons
=
config_GetInt
(
VLCIntf
,
"macosx-show-playback-buttons"
);
if
(
b_show_jump_buttons
)
...
...
@@ -541,6 +541,9 @@ frame.origin.x = f_width + frame.origin.x; \
if
(
!
b_show_playmode_buttons
)
[
self
removePlaymodeButtons
:
YES
];
if
(
!
config_GetInt
(
VLCIntf
,
"macosx-show-effects-button"
))
[
self
removeEffectsButton
:
YES
];
[[
VLCMain
sharedInstance
]
playbackModeUpdated
];
}
...
...
@@ -548,6 +551,118 @@ frame.origin.x = f_width + frame.origin.x; \
#pragma mark -
#pragma mark interface customization
-
(
void
)
toggleEffectsButton
{
if
(
config_GetInt
(
VLCIntf
,
"macosx-show-effects-button"
))
[
self
addEffectsButton
:
NO
];
else
[
self
removeEffectsButton
:
NO
];
}
-
(
void
)
addEffectsButton
:(
BOOL
)
b_fast
{
if
(
!
o_effects_btn
)
return
;
if
(
b_fast
)
{
[
o_effects_btn
setHidden
:
NO
];
}
else
{
[[
o_effects_btn
animator
]
setHidden
:
NO
];
}
#define moveItem(item) \
frame = [item frame]; \
frame.origin.x = frame.origin.x - f_space; \
if (b_fast) \
[item setFrame: frame]; \
else \
[[item animator] setFrame: frame]
NSRect
frame
;
float
f_space
=
[
o_effects_btn
frame
].
size
.
width
;
// extra margin between button and volume up button
if
(
b_nativeFullscreenMode
)
f_space
+=
2
;
moveItem
(
o_volume_up_btn
);
moveItem
(
o_volume_sld
);
moveItem
(
o_volume_track_view
);
moveItem
(
o_volume_down_btn
);
moveItem
(
o_time_fld
);
#undef moveItem
frame
=
[
o_progress_view
frame
];
frame
.
size
.
width
=
frame
.
size
.
width
-
f_space
;
if
(
b_fast
)
[
o_progress_view
setFrame
:
frame
];
else
[[
o_progress_view
animator
]
setFrame
:
frame
];
if
(
!
b_nativeFullscreenMode
)
{
if
(
b_dark_interface
)
{
[
o_fullscreen_btn
setImage
:
[
NSImage
imageNamed
:
@"fullscreen-double-buttons_dark"
]];
[
o_fullscreen_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"fullscreen-double-buttons-pressed_dark"
]];
}
else
{
[
o_fullscreen_btn
setImage
:
[
NSImage
imageNamed
:
@"fullscreen-double-buttons"
]];
[
o_fullscreen_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"fullscreen-double-buttons-pressed"
]];
}
}
[
o_bottombar_view
setNeedsDisplay
:
YES
];
}
-
(
void
)
removeEffectsButton
:(
BOOL
)
b_fast
{
if
(
!
o_effects_btn
)
return
;
[
o_effects_btn
setHidden
:
YES
];
#define moveItem(item) \
frame = [item frame]; \
frame.origin.x = frame.origin.x + f_space; \
if (b_fast) \
[item setFrame: frame]; \
else \
[[item animator] setFrame: frame]
NSRect
frame
;
float
f_space
=
[
o_effects_btn
frame
].
size
.
width
;
// extra margin between button and volume up button
if
(
b_nativeFullscreenMode
)
f_space
+=
2
;
moveItem
(
o_volume_up_btn
);
moveItem
(
o_volume_sld
);
moveItem
(
o_volume_track_view
);
moveItem
(
o_volume_down_btn
);
moveItem
(
o_time_fld
);
#undef moveItem
frame
=
[
o_progress_view
frame
];
frame
.
size
.
width
=
frame
.
size
.
width
+
f_space
;
if
(
b_fast
)
[
o_progress_view
setFrame
:
frame
];
else
[[
o_progress_view
animator
]
setFrame
:
frame
];
if
(
!
b_nativeFullscreenMode
)
{
if
(
b_dark_interface
)
{
[[
o_fullscreen_btn
animator
]
setImage
:
[
NSImage
imageNamed
:
@"fullscreen-one-button_dark"
]];
[[
o_fullscreen_btn
animator
]
setAlternateImage
:
[
NSImage
imageNamed
:
@"fullscreen-one-button-pressed_dark"
]];
}
else
{
[[
o_fullscreen_btn
animator
]
setImage
:
[
NSImage
imageNamed
:
@"fullscreen-one-button"
]];
[[
o_fullscreen_btn
animator
]
setAlternateImage
:
[
NSImage
imageNamed
:
@"fullscreen-one-button-pressed"
]];
}
}
[
o_bottombar_view
setNeedsDisplay
:
YES
];
}
-
(
void
)
toggleJumpButtons
{
b_show_jump_buttons
=
config_GetInt
(
VLCIntf
,
"macosx-show-playback-buttons"
);
...
...
@@ -616,7 +731,7 @@ if (b_fast) \
[item setFrame: frame]; \
else \
[[item animator] setFrame: frame]
float
f_space
=
29
.;
moveItem
(
o_bwd_btn
);
f_space
=
28
.;
...
...
modules/gui/macosx/MainMenu.h
View file @
2828486c
...
...
@@ -80,6 +80,7 @@
IBOutlet
NSMenu
*
o_mu_view
;
IBOutlet
NSMenuItem
*
o_mi_toggleJumpButtons
;
IBOutlet
NSMenuItem
*
o_mi_togglePlaymodeButtons
;
IBOutlet
NSMenuItem
*
o_mi_toggleEffectsButton
;
IBOutlet
NSMenuItem
*
o_mi_toggleSidebar
;
IBOutlet
NSMenu
*
o_mu_playlistTableColumns
;
NSMenu
*
o_mu_playlistTableColumnsContextMenu
;
...
...
@@ -226,6 +227,7 @@
-
(
IBAction
)
intfOpenNet
:(
id
)
sender
;
-
(
IBAction
)
intfOpenCapture
:(
id
)
sender
;
-
(
IBAction
)
toggleEffectsButton
:(
id
)
sender
;
-
(
IBAction
)
toggleJumpButtons
:(
id
)
sender
;
-
(
IBAction
)
togglePlaymodeButtons
:(
id
)
sender
;
-
(
IBAction
)
toggleSidebar
:(
id
)
sender
;
...
...
modules/gui/macosx/MainMenu.m
View file @
2828486c
...
...
@@ -300,6 +300,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
[
o_mi_toggleJumpButtons
setState
:
config_GetInt
(
VLCIntf
,
"macosx-show-playback-buttons"
)];
[
o_mi_togglePlaymodeButtons
setTitle
:
_NS
(
"Show Shuffle & Repeat Buttons"
)];
[
o_mi_togglePlaymodeButtons
setState
:
config_GetInt
(
VLCIntf
,
"macosx-show-playmode-buttons"
)];
[
o_mi_toggleEffectsButton
setTitle
:
_NS
(
"Show Audio Effects Button"
)];
[
o_mi_toggleEffectsButton
setState
:
config_GetInt
(
VLCIntf
,
"macosx-show-effects-button"
)];
[
o_mi_toggleSidebar
setTitle
:
_NS
(
"Show Sidebar"
)];
[
o_mi_toggleSidebar
setState
:
config_GetInt
(
VLCIntf
,
"macosx-show-sidebar"
)];
[
o_mu_playlistTableColumns
setTitle
:
_NS
(
"Playlist Table Columns"
)];
...
...
@@ -635,6 +637,15 @@ static VLCMainMenu *_o_sharedInstance = nil;
#pragma mark -
#pragma mark View
-
(
IBAction
)
toggleEffectsButton
:(
id
)
sender
{
BOOL
b_value
=
!
config_GetInt
(
VLCIntf
,
"macosx-show-effects-button"
);
config_PutInt
(
VLCIntf
,
"macosx-show-effects-button"
,
b_value
);
[[[[
VLCMain
sharedInstance
]
mainWindow
]
controlsBar
]
toggleEffectsButton
];
[
o_mi_toggleEffectsButton
setState
:
b_value
];
}
-
(
IBAction
)
toggleJumpButtons
:(
id
)
sender
{
BOOL
b_value
=
!
config_GetInt
(
VLCIntf
,
"macosx-show-playback-buttons"
);
...
...
modules/gui/macosx/macosx.m
View file @
2828486c
...
...
@@ -117,6 +117,9 @@ void WindowClose (vout_window_t *);
#define PLAYMODEBUTTONS_TEXT N_("Show play mode control buttons")
#define PLAYMODEBUTTONS_LONGTEXT N_("Shows the shuffle and repeat buttons in the main window.")
#define EFFECTSBUTTON_TEXT N_("Show audio effects button")
#define EFFECTSBUTTON_LONGTEXT N_("Shows the audio effects button in the main window.")
#define SIDEBAR_TEXT N_("Show sidebar")
#define SIDEBAR_LONGTEXT N_("Shows a sidebar in the main window listing media sources.")
...
...
@@ -143,6 +146,8 @@ vlc_module_begin()
add_bool("macosx-icon-change", true, ICONCHANGE_TEXT, ICONCHANGE_LONGTEXT, true)
add_bool("macosx-show-playback-buttons", false, JUMPBUTTONS_TEXT, JUMPBUTTONS_LONGTEXT, false)
add_bool("macosx-show-playmode-buttons", true, PLAYMODEBUTTONS_TEXT, PLAYMODEBUTTONS_LONGTEXT, false)
add_bool("macosx-show-effects-button", false, EFFECTSBUTTON_TEXT, EFFECTSBUTTON_LONGTEXT, false)
add_bool("macosx-show-sidebar", true, SIDEBAR_TEXT, SIDEBAR_LONGTEXT, false)
set_section(N_("Behaviour"), 0)
...
...
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