From: Felix Paul Kühne Date: Sat, 16 Feb 2013 22:50:36 +0000 (+0100) Subject: macosx: fix audio device selection visuals and remove fake 'Default' item now that... X-Git-Tag: 2.1.0-git~1256 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=6d85209c9f4d75478f96aa982255ebcac35cf93e;p=vlc macosx: fix audio device selection visuals and remove fake 'Default' item now that auhal handles it --- diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m index 1f67adf82f..b664e2f337 100644 --- a/modules/gui/macosx/MainMenu.m +++ b/modules/gui/macosx/MainMenu.m @@ -734,24 +734,17 @@ static VLCMainMenu *_o_sharedInstance = nil; return; currentDevice = aout_DeviceGet(p_aout); - NSMenuItem * o_mi_tmp; - o_mi_tmp = [o_mu_device addItemWithTitle:_NS("Default") action:@selector(toggleAudioDevice:) keyEquivalent:@""]; - [o_mi_tmp setTarget:self]; - if (!currentDevice) - [o_mi_tmp setState:NSOnState]; for (NSUInteger x = 0; x < n; x++) { o_mi_tmp = [o_mu_device addItemWithTitle:[NSString stringWithFormat:@"%s", names[x]] action:@selector(toggleAudioDevice:) keyEquivalent:@""]; [o_mi_tmp setTarget:self]; [o_mi_tmp setTag:[[NSString stringWithFormat:@"%s", ids[x]] intValue]]; - if (currentDevice) { - if (!strcmp(ids[x], currentDevice)) - [o_mi_tmp setState: NSOnState]; - } } vlc_object_release(p_aout); + [[o_mu_device itemWithTag:[[NSString stringWithFormat:@"%s", currentDevice] intValue]] setState:NSOnState]; + for (NSUInteger x = 0; x < n; x++) { free(ids[x]); free(names[x]); @@ -1366,7 +1359,7 @@ static VLCMainMenu *_o_sharedInstance = nil; vlc_object_release(p_vout); } } - + [self setupMenus]; /* Make sure video menu is up to date */ }