Mercurial > hg > sonic-visualiser
diff main/main.cpp @ 367:726e1c1382f3 macness
Beginnings of AppleScript querying of iTunes
author | Dan Stowell <dan.stowell@eecs.qmul.ac.uk> |
---|---|
date | Tue, 12 Oct 2010 13:04:50 +0100 |
parents | d0c5831d6528 |
children | ca9f27734349 |
line wrap: on
line diff
--- a/main/main.cpp Mon Oct 11 16:55:24 2010 +0100 +++ b/main/main.cpp Tue Oct 12 13:04:50 2010 +0100 @@ -39,6 +39,7 @@ #include <QFileOpenEvent> #include <QMenu> #ifdef Q_WS_MAC + #include "osx/svitunes.h" void qt_mac_set_dock_menu(QMenu *menu); // must declare it ourselves, weirdly enough #endif @@ -219,7 +220,11 @@ void setupDockMenu() { std::cerr << "SV adding mac dock menu" << std::endl; QMenu *dockMenu = new QMenu(); - dockMenu->addAction("a SV DOCK action"); + QString theText = iTunesNowPlayingPath(); + if (theText == ""){ + theText = "[[No current track in iTunes]]"; + } + dockMenu->addAction(theText); qt_mac_set_dock_menu(dockMenu); } #endif