aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/kdenotify
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-10-31 10:18:54 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-10-31 10:18:54 +0000
commit3fa2bfef4093a9698edb49439fdfbb8d6f7cb451 (patch)
treedd28f90e6463678f38b0dc28b30bc967ddefea66 /src/plugins/General/kdenotify
parent9d2a0ffe435d0e871e82d7291f4844d1a7fe2efb (diff)
downloadqmmp-3fa2bfef4093a9698edb49439fdfbb8d6f7cb451.tar.gz
qmmp-3fa2bfef4093a9698edb49439fdfbb8d6f7cb451.tar.bz2
qmmp-3fa2bfef4093a9698edb49439fdfbb8d6f7cb451.zip
fixed kde notifications
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1342 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/kdenotify')
-rw-r--r--src/plugins/General/kdenotify/kdenotify.cpp36
-rw-r--r--src/plugins/General/kdenotify/kdenotify.h20
-rw-r--r--src/plugins/General/kdenotify/kdenotify.pro10
-rw-r--r--src/plugins/General/kdenotify/kdenotifyfactory.cpp20
-rw-r--r--src/plugins/General/kdenotify/kdenotifyfactory.h20
-rw-r--r--src/plugins/General/kdenotify/settingsdialog.cpp20
-rw-r--r--src/plugins/General/kdenotify/settingsdialog.h20
7 files changed, 128 insertions, 18 deletions
diff --git a/src/plugins/General/kdenotify/kdenotify.cpp b/src/plugins/General/kdenotify/kdenotify.cpp
index 0b77c11f1..2dafa5df1 100644
--- a/src/plugins/General/kdenotify/kdenotify.cpp
+++ b/src/plugins/General/kdenotify/kdenotify.cpp
@@ -1,6 +1,23 @@
-#include "kdenotify.h"
-#include <qmmp/soundcore.h>
-#include <qmmp/metadatamanager.h>
+/***************************************************************************
+ * Copyright (C) 2009 by Artur Guzik *
+ * a.guzik88@gmail.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
#include <QDBusConnection>
#include <QDBusConnectionInterface>
#include <QDBusInterface>
@@ -10,21 +27,24 @@
#include <QFileInfo>
#include <QDir>
#include <QSettings>
+#include <qmmp/soundcore.h>
+#include <qmmp/metadatamanager.h>
+#include "kdenotify.h"
KdeNotify::KdeNotify(QObject *parent) : General(parent)
{
- if (!QDBusConnection::sessionBus ().interface ()->isServiceRegistered ("org.kde.VisualNotifications"))
+ notifier = new QDBusInterface("org.kde.VisualNotifications",
+ "/VisualNotifications", "org.kde.VisualNotifications");
+ if(notifier->isValid())
{
- qWarning("KdeNotify: org.kde.VisualNotifications is not registered");
+ qWarning("KdeNotify: unable to create dbus interface");
return;
}
- notifier = new QDBusInterface("org.kde.VisualNotifications",
- "/VisualNotifications", "org.kde.VisualNotifications");
QSettings settings(Qmmp::configFile(),QSettings::IniFormat);
settings.beginGroup("Kde_Notifier");
m_NotifyDelay = settings.value("notify_delay",10000).toInt();
settings.endGroup();
- connect(SoundCore::instance(),SIGNAL(metaDataChanged()),this,SLOT(showMetaData()));
+ connect(SoundCore::instance(),SIGNAL(metaDataChanged()), SLOT(showMetaData()));
}
KdeNotify::~KdeNotify()
diff --git a/src/plugins/General/kdenotify/kdenotify.h b/src/plugins/General/kdenotify/kdenotify.h
index 61309614c..1d2466d9f 100644
--- a/src/plugins/General/kdenotify/kdenotify.h
+++ b/src/plugins/General/kdenotify/kdenotify.h
@@ -1,3 +1,23 @@
+/***************************************************************************
+ * Copyright (C) 2009 by Artur Guzik *
+ * a.guzik88@gmail.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
#ifndef KDENOTIFY_H
#define KDENOTIFY_H
diff --git a/src/plugins/General/kdenotify/kdenotify.pro b/src/plugins/General/kdenotify/kdenotify.pro
index f5f393090..d9f8838fc 100644
--- a/src/plugins/General/kdenotify/kdenotify.pro
+++ b/src/plugins/General/kdenotify/kdenotify.pro
@@ -26,15 +26,5 @@ SOURCES += kdenotifyfactory.cpp \
HEADERS += kdenotifyfactory.h \
kdenotify.h \
settingsdialog.h
-TRANSLATIONS = translations/kdenotify_plugin_cs.ts \
- translations/kdenotify_plugin_de.ts \
- translations/kdenotify_plugin_zh_CN.ts \
- translations/kdenotify_plugin_zh_TW.ts \
- translations/kdenotify_plugin_ru.ts \
- translations/kdenotify_plugin_pl.ts \
- translations/kdenotify_plugin_uk_UA.ts \
- translations/kdenotify_plugin_it.ts \
- translations/kdenotify_plugin_tr.ts \
- translations/kdenotify_plugin_lt.ts
RESOURCES += translations/translations.qrc
FORMS += settingsdialog.ui
diff --git a/src/plugins/General/kdenotify/kdenotifyfactory.cpp b/src/plugins/General/kdenotify/kdenotifyfactory.cpp
index 2fdd9f75b..967b92305 100644
--- a/src/plugins/General/kdenotify/kdenotifyfactory.cpp
+++ b/src/plugins/General/kdenotify/kdenotifyfactory.cpp
@@ -1,3 +1,23 @@
+/***************************************************************************
+ * Copyright (C) 2009 by Artur Guzik *
+ * a.guzik88@gmail.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
#include "kdenotifyfactory.h"
#include "kdenotify.h"
#include "settingsdialog.h"
diff --git a/src/plugins/General/kdenotify/kdenotifyfactory.h b/src/plugins/General/kdenotify/kdenotifyfactory.h
index 075f9b5f4..b9d5634eb 100644
--- a/src/plugins/General/kdenotify/kdenotifyfactory.h
+++ b/src/plugins/General/kdenotify/kdenotifyfactory.h
@@ -1,3 +1,23 @@
+/***************************************************************************
+ * Copyright (C) 2009 by Artur Guzik *
+ * a.guzik88@gmail.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
#ifndef KDENOTIFYFACTORY_H
#define KDENOTIFYFACTORY_H
diff --git a/src/plugins/General/kdenotify/settingsdialog.cpp b/src/plugins/General/kdenotify/settingsdialog.cpp
index b4aeae018..00f029871 100644
--- a/src/plugins/General/kdenotify/settingsdialog.cpp
+++ b/src/plugins/General/kdenotify/settingsdialog.cpp
@@ -1,3 +1,23 @@
+/***************************************************************************
+ * Copyright (C) 2009 by Artur Guzik *
+ * a.guzik88@gmail.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
#include "settingsdialog.h"
#include "ui_settingsdialog.h"
#include <qmmp/qmmp.h>
diff --git a/src/plugins/General/kdenotify/settingsdialog.h b/src/plugins/General/kdenotify/settingsdialog.h
index 500167612..07e7669cd 100644
--- a/src/plugins/General/kdenotify/settingsdialog.h
+++ b/src/plugins/General/kdenotify/settingsdialog.h
@@ -1,3 +1,23 @@
+/***************************************************************************
+ * Copyright (C) 2009 by Artur Guzik *
+ * a.guzik88@gmail.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H