From fedd13511bbf91914a0250b43c440f43e6d1e8c5 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 23 Dec 2008 21:13:34 +0000 Subject: full mpris support; new options: "repeat track", "show protocol" git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@698 90c681e8-e032-0410-971d-27865f9a5e38 --- src/ui/mainwindow.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/ui/mainwindow.cpp') diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index d9a45249d..475c5e110 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -202,7 +202,7 @@ void MainWindow::stop() void MainWindow::next() { - m_player->next(); + m_player->next(); } void MainWindow::previous() @@ -417,11 +417,26 @@ void MainWindow::createActions() m_mainMenu->addAction(tr("&Next"),this, SLOT(next()), tr("B")); m_mainMenu->addAction(tr("&Play/Pause"),this, SLOT(playPause()), tr("Space")); m_mainMenu->addSeparator(); + QAction *repeateAllAction = m_mainMenu->addAction(tr("&Repeat All")); + QAction *repeateTrackAction = m_mainMenu->addAction(tr("&Repeat Track")); + QAction *shuffleAction = m_mainMenu->addAction(tr("&Shuffle")); + repeateAllAction->setCheckable (TRUE); + repeateTrackAction->setCheckable (TRUE); + shuffleAction->setCheckable (TRUE); + repeateAllAction->setShortcut(tr("R")) ; + repeateTrackAction->setShortcut(tr("Ctrl+R")) ; + shuffleAction->setShortcut(tr("S")) ; + connect(repeateAllAction, SIGNAL(triggered (bool)), m_playListModel, SLOT(prepareForRepeatablePlaying(bool))); + connect(repeateTrackAction, SIGNAL(triggered (bool)), m_player, SLOT(setRepeatable(bool))); + connect(shuffleAction, SIGNAL(triggered (bool)), m_playListModel, SLOT(prepareForShufflePlaying(bool))); + connect(m_playListModel, SIGNAL(repeatableListChanged(bool)), repeateAllAction, SLOT(setChecked(bool))); + connect(m_player, SIGNAL (repeatableChanged(bool)), repeateTrackAction, SLOT(setChecked(bool))); + connect(m_playListModel, SIGNAL(shuffleChanged(bool)), shuffleAction, SLOT(setChecked(bool))); + m_mainMenu->addSeparator(); m_mainMenu->addAction(tr("&Jump To File"),this, SLOT(jumpToFile()), tr("J")); m_mainMenu->addSeparator(); m_visMenu = new VisualMenu(this); m_mainMenu->addMenu(m_visMenu); - m_mainMenu->addSeparator(); m_mainMenu->addAction(tr("&Settings"), this, SLOT(showSettings()), tr("Ctrl+P")); m_mainMenu->addSeparator(); -- cgit v1.2.3-13-gbd6f