aboutsummaryrefslogtreecommitdiff
path: root/src/app/qmmpstarter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/qmmpstarter.cpp')
-rw-r--r--src/app/qmmpstarter.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/app/qmmpstarter.cpp b/src/app/qmmpstarter.cpp
index c2d038f6e..cbabb8a28 100644
--- a/src/app/qmmpstarter.cpp
+++ b/src/app/qmmpstarter.cpp
@@ -38,7 +38,6 @@
#include <qmmpui/uiloader.h>
#include <qmmpui/qmmpuisettings.h>
#include "qmmpstarter.h"
-#include "lxdesupport.h"
#include "builtincommandlineoption.h"
#ifdef Q_OS_WIN
@@ -48,8 +47,6 @@
#include <sys/stat.h>
#endif
-
-
#ifdef Q_OS_WIN
#define UDS_PATH QString("qmmp")
#else
@@ -65,6 +62,9 @@ QMMPStarter::QMMPStarter() : QObject()
m_ui = 0;
m_finished = false;
m_exit_code = EXIT_SUCCESS;
+#ifndef QT_NO_SESSIONMANAGER
+ connect(qApp, SIGNAL(commitDataRequest(QSessionManager&)), SLOT(commitData(QSessionManager&)), Qt::DirectConnection);
+#endif
#ifdef Q_OS_WIN
m_named_mutex = 0;
#endif
@@ -227,9 +227,6 @@ void QMMPStarter::startPlayer()
theme_paths << share_path + "/icons";
theme_paths.removeDuplicates();
QIcon::setThemeSearchPaths(theme_paths);
-
- //load lxde icons
- LXDESupport::load();
#endif
//prepare libqmmp and libqmmpui libraries for usage
@@ -275,6 +272,15 @@ void QMMPStarter::savePosition()
m_core->stop();
}
+void QMMPStarter::commitData(QSessionManager &manager)
+{
+ if(UiHelper::instance())
+ UiHelper::instance()->exit();
+#ifndef QT_NO_SESSIONMANAGER
+ manager.release();
+#endif
+}
+
void QMMPStarter::writeCommand()
{
QString workingDir = QDir::currentPath() + "|||";