void SjMainFrame::InitMainMenu() { // Add the menu entries to the menu titles allocated in AllocMainMenu(). if( m_menuBar ) { // mac specific #ifdef __WXMAC__ wxApp::s_macHelpMenuTitleName = _("Help"); wxApp::s_macAboutMenuItemId = IDO_ABOUT_SILVERJUKE; wxApp::s_macExitMenuItemId = IDT_QUIT; #endif // file menu - do not update as there are problems with the MAC-specific items if( !m_menuBarComplete ) { bool enableQueue = m_player.m_queue.GetCount()!=0; m_fileMenu->Append(IDO_SETTINGS_ADDFILES, _("Add folders and files")+wxString(wxT("..."))); // just a second menu entry with the same funktionality to make things clearer m_fileMenu->Append(IDT_UPDATE_INDEX); m_fileMenu->AppendSeparator(); m_fileMenu->Append(IDT_OPEN_FILES); m_fileMenu->Append(IDT_SAVE_PLAYLIST); m_fileMenu->Enable(IDT_SAVE_PLAYLIST, enableQueue); m_fileMenu->Append(IDT_UNQUEUE_ALL); m_fileMenu->Enable(IDT_UNQUEUE_ALL, enableQueue); m_fileMenu->AppendSeparator(); m_fileMenu->Append(IDT_SETTINGS_JUKEBOX); m_fileMenu->AppendSeparator(); m_fileMenu->Append(IDT_QUIT); } // edit menu m_editMenu->Clear(); m_playbackMenu->Clear(); // clear here as partly initalized with m_libraryModule->CreateMenu() m_libraryModule->CreateMenu(m_playbackMenu, m_editMenu, TRUE); m_libraryModule->UpdateMenuBar(); m_editMenu->AppendSeparator(); m_editMenu->Append(IDO_SELECTALL); m_editMenu->AppendSeparator(); m_editMenu->Append(IDT_SEARCH_BUTTON); m_editMenu->Append(IDT_ADV_SEARCH); m_editMenu->Append(IDO_REALLYENDSEARCH, _("End search")); m_editMenu->Enable(IDO_REALLYENDSEARCH, HasAnySearch()); m_editMenu->AppendSeparator(); m_editMenu->Append(IDT_SETTINGS_JUKEBOX); // view menu m_viewMenu->Clear(); CreateViewMenu(m_viewMenu, TRUE); // playback menu m_playbackMenu->AppendSeparator(); CreatePlaybackMenu(m_playbackMenu, TRUE); // kiosk menu if( !m_menuBarComplete ) { CreateKioskMenu(m_kioskMenu); } // extras menu m_extrasMenu->Clear(); CreateExtrasMenu(m_extrasMenu); // help menu - do not update as there are problems with the MAC-specific items if( !m_menuBarComplete ) { m_helpMenu->Append(IDO_ABOUT_OPEN_WWW, wxString::Format(_("%s on the web"), SJ_PROGRAM_NAME)+wxString(wxT("..."))); m_helpMenu->Append(IDO_ONLINE_HELP, _("Online help")+wxString(wxT("..."))); m_helpMenu->AppendSeparator(); m_helpMenu->Append(IDO_ABOUT, wxString::Format(_("About %s"), SJ_PROGRAM_NAME)+wxString(wxT("..."))); } #ifdef __WXMAC__ if( !m_menuBarComplete ) { SetMenuBar(m_menuBar); } #endif m_menuBarComplete = TRUE; m_libraryModule->UpdateMenuBar(); UpdateMenuBarQueue(); } }
static void PlayMode(GUI *data) { CreatePlaybackMenu(); GeneralFuncF1(2); }