# HG changeset patch # User Dan Stowell # Date 1286812524 -3600 # Node ID d0c5831d6528f562a6ab94d0caef9cfdc66aee65 # Parent 174ca518546fb55d4a8c8ec1d4a710303c3c5c56 First step in creating a useful dock menu for SV; a placeholder item is added, so far diff -r 174ca518546f -r d0c5831d6528 main/main.cpp --- a/main/main.cpp Mon Oct 11 15:47:12 2010 +0100 +++ b/main/main.cpp Mon Oct 11 16:55:24 2010 +0100 @@ -37,6 +37,10 @@ #include #include #include +#include +#ifdef Q_WS_MAC + void qt_mac_set_dock_menu(QMenu *menu); // must declare it ourselves, weirdly enough +#endif #include "../version.h" @@ -211,6 +215,16 @@ bool m_readyForFiles; QStringList m_filepathQueue; +#ifdef Q_WS_MAC + void setupDockMenu() { + std::cerr << "SV adding mac dock menu" << std::endl; + QMenu *dockMenu = new QMenu(); + dockMenu->addAction("a SV DOCK action"); + qt_mac_set_dock_menu(dockMenu); + } +#endif + + protected: MainWindow *m_mainWindow; bool event(QEvent *); @@ -390,6 +404,10 @@ settings.endGroup(); #endif +#ifdef Q_WS_MAC + application.setupDockMenu(); +#endif + if (splash) splash->finish(gui); delete splash;