vlc/vlc-3.0 | branch: master | Marvin Scholz <epira...@gmail.com> | Fri Feb 23 
13:17:19 2018 +0100| [b26bc67909152769f47afabeacfd3fe311c3ea73] | committer: 
Thomas Guillem

macosx: Display icons depending on renderer capabilities

(cherry picked from commit 58c708a3afb6883837483eaa8cdfc7fb0d0b2d20)
Signed-off-by: Thomas Guillem <tho...@gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=b26bc67909152769f47afabeacfd3fe311c3ea73
---

 modules/gui/macosx/VLCRendererMenuController.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/gui/macosx/VLCRendererMenuController.m 
b/modules/gui/macosx/VLCRendererMenuController.m
index 2650651017..725275bf81 100644
--- a/modules/gui/macosx/VLCRendererMenuController.m
+++ b/modules/gui/macosx/VLCRendererMenuController.m
@@ -111,6 +111,10 @@
     NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle:item.name
                                                       
action:@selector(selectRenderer:)
                                                keyEquivalent:@""];
+    if (item.capabilityFlags & VLC_RENDERER_CAN_VIDEO)
+        [menuItem setImage:[NSImage imageNamed:@"sidebar-movie"]];
+    else
+        [menuItem setImage:[NSImage imageNamed:@"sidebar-music"]];
     [menuItem setTarget:self];
     [menuItem setRepresentedObject:item];
     [_rendererMenu insertItem:menuItem atIndex:[_rendererMenu 
indexOfItem:_rendererNoneItem] + 1];

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to