From 7e3a856975ef9846cb94982d3dd584d31a553b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 30 Aug 2010 10:00:54 +0000 Subject: [PATCH] Don't disable the audio/video track menus anymore when there is only one track. I introduced this at diver's request, but I think it's irritating. Also when the audio tracks will be named after their language, it would be nice to know it, or even perhaps other properties, like channel count. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38440 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/mediaplayer/MainWin.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/apps/mediaplayer/MainWin.cpp b/src/apps/mediaplayer/MainWin.cpp index b59eb5a0ef..d7678996a9 100644 --- a/src/apps/mediaplayer/MainWin.cpp +++ b/src/apps/mediaplayer/MainWin.cpp @@ -1414,11 +1414,10 @@ MainWin::_SetupTrackMenus(BMenu* audioTrackMenu, BMenu* videoTrackMenu) item->SetMarked(i == current); audioTrackMenu->AddItem(item); } - if (!count) { + if (count == 0) { audioTrackMenu->AddItem(new BMenuItem("none", new BMessage(M_DUMMY))); audioTrackMenu->ItemAt(0)->SetMarked(true); } - audioTrackMenu->SetEnabled(count > 1); count = fController->VideoTrackCount(); @@ -1430,11 +1429,10 @@ MainWin::_SetupTrackMenus(BMenu* audioTrackMenu, BMenu* videoTrackMenu) item->SetMarked(i == current); videoTrackMenu->AddItem(item); } - if (!count) { + if (count == 0) { videoTrackMenu->AddItem(new BMenuItem("none", new BMessage(M_DUMMY))); videoTrackMenu->ItemAt(0)->SetMarked(true); } - videoTrackMenu->SetEnabled(count > 1); }