macosx: Display icons depending on renderer capabilities
authorMarvin Scholz <epirat07@gmail.com>
Fri, 23 Feb 2018 12:17:19 +0000 (13:17 +0100)
committerMarvin Scholz <epirat07@gmail.com>
Fri, 23 Feb 2018 12:24:49 +0000 (13:24 +0100)
modules/gui/macosx/VLCRendererMenuController.m

index 2650651..725275b 100644 (file)
     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];