Skip to content
Snippets Groups Projects
Commit 1c1b57a4 authored by Thiago H. S. Picharski's avatar Thiago H. S. Picharski
Browse files

Merge remote branch 'le-device-notifier/master'

parents fb0e37d3 b125391f
Branches
No related tags found
No related merge requests found
Showing
with 1680 additions and 0 deletions
Instructions to compile the source code:
1. Download and install the following packages:
- cmake
- libphonon-dev
- build-essential
- libplasma-dev
2. Create a folder called build and cd to:
mkdir build
cd build
3. Compile using the commands:
cmake ../src
make
1.0.3
#!/bin/bash
# gerar.sh
# Copyright (c) 2006 by Bruno Ribas <ribas@ufpr.br>
DIRTMP=$(mktemp -d)
VERSAO=$(cat VERSAO)
#arrumar versao
#$1 tipo de incremento
MAJOR=$(echo $VERSAO| cut -d'.' -f1)
MINOR=$(echo $VERSAO| cut -d'.' -f2)
REVISION=$(echo $VERSAO| cut -d'.' -f3)
case $1 in
Minor)
((MINOR++))
REVISION=0
;;
Major)
((MAJOR++))
MINOR=0
REVISION=0
;;
help)
echo "Uso: $0 Major|Minor|Revision"
echo ' Major - Altera versao Major'
echo ' Minor - Altera versao Minor'
exit
;;
*)
((REVISION++))
;;
esac
VERSAO="${MAJOR}.${MINOR}.${REVISION}"
echo "$VERSAO" > VERSAO
#Compila a documentacao do pacote no diretorio doc/
#cd doc/
#hevea -text *.tex
#hevea -text *.tex
#cd ../
cp -r pacote $DIRTMP
#Copia a documentacao compilada para dentro do pacote.
#cp doc/*.txt $DIRTMP/pacote/usr/share/doc/prd-*
cd $DIRTMP
find . -name ".svn" -exec rm -rf {} \; &>/dev/null
sed -i -e "s/Version:/Version: $VERSAO/" pacote/DEBIAN/control
fakeroot dpkg -b pacote .
cd -
cp $DIRTMP/*deb .
rm -rf $DIRTMP
# vim:tabstop=4:shiftwidth=4:encoding=iso-8859-1
Package: le-device-notifier
Section: main
Priority: important
Version:
Architecture: i386
Depends: le-interface | le-light-interface
Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br>
Description: Device notifier for Linux Educacional
This is an adapted version of device-notifier-automount 0.4alpha1
created by Achim Strobelt.
#!/bin/bash
#
# Copyright (C) 2004-2011 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-device-notifier
#
# le-device-notifier 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
APPLETSRC=/etc/skel/.kde/share/config/plasma-desktop-appletsrc
sed -i s@"notifier"@"notifier_automount"@g ${APPLETSRC}
#!/bin/bash
#
# Copyright (C) 2004-2011 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-device-notifier
#
# le-device-notifier 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# List of files to divert
divertList="
/usr/lib/kde4/plasma_applet_devicenotifier.so \
/usr/share/kde4/services/plasma-applet-devicenotifier.desktop \
"
# Divert files
if [[ "$1" != "upgrade" ]]; then
for file in $divertList; do
if test -e $file.real; then
rm -f $file
dpkg-divert --package le-device-notifier --remove --rename \
--divert $file{.real,}
fi
done
fi
#!/bin/bash
#
# Copyright (C) 2004-2011 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-device-notifier
#
# le-device-notifier 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# List of files to divert
divertList="
/usr/lib/kde4/plasma_applet_devicenotifier.so \
/usr/share/kde4/services/plasma-applet-devicenotifier.desktop \
"
# Divert files
for file in $divertList; do
if test -f $file; then
dpkg-divert --package le-device-notifier --add --rename \
--divert $file{.real,}
fi
done
File added
[Desktop Entry]
Name[en]=Device Notifier (Automount)
Name[de]=Geräteüberwachung (Automount)
Name=Notificador de Dispositivos (Montagem Automática)
Comment[en]=Notifications and access for new devices with automount
Comment[de]=Benachrichtigungen über neue Geräte und automatisches Einbinden
Comment=Notificação e acesso a novos dispositivos
Icon=device-notifier
Type=Service
X-KDE-ServiceTypes=Plasma/Applet
X-KDE-Library=plasma_applet_devicenotifier_automount
X-KDE-PluginInfo-Author=Achim Strobelt
X-KDE-PluginInfo-Email=mail@achimstrobelt.de
X-KDE-PluginInfo-Name=notifier_automount
X-KDE-PluginInfo-Version=0.4alpha1
X-KDE-PluginInfo-Website=http://www.kde-look.org/content/show.php?content=91517
X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
X-Plasma-Requires-FileDialog=Unused
X-Plasma-Requires-LaunchApp=Required
# Devicenotifier Automount 0.4alpha1
project(plasma-devicenotifier-automount)
# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
)
set(devicenotifier_automount_SRCS
devicenotifier_automount.cpp
notifierdialog_automount.cpp
notifierview_automount.cpp
automountGui_config.cpp
deviceoptions.cpp)
kde4_add_ui_files(devicenotifier_automount_SRCS devicenotifier_automountConfig.ui )
kde4_add_ui_files(devicenotifier_automount_SRCS devicenotifier_mountOptionsConfig.ui )
kde4_add_ui_files(devicenotifier_automount_SRCS automountGui_configDialog.ui )
kde4_add_plugin(plasma_applet_devicenotifier_automount ${devicenotifier_automount_SRCS} )
target_link_libraries(plasma_applet_devicenotifier_automount ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS} ${KDE4_SOLID_LIBS})
install(TARGETS plasma_applet_devicenotifier_automount DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES plasma-applet-devicenotifier_automount.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES automountoptionsrc DESTINATION ${CONFIG_INSTALL_DIR})
/***************************************************************************
* Copyright (C) 2009 by Achim Strobelt <mail@achimstrobelt.de> *
* *
* 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., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
#include <KLocale>
#include <KMessageBox>
#include <KDebug>
// include the header file of the dialog
#include "automountGui_config.h"
AutomountConfigDialog::AutomountConfigDialog( const QStringList& fsOptions, const QString& fs, QWidget *parent )
: KDialog( parent )
{
QWidget *widget = new QWidget( this );
// create the user interface, the parent widget is "widget"
ui.setupUi(widget); // this is the important part
// temmporary fsOptions
QStringList tempOptions = fsOptions;
// set the widget with all its gui elements as the dialog's
// main widget
setMainWidget( widget );
// other KDialog options
setCaption( i18n("Mount options") + ": " + fs );
setButtons( KDialog::Close | KDialog::Ok );
// setup controls
ui.standardOptions->setTitle(i18n("Standard options"));
ui.uidBox->setText(i18n("User ID"));
if (tempOptions.contains("setUid=true")) {
ui.uidBox->setCheckState(Qt::Checked);
tempOptions.removeAll("setUid=true");
} else {
ui.uidBox->setCheckState(Qt::Unchecked);
}
ui.noexecBox->setText(i18n("Execute programs"));
if (tempOptions.contains("setNoexec=true"))
{
ui.noexecBox->setCheckState(Qt::Unchecked);
tempOptions.removeAll("setNoexec=true");
} else {
ui.noexecBox->setCheckState(Qt::Checked);
}
// Special options
ui.specialOptions->setTitle(i18n("Special options"));
ui.specialOptionsTable->clear();
QStringList headerLabels;
headerLabels << i18n("Option") << i18n("Value");
ui.specialOptionsTable->setHorizontalHeaderLabels(headerLabels);
ui.specialOptionsTable->setColumnCount(2);
ui.specialOptionsTable->setRowCount(tempOptions.count());
int row = 0;
QTableWidgetItem *newItem;
foreach (const QString &option, tempOptions) {
kDebug() << option;
if (option.contains("=")) {
QStringList optionList = option.split("=");
newItem = new QTableWidgetItem(optionList.takeFirst());
ui.specialOptionsTable->setItem(row, 0, newItem);
newItem = new QTableWidgetItem(optionList.takeFirst());
ui.specialOptionsTable->setItem(row, 1, newItem);
} else {
newItem = new QTableWidgetItem(option);
ui.specialOptionsTable->setItem(row, 0, newItem);
}
row++;
}
connect(ui.specialOptionsTable, SIGNAL(currentCellChanged(int , int, int, int)), this, SLOT(specialOptionsCellChanged()));
// Option buttons
ui.addOptionButton->setText(i18n("Add option"));
ui.addOptionButton->setIcon(KIcon("list-add"));
connect(ui.addOptionButton, SIGNAL(clicked()), this, SLOT(addNewOption()));
ui.removeOptionButton->setText(i18n("Remove option"));
ui.removeOptionButton->setIcon(KIcon("list-remove"));
ui.removeOptionButton->setEnabled(false);
connect(ui.removeOptionButton, SIGNAL(clicked()), this, SLOT(removeOption()));
}
AutomountConfigDialog::~AutomountConfigDialog(void)
{
}
void AutomountConfigDialog::addNewOption(void)
{
kDebug() << "Add new option";
int rowCount = ui.specialOptionsTable->rowCount();
ui.specialOptionsTable->setRowCount(rowCount + 1);
}
void AutomountConfigDialog::removeOption(void)
{
kDebug() << "Remove option";
if (ui.specialOptionsTable->currentRow() >= 0) {
ui.specialOptionsTable->removeRow(ui.specialOptionsTable->currentRow());
}
}
void AutomountConfigDialog::specialOptionsCellChanged(void)
{
kDebug() << "Current cell changed";
// After cell changed a cell is selected and the remove button can be enabled
ui.removeOptionButton->setEnabled(true);
}
QStringList AutomountConfigDialog::getFsOptions(void)
{
QStringList returnValue;
// set UID?
kDebug() << "UID";
if (ui.uidBox->checkState() == Qt::Checked) {
returnValue << "setUid=true";
}
// noexec?
kDebug() << "NoExec";
if (ui.noexecBox->checkState() == Qt::Unchecked) {
returnValue << "setNoexec=true";
}
// read special Options
for (int row = 0; row < ui.specialOptionsTable->rowCount(); row++) {
if (ui.specialOptionsTable->item(row, 0) != 0) {
if (ui.specialOptionsTable->item(row, 1) != 0) {
returnValue << ui.specialOptionsTable->item(row, 0)->text() + "=" + ui.specialOptionsTable->item(row, 1)->text();
} else {
returnValue << ui.specialOptionsTable->item(row, 0)->text();
}
}
}
return returnValue;
}
#include "automountGui_config.moc"
/***************************************************************************
* Copyright (C) 2009 by Achim Strobelt <mail@achimstrobelt.de> *
* *
* 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., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
#ifndef AUTOMOUNTGUI_CONFIG_H
#define AUTOMOUNTGUI_CONFIG_H
#include <KDialog>
// include the automatically generated header file for the ui-file
#include "ui_automountGui_configDialog.h"
class AutomountConfigDialog : public KDialog
{
Q_OBJECT
public:
AutomountConfigDialog( const QStringList& fsOptions, const QString& fs, QWidget *parent=0 );
~AutomountConfigDialog(void);
QStringList getFsOptions(void);
private slots:
void addNewOption(void);
void removeOption(void);
void specialOptionsCellChanged(void);
private:
// accessor to the ui. we can access all gui elements
// specified in Designer. If mydialog.ui contains a
// button "myButton", we will be able to access it
// with ui.myButton in the cpp file.
Ui::automountGui_configDialog ui;
};
#endif
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>automountGui_configDialog</class>
<widget class="QWidget" name="automountGui_configDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>490</width>
<height>536</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="standardOptions">
<property name="title">
<string>standardOptions</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="uidBox">
<property name="text">
<string>uidBox</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="noexecBox">
<property name="text">
<string>noexecBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="specialOptions">
<property name="title">
<string>specialOptions</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" rowspan="3">
<widget class="QTableWidget" name="specialOptionsTable">
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="columnCount">
<number>2</number>
</property>
<column/>
<column/>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="addOptionButton">
<property name="text">
<string>addOptionButton</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="removeOptionButton">
<property name="text">
<string>removeOptionButton</string>
</property>
</widget>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>42</width>
<height>354</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
[Devices]
Filesystems=iso9660,vfat,udf
iso9660=setNoexec=true,mode=0444
udf=
vfat=setUid=true,setNoexec=true,fmask=0133,dmask=0022
/***************************************************************************
* Copyright (C) 2007 by Alexis Ménard <darktears31@gmail.com> *
* Copyright (C) 2009 by Achim Strobelt <mail@achimstrobelt.de> *
* *
* 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., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
//own
#include "devicenotifier_automount.h"
#include "notifierview_automount.h"
#include "notifierdialog_automount.h"
#include "automountGui_config.h"
//Qt
#include <QGraphicsLinearLayout>
#include <QGraphicsProxyWidget>
#include <QTimer>
//KDE
#include <KIcon>
#include <KConfigDialog>
#include <KStandardDirs>
#include <KDesktopFile>
#include <kdesktopfileactions.h>
#include <KIconLoader>
#include <KMimeType>
#include <KService>
#include <KMimeTypeTrader>
#include <KMessageBox>
#include <KRun>
#include <KUrl>
//plasma
#include <Plasma/Dialog>
//use for desktop view
#include <Plasma/IconWidget>
#include <Plasma/Theme>
//solid
#include <solid/device.h>
#include <solid/storagedrive.h>
#include <solid/opticaldisc.h>
#include <solid/storageaccess.h>
#include <solid/opticaldrive.h>
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusReply>
#include <unistd.h>
using namespace Plasma;
using namespace Notifier;
K_EXPORT_PLASMA_APPLET(devicenotifier, DeviceNotifier)
DeviceNotifier::DeviceNotifier(QObject *parent, const QVariantList &args)
: Plasma::PopupApplet(parent, args),
m_solidEngine(0),
m_solidDeviceEngine(0),
m_icon(0),
m_iconName(""),
m_dialog(0),
m_numberItems(0),
m_itemsValidity(0)
{
setBackgroundHints(StandardBackground);
setAspectRatioMode(IgnoreAspectRatio);
setHasConfigurationInterface(true);
// let's initialize the widget
(void)widget();
resize(widget()->sizeHint());
}
DeviceNotifier::~DeviceNotifier()
{
delete m_icon;
delete m_dialog;
}
void DeviceNotifier::createConfigurationInterface(KConfigDialog *parent)
{
// General configuration
QWidget *confWidget = new QWidget();
configUi.setupUi(confWidget);
parent->addPage(confWidget, i18n("General"), icon());
if (m_mountDevice) {
configUi.automountCheckbox->setCheckState(Qt::Checked);
} else {
configUi.automountCheckbox->setCheckState(Qt::Unchecked);
}
// Mount options
QWidget *mountWidget = new QWidget();
mountConfigUi.setupUi(mountWidget);
parent->addPage(mountWidget, i18n("Mount options"), "drive-harddisk");
// filesystem tab
mountConfigUi.tabWidget->setTabText(0, i18n("Filesystems"));
mountConfigUi.fsAddButton->setIcon(KIcon("list-add"));
mountConfigUi.fsAddButton->setText(i18n("Add filesystem"));
mountConfigUi.fsAddButton->setEnabled(false);
// add filesystems to list
mountConfigUi.fsAddList->clear();
foreach (const QString &source, m_solidEngine->sources()) {
Solid::Device device = Solid::Device(source);
// Only storage volumes
if (device.is<Solid::StorageVolume>()) {
Solid::StorageVolume *sv = device.as<Solid::StorageVolume>();
QString filesystem = sv->fsType();
// Check if filesystem is in list and add it if necessary
if (mountConfigUi.fsAddList->findItems(filesystem, Qt::MatchExactly).isEmpty()) {
mountConfigUi.fsAddList->addItem(filesystem);
}
}
}
// Setup fsAddList
if (mountConfigUi.fsAddList->count() > 0) {
mountConfigUi.fsAddList->setCurrentRow(0);
mountConfigUi.fsAddButton->setEnabled(true);
}
// fsSaveList buttons
mountConfigUi.fsRemoveButton->setIcon(KIcon("list-remove"));
mountConfigUi.fsRemoveButton->setText(i18n("Remove filesystem"));
mountConfigUi.fsRemoveButton->setEnabled(false);
mountConfigUi.fsEditButton->setIcon(KIcon("document-edit"));
mountConfigUi.fsEditButton->setText(i18n("Edit options"));
mountConfigUi.fsEditButton->setEnabled(false);
// setup fsSaveList
foreach (const QString &fsSaved, m_deviceOptions.getFilesystems()) {
mountConfigUi.fsSaveList->addItem(fsSaved);
}
if (mountConfigUi.fsSaveList->count() > 0) {
mountConfigUi.fsEditButton->setEnabled(true);
mountConfigUi.fsRemoveButton->setEnabled(true);
}
if (mountConfigUi.fsSaveList->currentRow() == -1) {
mountConfigUi.fsSaveList->setCurrentRow(0);
}
// Connect signals
connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));
connect(parent, SIGNAL(cancelClicked()), this, SLOT(configRejected()));
connect(mountConfigUi.fsAddButton, SIGNAL(clicked()), this, SLOT(mountOptionsFsAdded()));
connect(mountConfigUi.fsRemoveButton, SIGNAL(clicked()), this, SLOT(mountOptionsFsRemoved()));
connect(mountConfigUi.fsEditButton, SIGNAL(clicked()), this, SLOT(mountOptionsFsEdit()));
}
void DeviceNotifier::mountOptionsFsAdded()
{
QString filesystem = mountConfigUi.fsAddList->currentItem()->text();
kDebug() << filesystem;
// Check if filesystem is in list and add it if necessary
if (mountConfigUi.fsSaveList->findItems(filesystem, Qt::MatchExactly).isEmpty()) {
mountConfigUi.fsSaveList->addItem(filesystem);
}
if (mountConfigUi.fsSaveList->count() > 0) {
mountConfigUi.fsEditButton->setEnabled(true);
mountConfigUi.fsRemoveButton->setEnabled(true);
}
if (mountConfigUi.fsSaveList->currentRow() == -1) {
mountConfigUi.fsSaveList->setCurrentRow(0);
}
}
void DeviceNotifier::mountOptionsFsRemoved()
{
kDebug() << "Remove";
kDebug() << "Row: " << mountConfigUi.fsSaveList->currentRow();
m_deviceOptions.removeFsOptions(mountConfigUi.fsSaveList->currentItem()->text());
delete mountConfigUi.fsSaveList->currentItem();
if (mountConfigUi.fsSaveList->count() == 0) {
mountConfigUi.fsRemoveButton->setEnabled(false);
mountConfigUi.fsEditButton->setEnabled(false);
}
}
void DeviceNotifier::mountOptionsFsEdit()
{
kDebug() << "Edit";
QString fs = mountConfigUi.fsSaveList->currentItem()->text();
AutomountConfigDialog settingsDialog(m_deviceOptions.getFsOptions(fs), fs, NULL);
if (settingsDialog.exec() == QDialog::Accepted) {
kDebug() << "Read options from dialog";
m_deviceOptions.setFsOptions(fs, settingsDialog.getFsOptions());
kDebug() << "Mountoptions changed";
} else {
kDebug() << "Mountoptions not changed";
}
}
void DeviceNotifier::configAccepted()
{
KConfigGroup cg = config();
m_mountDevice = configUi.automountCheckbox->isChecked();
cg.writeEntry("mountDevices", m_mountDevice);
emit configNeedsSaving();
// Save automount options in own filePath
m_deviceOptions.saveOptions();
}
void DeviceNotifier::configRejected()
{
kDebug() << "Cancel";
// Workaraound
m_deviceOptions.loadOptions();
}
void DeviceNotifier::init()
{
KConfigGroup cg = config();
m_numberItems = cg.readEntry("NumberItems", 4);
m_itemsValidity = cg.readEntry("ItemsValidity", 5);
m_solidEngine = dataEngine("hotplug");
m_solidDeviceEngine = dataEngine("soliddevice");
m_icon = new Plasma::IconWidget(KIcon("device-notifier",NULL), QString());
m_iconName = QString("device-notifier");
m_mountDevice = cg.readEntry("mountDevices", true);
Plasma::ToolTipManager::self()->registerWidget(this);
setPopupIcon(m_icon->icon());
//feed the list with what is already reported by the engine
//connect to engine when a device is plug
connect(m_solidEngine, SIGNAL(sourceAdded(const QString&)),
this, SLOT(onSourceAdded(const QString&)));
connect(m_solidEngine, SIGNAL(sourceRemoved(const QString&)),
this, SLOT(onSourceRemoved(const QString&)));
fillPreviousDevices();
}
QWidget *DeviceNotifier::widget()
{
if (!m_dialog) {
m_dialog = new NotifierDialog(this);
connect(m_dialog, SIGNAL(itemSelected()), this, SLOT(hidePopup()));
}
return m_dialog->dialog();
}
void DeviceNotifier::fillPreviousDevices()
{
m_fillingPreviousDevices = true;
foreach (const QString &source, m_solidEngine->sources()) {
Solid::Device device = Solid::Device(source);
Solid::Device parentDevice = device.parent();
Solid::StorageDrive *drive = parentDevice.as<Solid::StorageDrive>();
if (drive && (drive->isHotpluggable() || drive->isRemovable())) {
onSourceAdded(source);
}
}
m_fillingPreviousDevices = false;
}
void DeviceNotifier::changeNotifierIcon(const QString& name)
{
if (m_icon && name.isNull()) {
m_icon->setIcon(m_iconName);
} else if (m_icon) {
m_icon->setIcon(name);
}
setPopupIcon(m_icon->icon());
}
void DeviceNotifier::popupEvent(bool show)
{
if (show) {
Plasma::ToolTipManager::self()->clearContent(this);
}
}
void DeviceNotifier::dataUpdated(const QString &source, Plasma::DataEngine::Data data)
{
if (data.size() > 0) {
//data from hotplug engine
if (!data["predicateFiles"].isNull()) {
int nb_actions = 0;
QString lastActionLabel;
foreach (const QString &desktop, data["predicateFiles"].toStringList()) {
QString filePath = KStandardDirs::locate("data", "solid/actions/" + desktop);
QList<KServiceAction> services = KDesktopFileActions::userDefinedServices(filePath, true);
nb_actions += services.size();
if (services.size() > 0) {
bool serviceFound = false;
QString startOptions = getStartOptions(source);
for (int i = 0; i < services.size(); i++) {
if (startOptions == services[i].exec()) {
serviceFound = true;
kDebug() << "Service: " << startOptions;
lastActionLabel = services[i].text();
kDebug() << services[i].name();
}
}
if (!serviceFound) {
if (startOptions == "") {
if (nb_actions > 1) {
lastActionLabel = i18np("1 action for this device",
"%1 actions for this device",
nb_actions);
} else {
lastActionLabel = services[0].text();
}
} else {
lastActionLabel = startOptions;
}
}
}
}
m_dialog->setDeviceData(source,data["predicateFiles"],NotifierDialog::PredicateFilesRole);
m_dialog->setDeviceData(source,data["text"], Qt::DisplayRole);
//icon name
m_dialog->setDeviceData(source,data["icon"], NotifierDialog::IconNameRole);
//icon data
m_dialog->setDeviceData(source,KIcon(data["icon"].toString()), Qt::DecorationRole);
// Todo: get standard action for device and desplay action
m_dialog->setDeviceData(source, lastActionLabel, NotifierDialog::ActionRole);
//data from soliddevice engine
} else {
kDebug() << "DeviceNotifier::solidDeviceEngine updated" << source;
if (data["Device Types"].toStringList().contains("Storage Access")) {
if (data["Accessible"].toBool() == true) {
m_dialog->setUnMount(true,source,false);
//set icon to mounted device
QStringList overlays;
overlays << "emblem-mounted";
m_dialog->setDeviceData(source, KIcon(m_dialog->getDeviceData(source,NotifierDialog::IconNameRole).toString(), NULL, overlays), Qt::DecorationRole);
} else if (data["Device Types"].toStringList().contains("OpticalDisc")) {
//Unmounted optical drive
m_dialog->setDeviceData(source, KIcon("media-eject"), Qt::DecorationRole);
//set icon to unmounted device
m_dialog->setUnMount(true,source,false);
m_dialog->setDeviceData(source, KIcon(m_dialog->getDeviceData(source,NotifierDialog::IconNameRole).toString()), Qt::DecorationRole);
} else {
m_dialog->setUnMount(false,source,false);
//set icon to unmounted device
m_dialog->setDeviceData(source, KIcon(m_dialog->getDeviceData(source,NotifierDialog::IconNameRole).toString()), Qt::DecorationRole);
}
}
// actions specific for other types of devices will go here
}
}
}
void DeviceNotifier::notifyDevice(const QString &name)
{
m_lastPlugged<<name;
if (!m_fillingPreviousDevices) {
showPopup();
}
}
void DeviceNotifier::toolTipAboutToShow()
{
Plasma::ToolTipContent toolTip;
if (!m_lastPlugged.isEmpty()) {
Solid::Device device(m_lastPlugged.last());
toolTip.setSubText(i18n("Last plugged in device: %1", device.product()));
toolTip.setImage(KIcon(device.icon()));
} else {
toolTip.setSubText(i18n("No devices plugged in"));
toolTip.setImage(KIcon("device-notifier"));
}
Plasma::ToolTipManager::self()->setContent(this, toolTip);
}
void DeviceNotifier::toolTipHidden()
{
Plasma::ToolTipManager::self()->clearContent(this);
}
void DeviceNotifier::removeLastDeviceNotification(const QString &name)
{
m_lastPlugged.removeAll(name);
}
void DeviceNotifier::onSourceAdded(const QString &name)
{
kDebug() << "DeviceNotifier:: source added" << name;
if (m_dialog->countDevices() == m_numberItems && m_numberItems != 0) {
QString itemUdi = m_dialog->getDeviceUdi(m_dialog->countDevices() - 1);
//disconnect sources and after (important) remove the row
m_solidDeviceEngine->disconnectSource(itemUdi, this);
m_solidEngine->disconnectSource(itemUdi, this);
m_dialog->removeDevice(m_dialog->countDevices() - 1);
}
m_dialog->insertDevice(name);
notifyDevice(name);
m_solidEngine->connectSource(name, this);
m_solidDeviceEngine->connectSource(name, this);
m_dialog->setUnMount(false,name,true);
// Mount device if necessary
mountDevice(name);
}
void DeviceNotifier::mountDevice(const QString &name)
{
if (m_mountDevice) {
Solid::Device device(name);
// only storage volumes with filesystem
if ((device.is<Solid::StorageVolume>()) && device.is<Solid::StorageAccess>()) {
Solid::StorageVolume *sv = device.as<Solid::StorageVolume>();
Solid::StorageAccess *sa = device.as<Solid::StorageAccess>();
// only unmounted devices
if (!sa->isAccessible()) {
// get filesystem
QString filesystem = sv->fsType();
// dbus-connection
QDBusConnection c = QDBusConnection::systemBus();
QDBusMessage msg = QDBusMessage::createMethodCall("org.freedesktop.Hal", name, "org.freedesktop.Hal.Device.Volume", "Mount");
QStringList options;
// Get mount options for device
//options = getMountOptions(name);
options = m_deviceOptions.getMountOptions(name);
// mount device
msg << "" << "" << options;
c.call(msg);
}
}
}
}
void DeviceNotifier::onSourceRemoved(const QString &name)
{
m_solidEngine->disconnectSource(name, this);
m_solidDeviceEngine->disconnectSource(name, this);
m_dialog->removeDevice(name);
removeLastDeviceNotification(name);
}
QString DeviceNotifier::getStartOptions(const QString &udi)
{
QString commandString = "";
if (udi == "/org/freedesktop/Hal/devices/volume_uuid_4706_4E11")
{
commandString = "kioclient exec %f";
}
return commandString;
}
#include "devicenotifier_automount.moc"
/***************************************************************************
* Copyright (C) 2007 by Alexis Ménard <darktears31@gmail.com> *
* Copyright (C) 2009 by Achim Strobelt <mail@achimstrobelt.de> *
* *
* 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., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
#ifndef DEVICENOTIFIER_H
#define DEVICENOTIFIER_H
//Solid
#include <solid/solidnamespace.h>
//Plasma
#include <Plasma/PopupApplet>
#include <Plasma/DataEngine>
#include <Plasma/ToolTipManager>
// User interface
#include "ui_devicenotifier_automountConfig.h"
#include "ui_devicenotifier_mountOptionsConfig.h"
#include "deviceoptions.h"
class QStandardItemModel;
class QGraphicsLinearLayout;
class QGraphicsProxyWidget;
class QTimer;
class KIcon;
namespace Notifier
{
class NotifierDialog;
}
//desktop view
namespace Plasma
{
class IconWidget;
}
/**
* @short Applet used to display hot plug devices
*
*/
class DeviceNotifier : public Plasma::PopupApplet
{
Q_OBJECT
public:
/**
* Constructor of the applet
* @param parent the parent of this object
**/
DeviceNotifier(QObject *parent, const QVariantList &args);
/**
* Default destructor
**/
~DeviceNotifier();
/**
* initialize the applet (called by plasma automatically)
**/
void init();
/**
* allow to change the icon of the notifier if this applet is in icon mode
**/
void changeNotifierIcon(const QString& name = QString());
/**
* The widget that displays the list of devices.
*/
QWidget *widget();
/**
* @internal get starting options for device
*/
QString getStartOptions(const QString &udi);
/**
* @internal mount device
*/
void mountDevice(const QString &name);
protected:
void popupEvent(bool show);
/**
* Configuration interface
*/
void createConfigurationInterface(KConfigDialog *parent);
public slots:
/**
* @internal Sets the tooltip content properly before showing.
*/
void toolTipAboutToShow();
/**
* @internal Clears memory when needed.
*/
void toolTipHidden();
protected slots:
/**
* slot called when a source/device is added in the hotplug engine
* @param name the name of the new source
**/
void onSourceAdded(const QString &name);
/**
* @internal slot called when a source/device is removed in the hotplug engine
* @param name the name of the removed source
**/
void onSourceRemoved(const QString &name);
/**
* slot called when a source of the hotplug engine is updated
* @param source the name of the source
* @param data the data of the source
**/
void dataUpdated(const QString &source, Plasma::DataEngine::Data data);
/**
* @internal slot called when the configuration dialog is accepted
**/
void configAccepted();
/**
* @internal slot called when the configuration dialog is rejected
**/
void configRejected();
/**
* @internal slot called when a filesystem is added to the mountoptions list
**/
void mountOptionsFsAdded();
/**
* @internal slot called when a filesystem is removed from the mountoptions list
**/
void mountOptionsFsRemoved();
/**
* @internal slot called when the configuration of a filesystem is called
**/
void mountOptionsFsEdit();
private:
/**
* @internal Used to fill the notifier from previous plugged devices
**/
void fillPreviousDevices();
/**
* @internal Used to popup the device view.
*/
void notifyDevice(const QString &name);
/**
* @internal Used to remove the last device notification.
*/
void removeLastDeviceNotification(const QString &name);
/// Is automount enabled?
bool m_mountDevice;
///the engine used to get hot plug devices
Plasma::DataEngine *m_solidEngine;
///The engine used to manage devices in the applet (unmount,...)
Plasma::DataEngine *m_solidDeviceEngine;
///the icon used when the applet is in the taskbar
Plasma::IconWidget *m_icon;
///default icon of the notifier
QString m_iconName;
///The dialog where devices are displayed
Notifier::NotifierDialog * m_dialog;
///the time durin when the dialog will be show
int m_displayTime;
///the number of items displayed in the dialog
int m_numberItems;
///the time during when the item will be displayed
int m_itemsValidity;
///the timer for different use cases
QTimer *m_timer;
///bool to know if notifications are enabled
bool isNotificationEnabled;
///last plugged udi
QList<QString> m_lastPlugged;
///true if fillPreviousDevices is running
bool m_fillingPreviousDevices;
/// Designer Config file
Ui::devicenotifierConfig configUi;
Ui::mountOptionsConfig mountConfigUi;
///device options
DeviceOptions m_deviceOptions;
};
#endif
<ui version="4.0" >
<class>devicenotifierConfig</class>
<widget class="QWidget" name="devicenotifierConfig" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
<widget class="QCheckBox" name="automountCheckbox" >
<property name="text" >
<string>Mount devices automatically</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>mountOptionsConfig</class>
<widget class="QWidget" name="mountOptionsConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>482</width>
<height>562</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="fsTab">
<attribute name="title">
<string>fsTab</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" rowspan="2">
<widget class="QListWidget" name="fsAddList">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="fsAddButton">
<property name="text">
<string>fsAddButton</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>209</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" rowspan="3">
<widget class="QListWidget" name="fsSaveList">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="fsRemoveButton">
<property name="text">
<string>fsRemoveButton</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="fsEditButton">
<property name="text">
<string>fsEditButton</string>
</property>
</widget>
</item>
<item row="4" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="devicesTab">
<attribute name="title">
<string>Devices</string>
</attribute>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
/***************************************************************************
* Copyright (C) 2009 by Achim Strobelt <mail@achimstrobelt.de> *
* *
* 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., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
#include "deviceoptions.h"
#include <KDebug>
#include <KConfig>
#include <KConfigGroup>
//solid
#include <solid/device.h>
#include <solid/storagedrive.h>
#include <solid/opticaldisc.h>
#include <solid/storageaccess.h>
#include <solid/opticaldrive.h>
// getuid
#include <unistd.h>
DeviceOptions::DeviceOptions(void)
{
loadOptions();
}
DeviceOptions::~DeviceOptions(void)
{
}
void DeviceOptions::setFsOptions(const QString& filesystem, const QStringList& fsOptions)
{
kDebug() << "setFsOptions: " + filesystem;
// Check if filesystem already has settings
int index = -1;
for (int i = 0; i < fsSettings.size(); ++i) {
if (fsSettings.at(i).first() == filesystem) {
index = i;
}
}
// Prepare settings to store
QStringList tempOptions = fsOptions;
tempOptions.prepend(filesystem);
// Store settings
if (index >= 0) {
fsSettings.replace(index, tempOptions);
kDebug() << "Changed " + filesystem;
} else {
fsSettings.append(tempOptions);
kDebug() << "Added " + filesystem;
}
}
void DeviceOptions::removeFsOptions(const QString& filesystem)
{
kDebug() << "removeFsOptions: " + filesystem;
int index = -1;
for (int i = 0; i < fsSettings.size(); ++i) {
if (fsSettings.at(i).first() == filesystem) {
index = i;
}
}
// remove filesystem
fsSettings.removeAt(index);
}
QStringList DeviceOptions::getFsOptions(const QString& filesystem)
{
QStringList returnList;
// search filesystem
for (int i = 0; i < fsSettings.size(); ++i) {
if (fsSettings.at(i).first() == filesystem) {
returnList = fsSettings.value(i);
returnList.removeFirst();
}
}
return returnList;
}
QStringList DeviceOptions::getMountOptions(const QString& udi)
{
QStringList returnList;
// get filesystem
QString filesystem;
Solid::Device device = Solid::Device(udi);
if (device.is<Solid::StorageVolume>()) {
Solid::StorageVolume *sv = device.as<Solid::StorageVolume>();
filesystem = sv->fsType();
} else {
filesystem = "ERROR_NO_STORAGE_DEVICE";
kDebug() << filesystem;
}
// search options for filesystem
for (int i = 0; i < fsSettings.size(); ++i) {
if (fsSettings.at(i).first() == filesystem) {
returnList = fsSettings.value(i);
returnList.removeFirst();
}
}
// TODO: search device specific options
// process internal commands
if (returnList.contains("setUid=true")) {
returnList.removeAll("setUid=true");
returnList << "uid=" + QString::number(getuid());
}
if (returnList.contains("setNoexec=true")) {
returnList.removeAll("setNoexec=true");
returnList << "noexec";
}
return returnList;
}
void DeviceOptions::saveOptions(void)
{
kDebug() << "Save options";
KConfig config("automountoptionsrc");
KConfigGroup deviceConfig = config.group("Devices");
deviceConfig.writeEntry("Filesystems", getFilesystems());
foreach (const QString &filesystem, getFilesystems()) {
deviceConfig.writeEntry(filesystem, getFsOptions(filesystem));
}
config.sync();
}
void DeviceOptions::loadOptions(void)
{
kDebug() << "Read Options";
// Delete options
fsSettings.clear();
// Read options
KConfig config("automountoptionsrc", KConfig::FullConfig);
KConfigGroup deviceConfig = config.group("Devices");
QStringList filesystems = deviceConfig.readEntry("Filesystems", QStringList());
foreach (const QString &filesystem, filesystems) {
QStringList fsOptions = deviceConfig.readEntry(filesystem, QStringList());
setFsOptions(filesystem, fsOptions);
}
}
QStringList DeviceOptions::getFilesystems(void)
{
QStringList returnList;
// Get all filesystems
for (int i = 0; i < fsSettings.size(); ++i) {
returnList << fsSettings.at(i).first();
}
return returnList;
}
#include "deviceoptions.moc"
/***************************************************************************
* Copyright (C) 2009 by Achim Strobelt <mail@achimstrobelt.de> *
* *
* 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., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
#ifndef DEVICEOPTIONS_H
#define DEVICEOPTIONS_H
#include <QObject>
#include <KStandardDirs>
class DeviceOptions : public QObject
{
Q_OBJECT
private:
QList<QStringList> fsSettings;
public:
/**
* Constructor of the deviceoptions object
**/
DeviceOptions(void);
/**
* Default destructor
**/
~DeviceOptions(void);
/**
* Get options for filesystem
* @param filesystem: get options for specific filesystem
**/
QStringList getFsOptions(const QString& filesystem);
/**
* Set options for filesystem
* @param filesystem: set options for specific filesystem
* @param fsOptions: new options
**/
void setFsOptions(const QString& filesystem, const QStringList& fsOptions);
/**
* Remove options for filesystem
* @param filesystem: filesystem to remove
**/
void removeFsOptions(const QString& filesystem);
/**
* Get mountoptions for device
* @param udi: device identifier
**/
QStringList getMountOptions(const QString& udi);
/**
* Save options
**/
void saveOptions(void);
/**
* Load options
**/
void loadOptions(void);
/**
* Get filesystems
**/
QStringList getFilesystems(void);
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment