# HG changeset patch # User Chris Cannam # Date 1353072104 0 # Node ID 90bac2cf39f1a264c437544c3659a5a2f15053eb # Parent a830a57084c29018151378edc90290a403da94ee Pull out app name into arg, pull down description label from superclass diff -r a830a57084c2 -r 90bac2cf39f1 .hgsubstate --- a/.hgsubstate Tue Aug 21 13:36:28 2012 +0100 +++ b/.hgsubstate Fri Nov 16 13:21:44 2012 +0000 @@ -1,3 +1,3 @@ -5c045faf74a988a0721c1bbf50d4553b74a7d320 svapp -f5aeda36d5bdf922d73850a4f15dc240421935c4 svcore +8a603a0840c8cb6b756fa598a215a74c336682ac svapp +8b79ad680ee720488700402482fd17b63e4bc090 svcore 7ac63919fd52761b5ffc2cf3a4686b2e4ee88932 svgui diff -r a830a57084c2 -r 90bac2cf39f1 main/MainWindow.cpp --- a/main/MainWindow.cpp Tue Aug 21 13:36:28 2012 +0100 +++ b/main/MainWindow.cpp Fri Nov 16 13:21:44 2012 +0000 @@ -168,7 +168,7 @@ { Profiler profiler("MainWindow::MainWindow"); - setWindowTitle(tr("Sonic Visualiser")); + setWindowTitle(QApplication::applicationName()); UnitDatabase *udb = UnitDatabase::getInstance(); udb->registerUnit("Hz"); @@ -430,20 +430,12 @@ icon.addPixmap(il.loadPixmap("filenew-22")); QAction *action = new QAction(icon, tr("&New Session"), this); action->setShortcut(tr("Ctrl+N")); - action->setStatusTip(tr("Abandon the current Sonic Visualiser session and start a new one")); + action->setStatusTip(tr("Abandon the current %1 session and start a new one").arg(QApplication::applicationName())); connect(action, SIGNAL(triggered()), this, SLOT(newSession())); m_keyReference->registerShortcut(action); menu->addAction(action); toolbar->addAction(action); -/* - icon = il.load("fileopensession"); - action = new QAction(icon, tr("&Open Session..."), this); - action->setShortcut(tr("Ctrl+O")); - action->setStatusTip(tr("Open a previously saved Sonic Visualiser session file")); - connect(action, SIGNAL(triggered()), this, SLOT(openSession())); - m_keyReference->registerShortcut(action); - menu->addAction(action); -*/ + icon = il.load("fileopen"); icon.addPixmap(il.loadPixmap("fileopen-22")); action = new QAction(icon, tr("&Open..."), this); @@ -488,7 +480,7 @@ icon.addPixmap(il.loadPixmap("filesave-22")); action = new QAction(icon, tr("&Save Session"), this); action->setShortcut(tr("Ctrl+S")); - action->setStatusTip(tr("Save the current session into a Sonic Visualiser session file")); + action->setStatusTip(tr("Save the current session into a %1 session file").arg(QApplication::applicationName())); connect(action, SIGNAL(triggered()), this, SLOT(saveSession())); connect(this, SIGNAL(canSave(bool)), action, SLOT(setEnabled(bool))); m_keyReference->registerShortcut(action); @@ -499,7 +491,7 @@ icon.addPixmap(il.loadPixmap("filesaveas-22")); action = new QAction(icon, tr("Save Session &As..."), this); action->setShortcut(tr("Ctrl+Shift+S")); - action->setStatusTip(tr("Save the current session into a new Sonic Visualiser session file")); + action->setStatusTip(tr("Save the current session into a new %1 session file").arg(QApplication::applicationName())); connect(action, SIGNAL(triggered()), this, SLOT(saveSessionAs())); menu->addAction(action); toolbar->addAction(action); @@ -585,7 +577,7 @@ action = new QAction(il.load("exit"), tr("&Quit"), this); action->setShortcut(tr("Ctrl+Q")); - action->setStatusTip(tr("Exit Sonic Visualiser")); + action->setStatusTip(tr("Exit %1").arg(QApplication::applicationName())); connect(action, SIGNAL(triggered()), qApp, SLOT(closeAllWindows())); m_keyReference->registerShortcut(action); menu->addAction(action); @@ -1664,28 +1656,30 @@ IconLoader il; + QString name = QApplication::applicationName(); + QAction *action = new QAction(il.load("help"), tr("&Help Reference"), this); action->setShortcut(tr("F1")); - action->setStatusTip(tr("Open the Sonic Visualiser reference manual")); + action->setStatusTip(tr("Open the %1 reference manual").arg(name)); connect(action, SIGNAL(triggered()), this, SLOT(help())); m_keyReference->registerShortcut(action); menu->addAction(action); action = new QAction(tr("&Key and Mouse Reference"), this); action->setShortcut(tr("F2")); - action->setStatusTip(tr("Open a window showing the keystrokes you can use in Sonic Visualiser")); + action->setStatusTip(tr("Open a window showing the keystrokes you can use in %1").arg(name)); connect(action, SIGNAL(triggered()), this, SLOT(keyReference())); m_keyReference->registerShortcut(action); menu->addAction(action); - action = new QAction(tr("Sonic Visualiser on the &Web"), this); - action->setStatusTip(tr("Open the Sonic Visualiser website")); + action = new QAction(tr("%1 on the &Web").arg(name), this); + action->setStatusTip(tr("Open the %1 website").arg(name)); connect(action, SIGNAL(triggered()), this, SLOT(website())); menu->addAction(action); - action = new QAction(tr("&About Sonic Visualiser"), this); - action->setStatusTip(tr("Show information about Sonic Visualiser")); + action = new QAction(tr("&About %1").arg(name), this); + action->setStatusTip(tr("Show information about %1").arg(name)); connect(action, SIGNAL(triggered()), this, SLOT(about())); menu->addAction(action); } @@ -2799,7 +2793,7 @@ m_timeRulerLayer = 0; // document owned this m_sessionFile = ""; - setWindowTitle(tr("Sonic Visualiser")); + setWindowTitle(QApplication::applicationName()); CommandHistory::getInstance()->clear(); CommandHistory::getInstance()->documentSaved(); @@ -3254,7 +3248,8 @@ QMessageBox::critical(this, tr("Failed to save file"), tr("Save failed

Session file \"%1\" could not be saved.").arg(path)); } else { - setWindowTitle(tr("Sonic Visualiser: %1") + setWindowTitle(tr("%1: %1") + .arg(QApplication::applicationName()) .arg(QFileInfo(path).fileName())); m_sessionFile = path; CommandHistory::getInstance()->documentSaved(); diff -r a830a57084c2 -r 90bac2cf39f1 main/MainWindow.h --- a/main/MainWindow.h Tue Aug 21 13:36:28 2012 +0100 +++ b/main/MainWindow.h Fri Nov 16 13:21:44 2012 +0000 @@ -234,6 +234,7 @@ QFrame *m_playControlsSpacer; int m_playControlsWidth; + QLabel *m_descriptionLabel; QLabel *m_currentLabel; QPointer m_preferencesDialog;