aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.cpp4
-rw-r--r--src/plugins/General/hal/CMakeLists.txt11
-rw-r--r--src/plugins/General/hal/hal.pro28
-rw-r--r--src/plugins/General/hal/haldevice.cpp12
-rw-r--r--src/plugins/General/hal/haldevice.h5
-rw-r--r--src/plugins/General/hal/halfactory.cpp18
-rw-r--r--src/plugins/General/hal/halmanager.cpp2
-rw-r--r--src/plugins/General/hal/halplugin.cpp78
-rw-r--r--src/plugins/General/hal/halplugin.h8
-rw-r--r--src/plugins/General/hal/settingsdialog.cpp58
-rw-r--r--src/plugins/General/hal/settingsdialog.h46
-rw-r--r--src/plugins/General/hal/settingsdialog.ui121
-rw-r--r--src/plugins/General/hal/translations/hal_plugin_cs.ts87
-rw-r--r--src/plugins/General/hal/translations/hal_plugin_de.ts87
-rw-r--r--src/plugins/General/hal/translations/hal_plugin_ru.ts88
-rw-r--r--src/plugins/General/hal/translations/hal_plugin_uk_UA.ts87
-rw-r--r--src/plugins/General/hal/translations/hal_plugin_zh_CN.ts87
-rw-r--r--src/plugins/General/hal/translations/hal_plugin_zh_TW.ts87
-rw-r--r--src/plugins/General/hal/translations/translations.qrc11
19 files changed, 886 insertions, 39 deletions
diff --git a/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.cpp b/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.cpp
index e424c9387..a4abd6fc8 100644
--- a/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.cpp
+++ b/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.cpp
@@ -33,14 +33,14 @@
/**
- * This variable had been copied from Qt library
+ * This variable has been copied from Qt library
*/
const char *qt_file_dialog_filter_reg_exp =
"([a-zA-Z0-9 -]*)\\(([a-zA-Z0-9_.*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$";
/**
- * This function had been copied from Qt library
+ * This function has been copied from Qt library
*/
// Makes a list of filters from a normal filter string "Image Files (*.png *.jpg)"
diff --git a/src/plugins/General/hal/CMakeLists.txt b/src/plugins/General/hal/CMakeLists.txt
index 79c41aa83..0a0476ee6 100644
--- a/src/plugins/General/hal/CMakeLists.txt
+++ b/src/plugins/General/hal/CMakeLists.txt
@@ -32,6 +32,7 @@ SET(libhal_SRCS
halmanager.cpp
halplugin.cpp
haldevice.cpp
+ settingsdialog.cpp
)
SET(libhal_MOC_HDRS
@@ -39,9 +40,10 @@ SET(libhal_MOC_HDRS
halmanager.h
halplugin.h
haldevice.h
+ settingsdialog.h
)
-#SET(libhal_RCCS translations/translations.qrc)
+SET(libhal_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libhal_RCC_SRCS ${libhal_RCCS})
@@ -49,13 +51,16 @@ QT4_WRAP_CPP(libhal_MOC_SRCS ${libhal_MOC_HDRS})
# user interface
+SET(libhal_UIS
+ settingsdialog.ui
+)
-# QT4_WRAP_UI(libhal_UIS_H ${libhal_UIS})
+QT4_WRAP_UI(libhal_UIS_H ${libhal_UIS})
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(hal SHARED ${libhal_SRCS} ${libhal_MOC_SRCS} ${libhal_RCC_SRCS})
+ADD_LIBRARY(hal SHARED ${libhal_SRCS} ${libhal_MOC_SRCS} ${libhal_UIS_H} ${libhal_RCC_SRCS})
add_dependencies(hal qmmpui)
target_link_libraries(hal ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS hal DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/hal/hal.pro b/src/plugins/General/hal/hal.pro
index bb1df4fcf..b23431893 100644
--- a/src/plugins/General/hal/hal.pro
+++ b/src/plugins/General/hal/hal.pro
@@ -6,41 +6,41 @@ plugin \
lib \
qdbus
-TARGET =$$PLUGINS_PREFIX/General/hal
-QMAKE_CLEAN =$$PLUGINS_PREFIX/General/libhal.so
+TARGET = $$PLUGINS_PREFIX/General/hal
+QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libhal.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-#TRANSLATIONS = translations/hal_plugin_cs.ts
-# translations/hal_plugin_de.ts
-# translations/hal_plugin_zh_CN.ts
-# translations/hal_plugin_zh_TW.ts
-# translations/hal_plugin_ru.ts
-# translations/hal_plugin_uk_UA.ts
-#RESOURCES = translations/translations.qrc
+TRANSLATIONS = translations/hal_plugin_cs.ts \
+ translations/hal_plugin_de.ts \
+ translations/hal_plugin_zh_CN.ts \
+ translations/hal_plugin_zh_TW.ts \
+ translations/hal_plugin_ru.ts \
+ translations/hal_plugin_uk_UA.ts
+RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
LIB_DIR = /lib
}
target.path = $$LIB_DIR/qmmp/General
INSTALLS += target
-#FORMS += settingsdialog.ui
-
-#RESOURCES += images/images.qrc
HEADERS += halfactory.h \
halplugin.h \
halmanager.h \
- haldevice.h
+ haldevice.h \
+ settingsdialog.h
SOURCES += halfactory.cpp \
halplugin.cpp \
halmanager.cpp \
- haldevice.cpp
+ haldevice.cpp \
+ settingsdialog.cpp
INCLUDEPATH += ../../../../src
LIBS += -lqmmpui -lqmmp
+FORMS += settingsdialog.ui
diff --git a/src/plugins/General/hal/haldevice.cpp b/src/plugins/General/hal/haldevice.cpp
index 045bade80..fee8fc63f 100644
--- a/src/plugins/General/hal/haldevice.cpp
+++ b/src/plugins/General/hal/haldevice.cpp
@@ -2,6 +2,8 @@
* Copyright (C) 2009 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
+ * Copyright (C) 2006 by Kevin Ottens <ervin@kde.org> *
+ * *
* 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 *
@@ -18,8 +20,6 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-//TODO based on solid
-
#include <QDBusInterface>
#include <QDBusConnection>
@@ -29,6 +29,10 @@
Q_DECLARE_METATYPE(ChangeDescription);
Q_DECLARE_METATYPE(QList<ChangeDescription>);
+/**
+ * This function has been copied from Solid (KDE hardware library)
+ */
+
const QDBusArgument &operator<<(QDBusArgument &arg, const ChangeDescription &change)
{
arg.beginStructure();
@@ -37,6 +41,10 @@ const QDBusArgument &operator<<(QDBusArgument &arg, const ChangeDescription &cha
return arg;
}
+/**
+ * This function has been copied from Solid (KDE hardware library)
+ */
+
const QDBusArgument &operator>>(const QDBusArgument &arg, ChangeDescription &change)
{
arg.beginStructure();
diff --git a/src/plugins/General/hal/haldevice.h b/src/plugins/General/hal/haldevice.h
index 9c3023a46..797f7114a 100644
--- a/src/plugins/General/hal/haldevice.h
+++ b/src/plugins/General/hal/haldevice.h
@@ -2,6 +2,8 @@
* Copyright (C) 2009 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
+ * Copyright (C) 2006 by Kevin Ottens <ervin@kde.org> *
+ * *
* 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 *
@@ -27,6 +29,9 @@
class QDBusInterface;
+/**
+ * This structure has been copied from Solid (KDE hardware library)
+ */
struct ChangeDescription
{
QString key;
diff --git a/src/plugins/General/hal/halfactory.cpp b/src/plugins/General/hal/halfactory.cpp
index e0b777d43..513f8642a 100644
--- a/src/plugins/General/hal/halfactory.cpp
+++ b/src/plugins/General/hal/halfactory.cpp
@@ -20,6 +20,7 @@
#include <QtGui>
+#include "settingsdialog.h"
#include "halplugin.h"
#include "halfactory.h"
@@ -28,8 +29,8 @@ const GeneralProperties HalFactory::properties() const
GeneralProperties properties;
properties.name = tr("HAL Plugin");
properties.shortName = "hal";
- properties.hasAbout = FALSE;
- properties.hasSettings = FALSE;
+ properties.hasAbout = TRUE;
+ properties.hasSettings = TRUE;
properties.visibilityControl = FALSE;
return properties;
}
@@ -39,17 +40,18 @@ General *HalFactory::create(QObject *parent)
return new HalPlugin(parent);
}
-QDialog *HalFactory::createConfigDialog(QWidget *)
+QDialog *HalFactory::createConfigDialog(QWidget *parent)
{
- return 0;
+ return new SettingsDialog(parent);
}
void HalFactory::showAbout(QWidget *parent)
{
- /*QMessageBox::about (parent, tr("About Hal Plugin"),
- tr("Qmmp Hal Plugin")+"\n"+
- tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>"));*/
- //TODO based on solid
+ QMessageBox::about (parent, tr("About HAL Plugin"),
+ tr("Qmmp HAL Plugin") + "\n" +
+ tr("This plugin provides removable devices detection using HAL") + "\n" +
+ tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>") + "\n" +
+ tr("Based on Solid (KDE hardware library)"));
}
QTranslator *HalFactory::createTranslator(QObject *parent)
diff --git a/src/plugins/General/hal/halmanager.cpp b/src/plugins/General/hal/halmanager.cpp
index 2db56c186..ccf6bbbd3 100644
--- a/src/plugins/General/hal/halmanager.cpp
+++ b/src/plugins/General/hal/halmanager.cpp
@@ -18,8 +18,6 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-//TODO based on solid
-
#include <QDBusInterface>
#include <QDBusConnection>
#include <QDBusReply>
diff --git a/src/plugins/General/hal/halplugin.cpp b/src/plugins/General/hal/halplugin.cpp
index 026efc2d4..002ebc0e3 100644
--- a/src/plugins/General/hal/halplugin.cpp
+++ b/src/plugins/General/hal/halplugin.cpp
@@ -24,6 +24,8 @@
#include <qmmpui/generalhandler.h>
#include <qmmpui/mediaplayer.h>
#include <qmmpui/playlistmodel.h>
+#include <qmmpui/playlistitem.h>
+#include <qmmp/qmmp.h>
#include "haldevice.h"
#include "halmanager.h"
#include "halplugin.h"
@@ -36,10 +38,23 @@ HalPlugin::HalPlugin(QObject *parent)
connect(m_manager,SIGNAL(deviceAdded(const QString &)), SLOT(addDevice(const QString &)));
connect(m_manager,SIGNAL(deviceRemoved(const QString &)), SLOT(removeDevice(const QString &)));
connect(m_actions,SIGNAL(triggered (QAction *)), SLOT(processAction(QAction *)));
+ //load settings
+ QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
+ settings.beginGroup("HAL");
+ m_detectCDA = settings.value("cda", TRUE).toBool();
+ m_detectRemovable = settings.value("removable", TRUE).toBool();
+ m_addTracks = FALSE; //do not load tracks on startup
+ m_addFiles = FALSE;
//find existing devices
QStringList udis = m_manager->findDeviceByCapability("volume");
foreach(QString udi, udis)
addDevice(udi);
+ //load remaining settings
+ m_addTracks = settings.value("add_tracks", FALSE).toBool();
+ m_removeTracks = settings.value("remove_tracks", FALSE).toBool();
+ m_addFiles = settings.value("add_files", FALSE).toBool();
+ m_removeFiles = settings.value("remove_files", FALSE).toBool();
+ settings.endGroup();
}
@@ -81,9 +96,14 @@ void HalPlugin::addDevice(const QString &udi)
//audio cd
if (caps.contains("volume.disc") && device->property("volume.disc.has_audio").toBool())
{
- qDebug("HalPlugin: device \"%s\" added (cd audio)", qPrintable(udi));
- m_devices << device;
- updateActions();
+ if (m_detectCDA)
+ {
+ qDebug("HalPlugin: device \"%s\" added (cd audio)", qPrintable(udi));
+ m_devices << device;
+ updateActions();
+ }
+ else
+ delete device;
return;
}
@@ -103,11 +123,16 @@ void HalPlugin::addDevice(const QString &udi)
device->property("volume.fstype").toString() == "udf" ||
device->property("volume.fstype").toString() == "ext2"))
{
- qDebug("HalPlugin: device \"%s\" added (removable)", qPrintable(udi));
- m_devices << device;
- updateActions();
- connect(device, SIGNAL(propertyModified(int, const QList<ChangeDescription> &)),
- SLOT(updateActions()));
+ if (m_detectRemovable)
+ {
+ qDebug("HalPlugin: device \"%s\" added (removable)", qPrintable(udi));
+ m_devices << device;
+ updateActions();
+ connect(device, SIGNAL(propertyModified(int, const QList<ChangeDescription> &)),
+ SLOT(updateActions()));
+ }
+ else
+ delete device;
return;
}
delete device;
@@ -144,6 +169,7 @@ void HalPlugin::updateActions()
action->setData(dev_path);
m_actions->addAction(action);
GeneralHandler::instance()->addAction(action, GeneralHandler::TOOLS_MENU);
+ addPath(dev_path);
}
}
// remove action if device is unmounted/removed
@@ -153,6 +179,7 @@ void HalPlugin::updateActions()
{
m_actions->removeAction(action);
GeneralHandler::instance()->removeAction(action);
+ removePath(action->data().toString());
action->deleteLater();
}
}
@@ -199,3 +226,38 @@ HalDevice *HalPlugin::findDevice(QAction *action)
}
return 0;
}
+
+void HalPlugin::addPath(const QString &path)
+{
+ foreach(PlayListItem *item, MediaPlayer::instance()->playListModel()->items()) // Is it already exist?
+ {
+ if (item->url().startsWith(path))
+ return;
+ }
+
+ if (path.startsWith("cdda://") && m_addTracks)
+ {
+ MediaPlayer::instance()->playListModel()->addFile(path);
+ return;
+ }
+ else if (!path.startsWith("cdda://") && m_addFiles)
+ MediaPlayer::instance()->playListModel()->addDirectory(path);
+}
+
+void HalPlugin::removePath(const QString &path)
+{
+ if ((path.startsWith("cdda://") && !m_removeTracks) ||
+ (!path.startsWith("cdda://") && !m_removeFiles)) //process settings
+ return;
+
+ PlayListModel *model = MediaPlayer::instance()->playListModel();
+
+ int i = 0;
+ while (model->count() > 0 && i < model->count())
+ {
+ if (model->item(i)->url ().startsWith(path))
+ model->removeAt (i);
+ else
+ ++i;
+ }
+}
diff --git a/src/plugins/General/hal/halplugin.h b/src/plugins/General/hal/halplugin.h
index 7a3dade65..cd90046a2 100644
--- a/src/plugins/General/hal/halplugin.h
+++ b/src/plugins/General/hal/halplugin.h
@@ -49,9 +49,17 @@ private slots:
private:
QAction *findAction(const QString &dev_path);
HalDevice *findDevice(QAction *action);
+ void addPath(const QString &path);
+ void removePath(const QString &path);
HalManager *m_manager;
QList <HalDevice *> m_devices;
QActionGroup *m_actions;
+ bool m_detectCDA;
+ bool m_addTracks;
+ bool m_removeTracks;
+ bool m_detectRemovable;
+ bool m_addFiles;
+ bool m_removeFiles;
};
#endif
diff --git a/src/plugins/General/hal/settingsdialog.cpp b/src/plugins/General/hal/settingsdialog.cpp
new file mode 100644
index 000000000..2c4062de1
--- /dev/null
+++ b/src/plugins/General/hal/settingsdialog.cpp
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * Copyright (C) 2009 by Ilya Kotov *
+ * forkotov02@hotmail.ru *
+ * *
+ * 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 <QTextCodec>
+#include <QSettings>
+
+#include <qmmp/qmmp.h>
+
+#include "settingsdialog.h"
+
+SettingsDialog::SettingsDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ ui.setupUi(this);
+ QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
+ settings.beginGroup("HAL");
+ ui.cdGroupBox->setChecked(settings.value("cda", TRUE).toBool());
+ ui.addTracksCheckBox->setChecked(settings.value("add_tracks", FALSE).toBool());
+ ui.removeTracksCheckBox->setChecked(settings.value("remove_tracks", FALSE).toBool());
+ ui.removableGroupBox->setChecked(settings.value("removable", TRUE).toBool());
+ ui.addFilesCheckBox->setChecked(settings.value("add_files", FALSE).toBool());
+ ui.removeFilesCheckBox->setChecked(settings.value("remove_files", FALSE).toBool());
+ settings.endGroup();
+}
+
+
+SettingsDialog::~SettingsDialog()
+{}
+
+void SettingsDialog::accept()
+{
+ QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
+ settings.beginGroup("HAL");
+ settings.setValue("cda", ui.cdGroupBox->isChecked());
+ settings.setValue("add_tracks", ui.addTracksCheckBox->isChecked());
+ settings.setValue("remove_tracks", ui.removeTracksCheckBox->isChecked());
+ settings.setValue("removable", ui.removableGroupBox->isChecked());
+ settings.setValue("add_files", ui.addFilesCheckBox->isChecked());
+ settings.setValue("remove_files", ui.removeFilesCheckBox->isChecked());
+ settings.endGroup();
+ QDialog::accept();
+}
diff --git a/src/plugins/General/hal/settingsdialog.h b/src/plugins/General/hal/settingsdialog.h
new file mode 100644
index 000000000..9ba56bce8
--- /dev/null
+++ b/src/plugins/General/hal/settingsdialog.h
@@ -0,0 +1,46 @@
+/***************************************************************************
+ * Copyright (C) 2009 by Ilya Kotov *
+ * forkotov02@hotmail.ru *
+ * *
+ * 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
+
+#include <QDialog>
+
+#include "ui_settingsdialog.h"
+
+/**
+ @author Ilya Kotov <forkotov02@hotmail.ru>
+*/
+class SettingsDialog : public QDialog
+{
+Q_OBJECT
+public:
+ SettingsDialog(QWidget *parent = 0);
+
+ ~SettingsDialog();
+
+
+public slots:
+ virtual void accept();
+
+private:
+ Ui::SettingsDialog ui;
+};
+
+#endif
diff --git a/src/plugins/General/hal/settingsdialog.ui b/src/plugins/General/hal/settingsdialog.ui
new file mode 100644
index 000000000..9907371ba
--- /dev/null
+++ b/src/plugins/General/hal/settingsdialog.ui
@@ -0,0 +1,121 @@
+<ui version="4.0" >
+ <class>SettingsDialog</class>
+ <widget class="QDialog" name="SettingsDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>348</width>
+ <height>247</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>HAL Plugin Settings</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <property name="leftMargin" >
+ <number>6</number>
+ </property>
+ <property name="rightMargin" >
+ <number>6</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="cdGroupBox" >
+ <property name="title" >
+ <string>CD Audio Detection</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QCheckBox" name="addTracksCheckBox" >
+ <property name="text" >
+ <string>Add tracks to playlist automatically</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="removeTracksCheckBox" >
+ <property name="text" >
+ <string>Remove tracks from playlist automatically</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="removableGroupBox" >
+ <property name="title" >
+ <string>Removable Devcie Detection</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QCheckBox" name="addFilesCheckBox" >
+ <property name="text" >
+ <string>Add files to playlist automatically</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="removeFilesCheckBox" >
+ <property name="text" >
+ <string>Remove files from playlist automatically</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>SettingsDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>199</x>
+ <y>221</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>22</x>
+ <y>242</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>SettingsDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>247</x>
+ <y>225</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>273</x>
+ <y>229</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/src/plugins/General/hal/translations/hal_plugin_cs.ts b/src/plugins/General/hal/translations/hal_plugin_cs.ts
new file mode 100644
index 000000000..2802c449b
--- /dev/null
+++ b/src/plugins/General/hal/translations/hal_plugin_cs.ts
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1">
+<context>
+ <name>HalFactory</name>
+ <message>
+ <location filename="../halfactory.cpp" line="30"/>
+ <source>HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="50"/>
+ <source>About HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="51"/>
+ <source>Qmmp HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="52"/>
+ <source>This plugin provides removable devices detection using HAL</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="53"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="54"/>
+ <source>Based on Solid (KDE hardware library)</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HalPlugin</name>
+ <message>
+ <location filename="../halplugin.cpp" line="160"/>
+ <source>Add CD &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halplugin.cpp" line="166"/>
+ <source>Add Volume &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="13"/>
+ <source>HAL Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="28"/>
+ <source>CD Audio Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="37"/>
+ <source>Add tracks to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="44"/>
+ <source>Remove tracks from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="54"/>
+ <source>Removable Devcie Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="63"/>
+ <source>Add files to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="70"/>
+ <source>Remove files from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/General/hal/translations/hal_plugin_de.ts b/src/plugins/General/hal/translations/hal_plugin_de.ts
new file mode 100644
index 000000000..3016f84aa
--- /dev/null
+++ b/src/plugins/General/hal/translations/hal_plugin_de.ts
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="de">
+<context>
+ <name>HalFactory</name>
+ <message>
+ <location filename="../halfactory.cpp" line="30"/>
+ <source>HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="50"/>
+ <source>About HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="51"/>
+ <source>Qmmp HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="52"/>
+ <source>This plugin provides removable devices detection using HAL</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="53"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Autor: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="54"/>
+ <source>Based on Solid (KDE hardware library)</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HalPlugin</name>
+ <message>
+ <location filename="../halplugin.cpp" line="160"/>
+ <source>Add CD &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halplugin.cpp" line="166"/>
+ <source>Add Volume &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="13"/>
+ <source>HAL Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="28"/>
+ <source>CD Audio Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="37"/>
+ <source>Add tracks to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="44"/>
+ <source>Remove tracks from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="54"/>
+ <source>Removable Devcie Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="63"/>
+ <source>Add files to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="70"/>
+ <source>Remove files from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/General/hal/translations/hal_plugin_ru.ts b/src/plugins/General/hal/translations/hal_plugin_ru.ts
new file mode 100644
index 000000000..045db374d
--- /dev/null
+++ b/src/plugins/General/hal/translations/hal_plugin_ru.ts
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="ru_RU">
+<defaultcodec></defaultcodec>
+<context>
+ <name>HalFactory</name>
+ <message>
+ <location filename="../halfactory.cpp" line="30"/>
+ <source>HAL Plugin</source>
+ <translation>Модуль HAL</translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="50"/>
+ <source>About HAL Plugin</source>
+ <translation>О Модуле HAL</translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="51"/>
+ <source>Qmmp HAL Plugin</source>
+ <translation>Модуль HAL для Qmmp</translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="52"/>
+ <source>This plugin provides removable devices detection using HAL</source>
+ <translation>Этот модуль отслеживает съёмные устройства с помощью HAL</translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="53"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation>Разработчик: Илья Котов</translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="54"/>
+ <source>Based on Solid (KDE hardware library)</source>
+ <translation>Основан на базе Solid (библиотека KDE)</translation>
+ </message>
+</context>
+<context>
+ <name>HalPlugin</name>
+ <message>
+ <location filename="../halplugin.cpp" line="160"/>
+ <source>Add CD &quot;%1&quot;</source>
+ <translation>Добавить CD &quot;%1&quot;</translation>
+ </message>
+ <message>
+ <location filename="../halplugin.cpp" line="166"/>
+ <source>Add Volume &quot;%1&quot;</source>
+ <translation>Добавить том &quot;%1&quot;</translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="13"/>
+ <source>HAL Plugin Settings</source>
+ <translation>Настройки модуля HAL</translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="28"/>
+ <source>CD Audio Detection</source>
+ <translation>Автоопределение аудио-CD</translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="37"/>
+ <source>Add tracks to playlist automatically</source>
+ <translation>Автоматически добавлять треки в список</translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="44"/>
+ <source>Remove tracks from playlist automatically</source>
+ <translation>Автоматически удалять треки из списка</translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="54"/>
+ <source>Removable Devcie Detection</source>
+ <translation>Автоопределение съёмных устройств</translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="63"/>
+ <source>Add files to playlist automatically</source>
+ <translation>Автоматически добавлять треки в список</translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="70"/>
+ <source>Remove files from playlist automatically</source>
+ <translation>Автоматически удалять треки из списка </translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/General/hal/translations/hal_plugin_uk_UA.ts b/src/plugins/General/hal/translations/hal_plugin_uk_UA.ts
new file mode 100644
index 000000000..427ed1cd4
--- /dev/null
+++ b/src/plugins/General/hal/translations/hal_plugin_uk_UA.ts
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="uk">
+<context>
+ <name>HalFactory</name>
+ <message>
+ <location filename="../halfactory.cpp" line="30"/>
+ <source>HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="50"/>
+ <source>About HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="51"/>
+ <source>Qmmp HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="52"/>
+ <source>This plugin provides removable devices detection using HAL</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="53"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Розробник: Ілля Котов &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="54"/>
+ <source>Based on Solid (KDE hardware library)</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HalPlugin</name>
+ <message>
+ <location filename="../halplugin.cpp" line="160"/>
+ <source>Add CD &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halplugin.cpp" line="166"/>
+ <source>Add Volume &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="13"/>
+ <source>HAL Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="28"/>
+ <source>CD Audio Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="37"/>
+ <source>Add tracks to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="44"/>
+ <source>Remove tracks from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="54"/>
+ <source>Removable Devcie Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="63"/>
+ <source>Add files to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="70"/>
+ <source>Remove files from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/General/hal/translations/hal_plugin_zh_CN.ts b/src/plugins/General/hal/translations/hal_plugin_zh_CN.ts
new file mode 100644
index 000000000..2802c449b
--- /dev/null
+++ b/src/plugins/General/hal/translations/hal_plugin_zh_CN.ts
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1">
+<context>
+ <name>HalFactory</name>
+ <message>
+ <location filename="../halfactory.cpp" line="30"/>
+ <source>HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="50"/>
+ <source>About HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="51"/>
+ <source>Qmmp HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="52"/>
+ <source>This plugin provides removable devices detection using HAL</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="53"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="54"/>
+ <source>Based on Solid (KDE hardware library)</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HalPlugin</name>
+ <message>
+ <location filename="../halplugin.cpp" line="160"/>
+ <source>Add CD &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halplugin.cpp" line="166"/>
+ <source>Add Volume &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="13"/>
+ <source>HAL Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="28"/>
+ <source>CD Audio Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="37"/>
+ <source>Add tracks to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="44"/>
+ <source>Remove tracks from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="54"/>
+ <source>Removable Devcie Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="63"/>
+ <source>Add files to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="70"/>
+ <source>Remove files from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/General/hal/translations/hal_plugin_zh_TW.ts b/src/plugins/General/hal/translations/hal_plugin_zh_TW.ts
new file mode 100644
index 000000000..2802c449b
--- /dev/null
+++ b/src/plugins/General/hal/translations/hal_plugin_zh_TW.ts
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1">
+<context>
+ <name>HalFactory</name>
+ <message>
+ <location filename="../halfactory.cpp" line="30"/>
+ <source>HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="50"/>
+ <source>About HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="51"/>
+ <source>Qmmp HAL Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="52"/>
+ <source>This plugin provides removable devices detection using HAL</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="53"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halfactory.cpp" line="54"/>
+ <source>Based on Solid (KDE hardware library)</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HalPlugin</name>
+ <message>
+ <location filename="../halplugin.cpp" line="160"/>
+ <source>Add CD &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../halplugin.cpp" line="166"/>
+ <source>Add Volume &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="13"/>
+ <source>HAL Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="28"/>
+ <source>CD Audio Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="37"/>
+ <source>Add tracks to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="44"/>
+ <source>Remove tracks from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="54"/>
+ <source>Removable Devcie Detection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="63"/>
+ <source>Add files to playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="70"/>
+ <source>Remove files from playlist automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/General/hal/translations/translations.qrc b/src/plugins/General/hal/translations/translations.qrc
new file mode 100644
index 000000000..1c584d684
--- /dev/null
+++ b/src/plugins/General/hal/translations/translations.qrc
@@ -0,0 +1,11 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource>
+ <file>hal_plugin_ru.qm</file>
+ <file>hal_plugin_uk_UA.qm</file>
+ <file>hal_plugin_zh_CN.qm</file>
+ <file>hal_plugin_zh_TW.qm</file>
+ <file>hal_plugin_cs.qm</file>
+ <file>hal_plugin_de.qm</file>
+ </qresource>
+</RCC>