Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -65,12 +65,16 @@ ENDIF()
|
||||
ADD_DEFINITIONS("-std=c++0x")
|
||||
|
||||
ADD_EXECUTABLE(lmms
|
||||
core/main.cpp
|
||||
${LMMS_SRCS}
|
||||
${LMMS_INCLUDES}
|
||||
${LMMS_UI_OUT}
|
||||
${LMMS_ER_H}
|
||||
"${WINRC}"
|
||||
)
|
||||
SET_TARGET_PROPERTIES(lmms PROPERTIES
|
||||
ENABLE_EXPORTS ON
|
||||
)
|
||||
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${LMMS_ER_H} ${LMMS_UI_OUT} lmmsconfig.h lmms.1.gz")
|
||||
|
||||
@@ -110,8 +114,12 @@ FOREACH(_ts_file ${lmms_LOCALES})
|
||||
STRING(REPLACE "${CMAKE_SOURCE_DIR}/data/locale/" "" _ts_target "${_ts_file}")
|
||||
STRING(REPLACE ".ts" ".qm" _qm_file "${_ts_file}")
|
||||
STRING(REPLACE ".ts" ".qm" _qm_target "${_ts_target}")
|
||||
ADD_CUSTOM_TARGET(${_ts_target} COMMAND "${QT_LUPDATE_EXECUTABLE}" -locations none -no-obsolete -I ${CMAKE_SOURCE_DIR}/include/ ${LMMS_SRCS} ${LMMS_INCLUDES} ${LMMS_UIS} `find "\"${CMAKE_SOURCE_DIR}/plugins/\"" -type f -name '*.cpp' -or -name '*.h'` -ts "\"${_ts_file}\"")
|
||||
ADD_CUSTOM_TARGET(${_qm_target} COMMAND "${QT_LRELEASE_EXECUTABLE}" "\"${_ts_file}\"" -qm "\"${_qm_file}\"")
|
||||
ADD_CUSTOM_TARGET(${_ts_target}
|
||||
COMMAND "${QT_LUPDATE_EXECUTABLE}" -locations none -no-obsolete -I ${CMAKE_SOURCE_DIR}/include/ ${LMMS_SRCS} ${LMMS_INCLUDES} ${LMMS_UIS} `find "\"${CMAKE_SOURCE_DIR}/plugins/\"" -type f -name '*.cpp' -or -name '*.h'` -ts "\"${_ts_file}\""
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
ADD_CUSTOM_TARGET(${_qm_target}
|
||||
COMMAND "${QT_LRELEASE_EXECUTABLE}" "\"${_ts_file}\"" -qm "\"${_qm_file}\""
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
LIST(APPEND ts_targets "${_ts_target}")
|
||||
LIST(APPEND qm_targets "${_qm_target}")
|
||||
ENDFOREACH(_ts_file ${lmms_LOCALES})
|
||||
@@ -130,7 +138,7 @@ ENDFOREACH(_item ${qm_targets})
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
SET_TARGET_PROPERTIES(lmms PROPERTIES
|
||||
LINK_FLAGS "${LINK_FLAGS} -mwindows"
|
||||
ENABLE_EXPORTS ON)
|
||||
)
|
||||
ADD_CUSTOM_COMMAND(TARGET lmms POST_BUILD COMMAND "${STRIP}" "$<TARGET_FILE:lmms>")
|
||||
|
||||
INSTALL(TARGETS lmms RUNTIME DESTINATION "${BIN_DIR}")
|
||||
|
||||
@@ -30,7 +30,6 @@ set(LMMS_SRCS
|
||||
core/LadspaControl.cpp
|
||||
core/LadspaManager.cpp
|
||||
core/LfoController.cpp
|
||||
core/main.cpp
|
||||
core/MemoryHelper.cpp
|
||||
core/MemoryManager.cpp
|
||||
core/MeterModel.cpp
|
||||
|
||||
@@ -759,15 +759,16 @@ void Song::clearProject()
|
||||
|
||||
|
||||
Engine::mixer()->lock();
|
||||
if( gui->getBBEditor() )
|
||||
|
||||
if( gui && gui->getBBEditor() )
|
||||
{
|
||||
gui->getBBEditor()->trackContainerView()->clearAllTracks();
|
||||
}
|
||||
if( gui->songEditor() )
|
||||
if( gui && gui->songEditor() )
|
||||
{
|
||||
gui->songEditor()->m_editor->clearAllTracks();
|
||||
}
|
||||
if( gui->fxMixerView() )
|
||||
if( gui && gui->fxMixerView() )
|
||||
{
|
||||
gui->fxMixerView()->clear();
|
||||
}
|
||||
@@ -777,12 +778,12 @@ void Song::clearProject()
|
||||
|
||||
Engine::fxMixer()->clear();
|
||||
|
||||
if( gui->automationEditor() )
|
||||
if( gui && gui->automationEditor() )
|
||||
{
|
||||
gui->automationEditor()->setCurrentPattern( NULL );
|
||||
}
|
||||
|
||||
if( gui->pianoRoll() )
|
||||
if( gui && gui->pianoRoll() )
|
||||
{
|
||||
gui->pianoRoll()->reset();
|
||||
}
|
||||
@@ -800,7 +801,7 @@ void Song::clearProject()
|
||||
|
||||
Engine::mixer()->unlock();
|
||||
|
||||
if( gui->getProjectNotes() )
|
||||
if( gui && gui->getProjectNotes() )
|
||||
{
|
||||
gui->getProjectNotes()->clear();
|
||||
}
|
||||
@@ -1044,7 +1045,7 @@ void Song::loadProject( const QString & _file_name )
|
||||
m_loadingProject = false;
|
||||
m_modified = false;
|
||||
|
||||
if( gui->mainWindow() )
|
||||
if( gui && gui->mainWindow() )
|
||||
{
|
||||
gui->mainWindow()->resetWindowTitle();
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ void MainWindow::finalize()
|
||||
|
||||
// project-popup-menu
|
||||
QMenu * project_menu = new QMenu( this );
|
||||
menuBar()->addMenu( project_menu )->setText( tr( "&Project" ) );
|
||||
menuBar()->addMenu( project_menu )->setText( tr( "&File" ) );
|
||||
project_menu->addAction( embed::getIconPixmap( "project_new" ),
|
||||
tr( "&New" ),
|
||||
this, SLOT( createNewProject() ),
|
||||
@@ -254,15 +254,14 @@ void MainWindow::finalize()
|
||||
tr( "&Save" ),
|
||||
this, SLOT( saveProject() ),
|
||||
Qt::CTRL + Qt::Key_S );
|
||||
|
||||
project_menu->addAction( embed::getIconPixmap( "project_save" ),
|
||||
tr( "Save as New &Version" ),
|
||||
this, SLOT( saveProjectAsNewVersion() ),
|
||||
Qt::CTRL + Qt::ALT + Qt::Key_S );
|
||||
project_menu->addAction( embed::getIconPixmap( "project_saveas" ),
|
||||
tr( "Save &As..." ),
|
||||
this, SLOT( saveProjectAs() ),
|
||||
Qt::CTRL + Qt::SHIFT + Qt::Key_S );
|
||||
project_menu->addAction( embed::getIconPixmap( "project_save" ),
|
||||
tr( "Save as New &Version" ),
|
||||
this, SLOT( saveProjectAsNewVersion() ),
|
||||
Qt::CTRL + Qt::ALT + Qt::Key_S );
|
||||
project_menu->addSeparator();
|
||||
project_menu->addAction( embed::getIconPixmap( "project_import" ),
|
||||
tr( "Import..." ),
|
||||
|
||||
@@ -50,6 +50,11 @@ BBEditor::BBEditor( BBTrackContainer* tc ) :
|
||||
setWindowTitle( tr( "Beat+Bassline Editor" ) );
|
||||
setCentralWidget(m_trackContainerView);
|
||||
|
||||
setAcceptDrops(true);
|
||||
m_toolBar->setAcceptDrops(true);
|
||||
connect(m_toolBar, SIGNAL(dragEntered(QDragEnterEvent*)), m_trackContainerView, SLOT(dragEnterEvent(QDragEnterEvent*)));
|
||||
connect(m_toolBar, SIGNAL(dropped(QDropEvent*)), m_trackContainerView, SLOT(dropEvent(QDropEvent*)));
|
||||
|
||||
// TODO: Use style sheet
|
||||
if( ConfigManager::inst()->value( "ui",
|
||||
"compacttrackbuttons" ).toInt() )
|
||||
|
||||
@@ -51,7 +51,7 @@ void Editor::togglePlayStop()
|
||||
}
|
||||
|
||||
Editor::Editor(bool record) :
|
||||
m_toolBar(new QToolBar(this)),
|
||||
m_toolBar(new DropToolBar(this)),
|
||||
m_playAction(nullptr),
|
||||
m_recordAction(nullptr),
|
||||
m_recordAccompanyAction(nullptr),
|
||||
@@ -96,3 +96,21 @@ Editor::~Editor()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DropToolBar::DropToolBar(QWidget* parent) : QToolBar(parent)
|
||||
{
|
||||
setAcceptDrops(true);
|
||||
}
|
||||
|
||||
void DropToolBar::dragEnterEvent(QDragEnterEvent* event)
|
||||
{
|
||||
dragEntered(event);
|
||||
}
|
||||
|
||||
void DropToolBar::dropEvent(QDropEvent* event)
|
||||
{
|
||||
dropped(event);
|
||||
}
|
||||
|
||||
@@ -626,6 +626,10 @@ SongEditorWindow::SongEditorWindow(Song* song) :
|
||||
setWindowIcon( embed::getIconPixmap( "songeditor" ) );
|
||||
|
||||
setCentralWidget(m_editor);
|
||||
setAcceptDrops(true);
|
||||
m_toolBar->setAcceptDrops(true);
|
||||
connect(m_toolBar, SIGNAL(dragEntered(QDragEnterEvent*)), m_editor, SLOT(dragEnterEvent(QDragEnterEvent*)));
|
||||
connect(m_toolBar, SIGNAL(dropped(QDropEvent*)), m_editor, SLOT(dropEvent(QDropEvent*)));
|
||||
|
||||
// Set up buttons
|
||||
m_playAction->setToolTip(tr("Play song (Space)"));
|
||||
|
||||
@@ -585,7 +585,7 @@ void Pattern::updateBBTrack()
|
||||
Engine::getBBTrackContainer()->updateBBTrack( this );
|
||||
}
|
||||
|
||||
if( gui->pianoRoll() && gui->pianoRoll()->currentPattern() == this )
|
||||
if( gui && gui->pianoRoll() && gui->pianoRoll()->currentPattern() == this )
|
||||
{
|
||||
gui->pianoRoll()->update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user