diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-01-09 12:01:22 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-01-09 12:01:22 +0000 |
| commit | ebd7f9bc697973366de8a6bf7265051e825e0680 (patch) | |
| tree | 1feb9df1c5fe3493e9aa1dd8f5d6233a38ae9d3c /src/plugins/General/mpris | |
| parent | bc7ad688c646afd2a89e5c5ff58696f2df2c8605 (diff) | |
| download | qmmp-ebd7f9bc697973366de8a6bf7265051e825e0680.tar.gz qmmp-ebd7f9bc697973366de8a6bf7265051e825e0680.tar.bz2 qmmp-ebd7f9bc697973366de8a6bf7265051e825e0680.zip | |
renaming experimental branch
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4675 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/mpris')
| -rw-r--r-- | src/plugins/General/mpris/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | src/plugins/General/mpris/mpris.pro | 15 | ||||
| -rw-r--r-- | src/plugins/General/mpris/mpris1/tracklistobject.cpp | 13 | ||||
| -rw-r--r-- | src/plugins/General/mpris/mpris1/tracklistobject.h | 4 | ||||
| -rw-r--r-- | src/plugins/General/mpris/mpris2/player2object.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/General/mpris/mpris2/player2object.h | 2 |
6 files changed, 13 insertions, 39 deletions
diff --git a/src/plugins/General/mpris/CMakeLists.txt b/src/plugins/General/mpris/CMakeLists.txt index c9327ca6d..ec0bad8de 100644 --- a/src/plugins/General/mpris/CMakeLists.txt +++ b/src/plugins/General/mpris/CMakeLists.txt @@ -39,22 +39,10 @@ SET(libmpris_SRCS mpris2/player2object.cpp ) -SET(libmpris_MOC_HDRS - mprisfactory.h - mpris.h - mpris1/rootobject.h - mpris1/playerobject.h - mpris1/tracklistobject.h - mpris2/root2object.h - mpris2/player2object.h -) - SET(libmpris_RCCS translations/translations.qrc) QT4_ADD_RESOURCES(libmpris_RCC_SRCS ${libmpris_RCCS}) -QT4_WRAP_CPP(libmpris_MOC_SRCS ${libmpris_MOC_HDRS}) - # user interface @@ -63,7 +51,7 @@ QT4_WRAP_CPP(libmpris_MOC_SRCS ${libmpris_MOC_HDRS}) # the UI file won't be wrapped! include_directories(${CMAKE_CURRENT_BINARY_DIR}) -ADD_LIBRARY(mpris MODULE ${libmpris_SRCS} ${libmpris_MOC_SRCS} ${libmpris_RCC_SRCS}) +ADD_LIBRARY(mpris MODULE ${libmpris_SRCS} ${libmpris_RCC_SRCS}) add_dependencies(mpris qmmpui) target_link_libraries(mpris ${QT_LIBRARIES} -lqmmpui -lqmmp) install(TARGETS mpris DESTINATION ${LIB_DIR}/qmmp/General) diff --git a/src/plugins/General/mpris/mpris.pro b/src/plugins/General/mpris/mpris.pro index 820f7c516..096bce200 100644 --- a/src/plugins/General/mpris/mpris.pro +++ b/src/plugins/General/mpris/mpris.pro @@ -11,21 +11,6 @@ QMAKE_CLEAN =$$PLUGINS_PREFIX/General/libmpris.so TEMPLATE = lib QMAKE_LIBDIR += ../../../../lib -TRANSLATIONS = translations/mpris_plugin_cs.ts \ - translations/mpris_plugin_de.ts \ - translations/mpris_plugin_zh_CN.ts \ - translations/mpris_plugin_zh_TW.ts \ - translations/mpris_plugin_ru.ts \ - translations/mpris_plugin_pl.ts \ - translations/mpris_plugin_uk_UA.ts \ - translations/mpris_plugin_it.ts \ - translations/mpris_plugin_tr.ts \ - translations/mpris_plugin_lt.ts \ - translations/mpris_plugin_nl.ts \ - translations/mpris_plugin_ja.ts \ - translations/mpris_plugin_es.ts \ - translations/mpris_plugin_sr_BA.ts \ - translations/mpris_plugin_sr_RS.ts RESOURCES = translations/translations.qrc isEmpty(LIB_DIR){ diff --git a/src/plugins/General/mpris/mpris1/tracklistobject.cpp b/src/plugins/General/mpris/mpris1/tracklistobject.cpp index 2cef4a8c7..a7dd70aa9 100644 --- a/src/plugins/General/mpris/mpris1/tracklistobject.cpp +++ b/src/plugins/General/mpris/mpris1/tracklistobject.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -33,7 +33,7 @@ TrackListObject::TrackListObject(QObject *parent) : QObject(parent) m_ui_settings = QmmpUiSettings::instance(); m_pl_manager = m_player->playListManager(); m_model = m_pl_manager->currentPlayList(); - connect (m_model, SIGNAL(listChanged()), SLOT(updateTrackList())); + connect (m_model, SIGNAL(listChanged(int)), SLOT(updateTrackList(int))); connect (m_pl_manager, SIGNAL(currentPlayListChanged(PlayListModel*,PlayListModel*)), SLOT(switchPlayList(PlayListModel*,PlayListModel*))); m_prev_count = 0; @@ -119,16 +119,17 @@ void TrackListObject::playTrack(PlayListTrack *track) disconnect(m_model,SIGNAL(trackAdded(PlayListTrack*)), this, SLOT(playTrack(PlayListTrack*))); } -void TrackListObject::updateTrackList() +void TrackListObject::updateTrackList(int flags) { - emit TrackListChange(m_model->numberOfTrack(m_model->count() - 1) + 1); + if(flags & PlayListModel::STRUCTURE) + emit TrackListChange(m_model->numberOfTrack(m_model->count() - 1) + 1); } void TrackListObject::switchPlayList(PlayListModel *cur, PlayListModel *prev) { m_model = cur; - connect (m_model, SIGNAL(listChanged()), SLOT(updateTrackList())); + connect (m_model, SIGNAL(listChanged(int)), SLOT(updateTrackList(int))); if(prev) disconnect(prev,0,this,0); - updateTrackList(); + updateTrackList(PlayListModel::STRUCTURE); } diff --git a/src/plugins/General/mpris/mpris1/tracklistobject.h b/src/plugins/General/mpris/mpris1/tracklistobject.h index c5eca61d4..47c7148fb 100644 --- a/src/plugins/General/mpris/mpris1/tracklistobject.h +++ b/src/plugins/General/mpris/mpris1/tracklistobject.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -57,7 +57,7 @@ signals: private slots: void playTrack(PlayListTrack *track); - void updateTrackList(); + void updateTrackList(int flags); void switchPlayList(PlayListModel *cur, PlayListModel *prev); private: diff --git a/src/plugins/General/mpris/mpris2/player2object.cpp b/src/plugins/General/mpris/mpris2/player2object.cpp index 9bf7e539e..3168c6c53 100644 --- a/src/plugins/General/mpris/mpris2/player2object.cpp +++ b/src/plugins/General/mpris/mpris2/player2object.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010-2013 by Ilya Kotov * + * Copyright (C) 2010-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -369,7 +369,7 @@ void Player2Object::setModel(PlayListModel *selected, PlayListModel *previous) { if(previous) disconnect(previous, 0, this, 0); //disconnect previous model - connect(selected, SIGNAL(listChanged()), SLOT(emitPropertiesChanged())); + connect(selected, SIGNAL(listChanged(int)), SLOT(emitPropertiesChanged())); } void Player2Object::syncProperties() diff --git a/src/plugins/General/mpris/mpris2/player2object.h b/src/plugins/General/mpris/mpris2/player2object.h index f66b55664..e51489e16 100644 --- a/src/plugins/General/mpris/mpris2/player2object.h +++ b/src/plugins/General/mpris/mpris2/player2object.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010-2013 by Ilya Kotov * + * Copyright (C) 2010-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * |
