From bca5ce8d7f6a8e37ca29d9bd0b46d0268ca4b6ae Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 22 Jul 2014 12:18:31 -0400 Subject: [PATCH 1/6] "What is this" additions by @musikBear #896 --- src/gui/PianoRoll.cpp | 75 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 66a6f6971..32c0b90a3 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -468,8 +468,6 @@ PianoRoll::PianoRoll() : tr( "Click here and the notes from the clipboard will be " "pasted at the first visible measure." ) ); - - QLabel * zoom_lbl = new QLabel( m_toolBar ); zoom_lbl->setPixmap( embed::getIconPixmap( "zoom" ) ); @@ -620,6 +618,79 @@ PianoRoll::PianoRoll() : tb_layout->addSpacing( 4 ); tb_layout->addWidget( m_chordComboBox ); tb_layout->addStretch(); + + /*new WITs starts here*/ + + m_zoomingComboBox->setWhatsThis( + tr( + "This controls the magnification over time." + "It can be a help to choose a magnification for a specific task." + "For ordinary editing, the magnification should be fitted to your" + "smallest used notes." + "Most will use the default magnification of 100%," + "when the shortest notes are 1/16." + "If you have used shorter notes, your editing will be easier," + "with a magnification of 200%, or more." + "You should use low magnification, if you need to move a block" + "of notes many bars, or just to get an overview of the score." + ) ); + + m_quantizeComboBox->setWhatsThis( + tr( + "This 'Q' stands for quantification, and controls the minimum spacing" + "between notes." + "In piano-roll this is very important, when you make syncopated patterns," + "and an absolute must, for swing-notes!" + "Observe that the score segmentation also changes, depending on the selected Q." + "You should not use a Q-value that does not fit your chosen time-signature!" + "The default value is 1/16, and that fits the default 4/4 timing." + "A Q of 1/16 will also work well in most editing." + ) ); + + m_noteLenComboBox->setWhatsThis( + tr( + "This let you select the note you place in the score." + "In most circumstances the best choice is 'Last Note'" + "The choice 'Last Note' mean that LMMS will use the note you last clicked," + "when you place the next note." + "But you can choose any note-length from this drop-down," + "and your choice will be the note, that you can draw in the score." + ) ); + + m_scaleComboBox->setWhatsThis( + tr( + "This let you select a music scale that LMMS then will annotate." + "The feature is directly connected to the context-menu" + "on the virtual keyboard, to the left." + "First you chose which scale you will use." + "You do that in this very dropdown!" + "Then you choose the key of your composition." + "Right mouse click on the selected key in the virtual keyboard," + "and then choose 'Mark current Scale'" + "LMMS will annotate all notes that belongs to the chosen scale," + "and in the key you have selected!" + "LMMS will not only annotate in the score you have open," + "but all scores in your project, will be correctly annotated." + "This will help you avoid using bum-notes, as you compose." + "You should know about principle scales in music." + "Search the net, if you do not!" + ) ); + + m_chordComboBox->setWhatsThis( + tr( + "This let you select a standard music chord." + "All notes that are played simultaneous, are 'chords'," + "but a large number of simultaneous key combinations, has own names," + "and its own place in music." + "They are standard chords, and it is these chords," + "you can find in this drop-down." + "After you have selected a chord, any click in the score," + "will place that chord, musically correctly," + "and with the Left mouse clicked note, as the root-note in the chord!" + "To return to single note placement, you need to choose 'No chord'" + "in this drop-down!" + ) ); + /**\newWITs for piano roll ends here */ // setup our actual window setFocusPolicy( Qt::StrongFocus ); From 1faaa932ccdc4eab02fd2040aaa115e1962fedca Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Tue, 22 Jul 2014 12:30:38 -0400 Subject: [PATCH 2/6] Formatting fixes --- src/gui/PianoRoll.cpp | 134 ++++++++++++++++++++---------------------- 1 file changed, 63 insertions(+), 71 deletions(-) diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 32c0b90a3..5afe8d826 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -619,78 +619,70 @@ PianoRoll::PianoRoll() : tb_layout->addWidget( m_chordComboBox ); tb_layout->addStretch(); - /*new WITs starts here*/ + m_zoomingComboBox->setWhatsThis( tr( + "This controls the magnification over time. " + "It can be a help to choose a magnification for a specific task. " + "For ordinary editing, the magnification should be fitted to your " + "smallest used notes. " + "Most will use the default magnification of 100%, " + "when the shortest notes are 1/16. " + "If you have used shorter notes, your editing will be easier, " + "with a magnification of 200%, or more. " + "You should use low magnification, if you need to move a block " + "of notes many bars, or just to get an overview of the score." + ) ); - m_zoomingComboBox->setWhatsThis( - tr( - "This controls the magnification over time." - "It can be a help to choose a magnification for a specific task." - "For ordinary editing, the magnification should be fitted to your" - "smallest used notes." - "Most will use the default magnification of 100%," - "when the shortest notes are 1/16." - "If you have used shorter notes, your editing will be easier," - "with a magnification of 200%, or more." - "You should use low magnification, if you need to move a block" - "of notes many bars, or just to get an overview of the score." - ) ); - - m_quantizeComboBox->setWhatsThis( - tr( - "This 'Q' stands for quantification, and controls the minimum spacing" - "between notes." - "In piano-roll this is very important, when you make syncopated patterns," - "and an absolute must, for swing-notes!" - "Observe that the score segmentation also changes, depending on the selected Q." - "You should not use a Q-value that does not fit your chosen time-signature!" - "The default value is 1/16, and that fits the default 4/4 timing." - "A Q of 1/16 will also work well in most editing." - ) ); - - m_noteLenComboBox->setWhatsThis( - tr( - "This let you select the note you place in the score." - "In most circumstances the best choice is 'Last Note'" - "The choice 'Last Note' mean that LMMS will use the note you last clicked," - "when you place the next note." - "But you can choose any note-length from this drop-down," - "and your choice will be the note, that you can draw in the score." - ) ); - - m_scaleComboBox->setWhatsThis( - tr( - "This let you select a music scale that LMMS then will annotate." - "The feature is directly connected to the context-menu" - "on the virtual keyboard, to the left." - "First you chose which scale you will use." - "You do that in this very dropdown!" - "Then you choose the key of your composition." - "Right mouse click on the selected key in the virtual keyboard," - "and then choose 'Mark current Scale'" - "LMMS will annotate all notes that belongs to the chosen scale," - "and in the key you have selected!" - "LMMS will not only annotate in the score you have open," - "but all scores in your project, will be correctly annotated." - "This will help you avoid using bum-notes, as you compose." - "You should know about principle scales in music." - "Search the net, if you do not!" - ) ); - - m_chordComboBox->setWhatsThis( - tr( - "This let you select a standard music chord." - "All notes that are played simultaneous, are 'chords'," - "but a large number of simultaneous key combinations, has own names," - "and its own place in music." - "They are standard chords, and it is these chords," - "you can find in this drop-down." - "After you have selected a chord, any click in the score," - "will place that chord, musically correctly," - "and with the Left mouse clicked note, as the root-note in the chord!" - "To return to single note placement, you need to choose 'No chord'" - "in this drop-down!" - ) ); - /**\newWITs for piano roll ends here */ + m_quantizeComboBox->setWhatsThis( tr( + "This 'Q' stands for quantification, and controls the minimum spacing " + "between notes. " + "In piano-roll this is very important, when you make syncopated patterns, " + "and an absolute must, for swing-notes! " + "Observe that the score segmentation also changes, depending on the selected Q. " + "You should not use a Q-value that does not fit your chosen time-signature! " + "The default value is 1/16, and that fits the default 4/4 timing. " + "A Q of 1/16 will also work well in most editing." + ) ); + + m_noteLenComboBox->setWhatsThis( tr( + "This let you select the note you place in the score. " + "In most circumstances the best choice is 'Last Note'." + "The choice 'Last Note' means that LMMS will use the note you last clicked, " + "when you place the next note. " + "But you can choose any note-length from this drop-down, " + "and your choice will be the note, that you can draw in the score." + ) ); + + m_scaleComboBox->setWhatsThis( tr( + "This let you select a music scale that LMMS then will annotate. " + "The feature is directly connected to the context-menu " + "on the virtual keyboard, to the left. " + "First you chose which scale you will use. " + "You do that in this very dropdown! " + "Then you choose the key of your composition. " + "Right mouse click on the selected key in the virtual keyboard, " + "and then choose 'Mark current Scale' " + "LMMS will annotate all notes that belongs to the chosen scale, " + "and in the key you have selected! " + "LMMS will not only annotate in the score you have open, " + "but all scores in your project, will be correctly annotated. " + "This will help you avoid using bum-notes, as you compose. " + "You should know about principle scales in music. " + "Search the net, if you do not! " + ) ); + + m_chordComboBox->setWhatsThis( tr( + "This let you select a standard music chord. " + "All notes that are played simultaneous, are 'chords'," + "but a large number of simultaneous key combinations, has own names, " + "and its own place in music. " + "They are standard chords, and it is these chords, " + "you can find in this drop-down. " + "After you have selected a chord, any click in the score, " + "will place that chord, musically correctly, " + "and with the Left mouse clicked note, as the root-note in the chord! " + "To return to single note placement, you need to choose 'No chord' " + "in this drop-down!" + ) ); // setup our actual window setFocusPolicy( Qt::StrongFocus ); From 46c92ef27fadec3180f35627839c3192a7c95950 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Tue, 22 Jul 2014 12:37:26 -0400 Subject: [PATCH 3/6] Update PianoRoll.cpp --- src/gui/PianoRoll.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 5afe8d826..bb2b3d9cf 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -621,7 +621,7 @@ PianoRoll::PianoRoll() : m_zoomingComboBox->setWhatsThis( tr( "This controls the magnification over time. " - "It can be a help to choose a magnification for a specific task. " + "It can be useful choose a magnification for a specific task. " "For ordinary editing, the magnification should be fitted to your " "smallest used notes. " "Most will use the default magnification of 100%, " @@ -644,7 +644,7 @@ PianoRoll::PianoRoll() : ) ); m_noteLenComboBox->setWhatsThis( tr( - "This let you select the note you place in the score. " + "This lets you select the note you place in the score. " "In most circumstances the best choice is 'Last Note'." "The choice 'Last Note' means that LMMS will use the note you last clicked, " "when you place the next note. " @@ -653,7 +653,7 @@ PianoRoll::PianoRoll() : ) ); m_scaleComboBox->setWhatsThis( tr( - "This let you select a music scale that LMMS then will annotate. " + "This lets you select a music scale that LMMS then will annotate. " "The feature is directly connected to the context-menu " "on the virtual keyboard, to the left. " "First you chose which scale you will use. " @@ -671,7 +671,7 @@ PianoRoll::PianoRoll() : ) ); m_chordComboBox->setWhatsThis( tr( - "This let you select a standard music chord. " + "This lets you select a standard music chord. " "All notes that are played simultaneous, are 'chords'," "but a large number of simultaneous key combinations, has own names, " "and its own place in music. " From c002af57ec144ebc111693ba6b85a6f7dfa3a6bb Mon Sep 17 00:00:00 2001 From: Lukas W Date: Fri, 29 Aug 2014 18:22:09 +0200 Subject: [PATCH 4/6] FileDialog: Add `/Volume` directory on OS X See issue #1058 --- src/gui/dialogs/FileDialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/dialogs/FileDialog.cpp b/src/gui/dialogs/FileDialog.cpp index ad77018cc..fda7ac87b 100644 --- a/src/gui/dialogs/FileDialog.cpp +++ b/src/gui/dialogs/FileDialog.cpp @@ -52,6 +52,12 @@ FileDialog::FileDialog( QWidget *parent, const QString &caption, urls << QUrl::fromLocalFile( QDesktopServices::storageLocation( QDesktopServices::MusicLocation ) ); urls << QUrl::fromLocalFile( configManager::inst()->workingDir() ); + #ifdef LMMS_BUILD_APPLE + QDir volumesDir( QDir("/Volumes") ); + if ( volumesDir.exists() ) + urls << volumesDir; + #endif + setSidebarUrls(urls); } From fad89f68ce39961040f03ba50fd89b173a5062db Mon Sep 17 00:00:00 2001 From: Lukas W Date: Fri, 29 Aug 2014 23:03:18 +0200 Subject: [PATCH 5/6] FileDialog: Add OS X Volume directory fix --- src/gui/dialogs/FileDialog.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui/dialogs/FileDialog.cpp b/src/gui/dialogs/FileDialog.cpp index fda7ac87b..a00b41f3c 100644 --- a/src/gui/dialogs/FileDialog.cpp +++ b/src/gui/dialogs/FileDialog.cpp @@ -52,11 +52,13 @@ FileDialog::FileDialog( QWidget *parent, const QString &caption, urls << QUrl::fromLocalFile( QDesktopServices::storageLocation( QDesktopServices::MusicLocation ) ); urls << QUrl::fromLocalFile( configManager::inst()->workingDir() ); - #ifdef LMMS_BUILD_APPLE - QDir volumesDir( QDir("/Volumes") ); - if ( volumesDir.exists() ) - urls << volumesDir; - #endif + // Add `/Volumes` directory on OS X systems, this allows the user to browse + // external disk drives. +#ifdef LMMS_BUILD_APPLE + QDir volumesDir( QDir("/Volumes") ); + if ( volumesDir.exists() ) + urls << QUrl::fromLocalFile( volumesDir.absolutePath() ); +#endif setSidebarUrls(urls); } From 2f42462ee325588022fa7c642805cb4b8f239d82 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 30 Aug 2014 00:06:24 +0200 Subject: [PATCH 6/6] ConfigMgr: skip message boxes when in non-GUI mode When rendering on command line do not display message boxes as LMMS crashes otherwise. Closes #1059. --- src/core/config_mgr.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/core/config_mgr.cpp b/src/core/config_mgr.cpp index e25bba5ab..383dafbf1 100644 --- a/src/core/config_mgr.cpp +++ b/src/core/config_mgr.cpp @@ -1,7 +1,7 @@ /* * config_mgr.cpp - implementation of class configManager * - * Copyright (c) 2005-2011 Tobias Doerffel + * Copyright (c) 2005-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -314,7 +314,7 @@ void configManager::loadConfigFile() #endif setBackgroundArtwork( value( "paths", "backgroundartwork" ) ); } - else + else if( QApplication::type() == QApplication::GuiClient ) { QMessageBox::warning( NULL, MainWindow::tr( "Configuration file" ), MainWindow::tr( "Error while parsing configuration file at line %1:%2: %3" ). @@ -372,19 +372,18 @@ void configManager::loadConfigFile() QDir::setSearchPaths( "resources", QStringList() << artworkDir() << defaultArtworkDir() ); - if( !QDir( m_workingDir ).exists() ) - { - if( QMessageBox::question( 0, + if( !QDir( m_workingDir ).exists() && + QApplication::type() == QApplication::GuiClient && + QMessageBox::question( 0, MainWindow::tr( "Working directory" ), MainWindow::tr( "The LMMS working directory %1 does not " "exist. Create it now? You can change the directory " "later via Edit -> Settings." ).arg( m_workingDir ), - QMessageBox::Yes, QMessageBox::No ) == - QMessageBox::Yes ) - { - QDir().mkpath( m_workingDir ); - } + QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) + { + QDir().mkpath( m_workingDir ); } + if( QDir( m_workingDir ).exists() ) { QDir().mkpath( userProjectsDir() );