diff --git a/sources/.idea/dictionaries/arcanis.xml b/sources/.idea/dictionaries/arcanis.xml new file mode 100644 index 0000000..ce2c16d --- /dev/null +++ b/sources/.idea/dictionaries/arcanis.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/sources/.idea/misc.xml b/sources/.idea/misc.xml index 9601a91..65cf83d 100644 --- a/sources/.idea/misc.xml +++ b/sources/.idea/misc.xml @@ -1,6 +1,40 @@ - + + + + + + + + + + C/C++ + + + Data flow analysisC/C++ + + + Declaration orderC/C++ + + + FunctionsC/C++ + + + GeneralC/C++ + + + Type checksC/C++ + + + + + Internationalization issues + + + + + @@ -12,4 +46,19 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/sources/.idea/sources.iml b/sources/.idea/sources.iml index bf5769c..fa1fc54 100644 --- a/sources/.idea/sources.iml +++ b/sources/.idea/sources.iml @@ -1,20 +1,20 @@ - - + + - - + + - - + + - - + + - - + + @@ -31,6 +31,8 @@ + + @@ -115,5 +117,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sources/.idea/vcs.xml b/sources/.idea/vcs.xml index 320b995..6c0b863 100644 --- a/sources/.idea/vcs.xml +++ b/sources/.idea/vcs.xml @@ -1,10 +1,6 @@ - - - - \ No newline at end of file diff --git a/sources/.idea/workspace.xml b/sources/.idea/workspace.xml index 94aa0b9..319fa3b 100644 --- a/sources/.idea/workspace.xml +++ b/sources/.idea/workspace.xml @@ -14,13 +14,47 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + + + - - + + - - + + + + + + + + + + + + + + @@ -62,10 +110,16 @@ + + @@ -77,10 +131,10 @@ - @@ -89,7 +143,7 @@ - + @@ -137,6 +191,24 @@ + + + - + - + - + @@ -235,7 +388,7 @@ - + @@ -254,34 +407,34 @@ - - 1444961890223 + + 1445013689481 - + - + - - + + - - + + @@ -302,13 +455,39 @@ - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -316,26 +495,30 @@ - + - - + + + + - + - - + + + + - + - - + + diff --git a/sources/awesome-widget/package/contents/ui/about.qml b/sources/awesome-widget/package/contents/ui/about.qml index e16930e..0440de8 100644 --- a/sources/awesome-widget/package/contents/ui/about.qml +++ b/sources/awesome-widget/package/contents/ui/about.qml @@ -25,7 +25,7 @@ import org.kde.plasma.private.awesomewidget 1.0 Item { id: aboutPage AWActions { - id: awActions; + id: awActions } width: childrenRect.width diff --git a/sources/awesome-widget/package/contents/ui/advanced.qml b/sources/awesome-widget/package/contents/ui/advanced.qml index 67f3abe..1ec7ba6 100644 --- a/sources/awesome-widget/package/contents/ui/advanced.qml +++ b/sources/awesome-widget/package/contents/ui/advanced.qml @@ -25,7 +25,10 @@ Item { id: advancedPage // backend AWActions { - id: awActions; + id: awActions + } + AWConfigHelper { + id: awConfig } width: childrenRect.width @@ -368,7 +371,7 @@ Item { QtControls.Button { width: parent.width * 3 / 5 text: i18n("Export configuration") - onClicked: awActions.exportConfiguration(plasmoid.configuration) + onClicked: awConfig.exportConfiguration(plasmoid.configuration) } } @@ -383,7 +386,10 @@ Item { width: parent.width * 3 / 5 text: i18n("Import configuration") onClicked: { - console.log(awActions.importConfiguration()) + if (debug) console.debug() + var importConfig = awConfig.importConfiguration() + for (var key in importConfig) + plasmoid.configuration[key] = importConfig[key] } } } diff --git a/sources/awesome-widget/package/contents/ui/appearance.qml b/sources/awesome-widget/package/contents/ui/appearance.qml index 9fcf912..c0bf432 100644 --- a/sources/awesome-widget/package/contents/ui/appearance.qml +++ b/sources/awesome-widget/package/contents/ui/appearance.qml @@ -27,7 +27,7 @@ Item { id: appearancePage // backend AWActions { - id: awActions; + id: awActions } width: childrenRect.width diff --git a/sources/awesome-widget/package/contents/ui/dataengine.qml b/sources/awesome-widget/package/contents/ui/dataengine.qml index be40f4a..0370cc2 100644 --- a/sources/awesome-widget/package/contents/ui/dataengine.qml +++ b/sources/awesome-widget/package/contents/ui/dataengine.qml @@ -26,10 +26,13 @@ Item { id: dataenginePage // backend AWKeys { - id: awKeys; + id: awKeys } AWActions { - id: awActions; + id: awActions + } + AWConfigHelper { + id: awConfig } width: childrenRect.width @@ -39,7 +42,7 @@ Item { property bool debug: awActions.isDebugEnabled() - property variant cfg_dataengine: awActions.readDataEngineConfiguration() + property variant cfg_dataengine: awConfig.readDataEngineConfiguration() Column { @@ -354,6 +357,6 @@ Item { cfg_dataengine["HDDDEV"] = hdd.currentText cfg_dataengine["PLAYER"] = player.currentText cfg_dataengine["MPRIS"] = mpris.currentText - awActions.writeDataEngineConfiguration(cfg_dataengine) + awConfig.writeDataEngineConfiguration(cfg_dataengine) } } diff --git a/sources/awesome-widget/package/contents/ui/main.qml b/sources/awesome-widget/package/contents/ui/main.qml index 1277088..23e9690 100644 --- a/sources/awesome-widget/package/contents/ui/main.qml +++ b/sources/awesome-widget/package/contents/ui/main.qml @@ -31,10 +31,10 @@ Item { id: main // backend AWKeys { - id: awKeys; + id: awKeys } AWActions { - id: awActions; + id: awActions } property bool debug: awActions.isDebugEnabled() diff --git a/sources/awesome-widget/package/contents/ui/tooltip.qml b/sources/awesome-widget/package/contents/ui/tooltip.qml index 6589c1d..15b68f4 100644 --- a/sources/awesome-widget/package/contents/ui/tooltip.qml +++ b/sources/awesome-widget/package/contents/ui/tooltip.qml @@ -27,7 +27,7 @@ Item { id: tooltipPage // backend AWActions { - id: awActions; + id: awActions } width: childrenRect.width diff --git a/sources/awesome-widget/package/contents/ui/widget.qml b/sources/awesome-widget/package/contents/ui/widget.qml index 7f4c79a..2787c5e 100644 --- a/sources/awesome-widget/package/contents/ui/widget.qml +++ b/sources/awesome-widget/package/contents/ui/widget.qml @@ -26,10 +26,10 @@ Item { id: widgetPage // backend AWKeys { - id: awKeys; + id: awKeys } AWActions { - id: awActions; + id: awActions } width: childrenRect.width diff --git a/sources/awesome-widget/plugin/awactions.cpp b/sources/awesome-widget/plugin/awactions.cpp index d36bb6f..f21af3d 100644 --- a/sources/awesome-widget/plugin/awactions.cpp +++ b/sources/awesome-widget/plugin/awactions.cpp @@ -20,10 +20,7 @@ #include #include -#include #include -#include -#include #include #include #include @@ -32,10 +29,7 @@ #include #include #include -#include -#include #include -#include #include @@ -73,17 +67,6 @@ void AWActions::checkUpdates(const bool showAnyway) } -bool AWActions::dropCache() const -{ - qCDebug(LOG_AW); - - QString fileName = QString("%1/awesomewidgets.ndx"). - arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)); - - return QFile(fileName).remove(); -} - - // HACK: since QML could not use QLoggingCategory I need this hack bool AWActions::isDebugEnabled() const { @@ -113,78 +96,6 @@ void AWActions::showReadme() const } -void AWActions::exportConfiguration(QObject *nativeConfig) const -{ - qCDebug(LOG_AW); - - // get file path and init settings object - QString fileName = QFileDialog::getSaveFileName(nullptr, i18n("Export")); - if (fileName.isEmpty()) - return; - qCInfo(LOG_AW) << "Selected filename" << fileName; - QSettings settings(fileName, QSettings::IniFormat); - // additional parameters - QString baseDir = QString("%1/awesomewidgets"). - arg(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)); - QStringList dirs = QStringList() << QString("desktops") << QString("quotes") - << QString("scripts") << QString("upgrade") << QString("weather"); - - // plasmoid configuration - QQmlPropertyMap *configuration = static_cast(nativeConfig); - settings.beginGroup(QString("plasmoid")); - foreach(QString key, configuration->keys()) { - QVariant value = configuration->value(key); - if (!value.isValid()) - continue; - settings.setValue(key, value); - } - settings.endGroup(); - - // extenstions - foreach(QString item, dirs) { - QStringList items = QDir(QString("%1/%2").arg(baseDir).arg(item)).entryList( - QStringList() << QString("*.desktop"), QDir::Files); - settings.beginGroup(item); - foreach(QString it, items) { - qCInfo(LOG_AW) << "Processing file" << it; - settings.beginGroup(it); - QSettings itemSettings(QString("%1/%2/%3").arg(baseDir).arg(item).arg(it), QSettings::IniFormat); - itemSettings.beginGroup(QString("Desktop Entry")); - foreach(QString key, itemSettings.childKeys()) - settings.setValue(key, itemSettings.value(key)); - itemSettings.endGroup(); - settings.endGroup(); - } - settings.endGroup(); - } - - // additional files - settings.beginGroup(QString("json")); - // script filters - QFile filterFile(QString("%1/scripts/awesomewidgets-extscripts-filters.json").arg(baseDir)); - if (filterFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - QString filterText = filterFile.readAll(); - filterFile.close(); - settings.setValue(QString("filters"), filterText); - } else { - qCWarning(LOG_LIB) << "Could not open" << filterFile.fileName(); - } - // weather icon settings - QFile weatherIdFile(QString("%1/weather/awesomewidgets-extweather-ids.json").arg(baseDir)); - if (weatherIdFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - QString weatherIdText = weatherIdFile.readAll(); - weatherIdFile.close(); - settings.setValue(QString("weathers"), weatherIdText); - } else { - qCWarning(LOG_LIB) << "Could not open" << weatherIdFile.fileName(); - } - settings.endGroup(); - - // sync settings - settings.sync(); -} - - // HACK: this method uses variables from version.h QString AWActions::getAboutText(const QString type) const { @@ -247,166 +158,6 @@ QVariantMap AWActions::getFont(const QVariantMap defaultFont) const } -QQmlPropertyMap* AWActions::importConfiguration() const -{ - qCDebug(LOG_AW); - - QQmlPropertyMap *configuration = new QQmlPropertyMap(); - // get file path and init settings object - QString fileName = QFileDialog::getOpenFileName(nullptr, i18n("Import")); - if (fileName.isEmpty()) - return configuration; - qCInfo(LOG_AW) << "Selected filename" << fileName; - QSettings settings(fileName, QSettings::IniFormat); - // additional parameters - QString baseDir = QString("%1/awesomewidgets"). - arg(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)); - QStringList dirs = QStringList() << QString("desktops") << QString("quotes") - << QString("scripts") << QString("upgrade") << QString("weather"); - - // check what should be exported - QDialog *dialog = new QDialog(nullptr); - QCheckBox *importPlasmoidSettings = new QCheckBox(i18n("Import plasmoid settings"), dialog); - QCheckBox *importExtensionsSettings = new QCheckBox(i18n("Import extenstions"), dialog); - QCheckBox *importAddsSettings = new QCheckBox(i18n("Import additional files"), dialog); - QDialogButtonBox *dialogButtons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, - Qt::Horizontal, dialog); - QVBoxLayout *layout = new QVBoxLayout(dialog); - layout->addWidget(importPlasmoidSettings); - layout->addWidget(importExtensionsSettings); - layout->addWidget(importAddsSettings); - layout->addWidget(dialogButtons); - connect(dialogButtons, SIGNAL(accepted()), dialog, SLOT(accept())); - connect(dialogButtons, SIGNAL(rejected()), dialog, SLOT(reject())); - // get parameters - bool importPlasmoid = false; - bool importExtensions = false; - bool importAdds = false; - switch(int ret = dialog->exec()) { - case QDialog::Accepted: - importPlasmoid = importPlasmoidSettings->isChecked(); - importExtensions = importExtensionsSettings->isChecked(); - importAdds = importAddsSettings->isChecked(); - break; - case QDialog::Rejected: - default: - break; - } - dialog->deleteLater(); - - // extenstions - if (importExtensions) { - foreach(QString item, dirs) { - settings.beginGroup(item); - qDebug() << settings.childGroups(); - foreach(QString it, settings.childGroups()) { - qCInfo(LOG_AW) << "Processing file" << it; - settings.beginGroup(it); - QSettings itemSettings(QString("%1/%2/%3").arg(baseDir).arg(item).arg(it), QSettings::IniFormat); - itemSettings.beginGroup(QString("Desktop Entry")); - foreach(QString key, settings.childKeys()) - itemSettings.setValue(key, settings.value(key)); - itemSettings.endGroup(); - itemSettings.sync(); - settings.endGroup(); - } - settings.endGroup(); - } - } - - // additional files - if (importAdds) { - settings.beginGroup(QString("json")); - // script filters - if (settings.contains(QString("filters"))) { - QFile filterFile(QString("%1/scripts/awesomewidgets-extscripts-filters.json").arg(baseDir)); - if (filterFile.open(QIODevice::WriteOnly | QIODevice::Text)) { - QDataStream out(&filterFile); - out << settings.value(QString("filters")).toString(); - filterFile.close(); - } else { - qCWarning(LOG_LIB) << "Could not open" << filterFile.fileName(); - } - } - // weather icon settings - if (settings.contains(QString("weathers"))) { - QFile weatherIdFile(QString("%1/weather/awesomewidgets-extweather-ids.json").arg(baseDir)); - if (weatherIdFile.open(QIODevice::WriteOnly | QIODevice::Text)) { - QDataStream out(&weatherIdFile); - out << settings.value(QString("weathers")).toString(); - weatherIdFile.close(); - } else { - qCWarning(LOG_LIB) << "Could not open" << weatherIdFile.fileName(); - } - } - settings.endGroup(); - } - - // plasmoid configuration - if (importPlasmoid) { - settings.beginGroup(QString("plasmoid")); - foreach(QString key, settings.childKeys()) - configuration->insert(key, settings.value(key)); - configuration->insert(QString("valid"), true); - settings.endGroup(); - } - - return configuration; -} - - -QVariantMap AWActions::readDataEngineConfiguration() const -{ - qCDebug(LOG_AW); - - QString fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation, - QString("plasma-dataengine-extsysmon.conf")); - qCInfo(LOG_AW) << "Configuration file" << fileName; - QSettings settings(fileName, QSettings::IniFormat); - QVariantMap configuration; - - settings.beginGroup(QString("Configuration")); - configuration[QString("ACPIPATH")] = settings.value(QString("ACPIPATH"), QString("/sys/class/power_supply/")); - configuration[QString("GPUDEV")] = settings.value(QString("GPUDEV"), QString("auto")); - configuration[QString("HDDDEV")] = settings.value(QString("HDDDEV"), QString("all")); - configuration[QString("HDDTEMPCMD")] = settings.value(QString("HDDTEMPCMD"), QString("sudo smartctl -a")); - configuration[QString("MPDADDRESS")] = settings.value(QString("MPDADDRESS"), QString("localhost")); - configuration[QString("MPDPORT")] = settings.value(QString("MPDPORT"), QString("6600")); - configuration[QString("MPRIS")] = settings.value(QString("MPRIS"), QString("auto")); - configuration[QString("PLAYER")] = settings.value(QString("PLAYER"), QString("mpris")); - configuration[QString("PLAYERSYMBOLS")] = settings.value(QString("PLAYERSYMBOLS"), QString("10")); - settings.endGroup(); - - qCInfo(LOG_AW) << "Configuration" << configuration; - - return configuration; -} - - -void AWActions::writeDataEngineConfiguration(const QVariantMap configuration) const -{ - qCDebug(LOG_AW); - - QString fileName = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) - + QString("/plasma-dataengine-extsysmon.conf"); - QSettings settings(fileName, QSettings::IniFormat); - qCInfo(LOG_AW) << "Configuration file" << settings.fileName(); - - settings.beginGroup(QString("Configuration")); - settings.setValue(QString("ACPIPATH"), configuration[QString("ACPIPATH")]); - settings.setValue(QString("GPUDEV"), configuration[QString("GPUDEV")]); - settings.setValue(QString("HDDDEV"), configuration[QString("HDDDEV")]); - settings.setValue(QString("HDDTEMPCMD"), configuration[QString("HDDTEMPCMD")]); - settings.setValue(QString("MPDADDRESS"), configuration[QString("MPDADDRESS")]); - settings.setValue(QString("MPDPORT"), configuration[QString("MPDPORT")]); - settings.setValue(QString("MPRIS"), configuration[QString("MPRIS")]); - settings.setValue(QString("PLAYER"), configuration[QString("PLAYER")]); - settings.setValue(QString("PLAYERSYMBOLS"), configuration[QString("PLAYERSYMBOLS")]); - settings.endGroup(); - - settings.sync(); -} - // to avoid additional object definition this method is static void AWActions::sendNotification(const QString eventId, const QString message) diff --git a/sources/awesome-widget/plugin/awactions.h b/sources/awesome-widget/plugin/awactions.h index 0ff0910..1c60f8d 100644 --- a/sources/awesome-widget/plugin/awactions.h +++ b/sources/awesome-widget/plugin/awactions.h @@ -23,7 +23,6 @@ class QNetworkReply; -class QQmlPropertyMap; class AWActions : public QObject { @@ -33,18 +32,12 @@ public: explicit AWActions(QObject *parent = nullptr); virtual ~AWActions(); Q_INVOKABLE void checkUpdates(const bool showAnyway = false); - Q_INVOKABLE bool dropCache() const; Q_INVOKABLE bool isDebugEnabled() const; Q_INVOKABLE bool runCmd(const QString cmd = QString("/usr/bin/true")) const; Q_INVOKABLE void showReadme() const; // configuration slots - Q_INVOKABLE void exportConfiguration(QObject *nativeConfig) const; Q_INVOKABLE QString getAboutText(const QString type = QString("header")) const; Q_INVOKABLE QVariantMap getFont(const QVariantMap defaultFont) const; - Q_INVOKABLE QQmlPropertyMap *importConfiguration() const; - // dataengine - Q_INVOKABLE QVariantMap readDataEngineConfiguration() const; - Q_INVOKABLE void writeDataEngineConfiguration(const QVariantMap configuration) const; public slots: Q_INVOKABLE static void sendNotification(const QString eventId, const QString message); diff --git a/sources/awesome-widget/plugin/awconfighelper.cpp b/sources/awesome-widget/plugin/awconfighelper.cpp new file mode 100644 index 0000000..c80225d --- /dev/null +++ b/sources/awesome-widget/plugin/awconfighelper.cpp @@ -0,0 +1,312 @@ +/*************************************************************************** + * This file is part of awesome-widgets * + * * + * awesome-widgets 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 3 of the * + * License, or (at your option) any later version. * + * * + * awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + +#include "awconfighelper.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "awdebug.h" + + +AWConfigHelper::AWConfigHelper(QObject *parent) + : QObject(parent) +{ + qCDebug(LOG_AW); +} + + +AWConfigHelper::~AWConfigHelper() +{ + qCDebug(LOG_AW); +} + + +bool AWConfigHelper::dropCache() const +{ + qCDebug(LOG_AW); + + QString fileName = QString("%1/awesomewidgets.ndx"). + arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)); + + return QFile(fileName).remove(); +} + + +void AWConfigHelper::exportConfiguration(QObject *nativeConfig) const +{ + qCDebug(LOG_AW); + + // get file path and init settings object + QString fileName = QFileDialog::getSaveFileName(nullptr, i18n("Export")); + if (fileName.isEmpty()) + return; + qCInfo(LOG_AW) << "Selected filename" << fileName; + QSettings settings(fileName, QSettings::IniFormat); + + // plasmoid configuration + QQmlPropertyMap *configuration = static_cast(nativeConfig); + settings.beginGroup(QString("plasmoid")); + foreach(QString key, configuration->keys()) { + QVariant value = configuration->value(key); + if (!value.isValid()) + continue; + settings.setValue(key, value); + } + settings.endGroup(); + + // extenstions + foreach(QString item, m_dirs) { + QStringList items = QDir(QString("%1/%2").arg(m_baseDir).arg(item)).entryList( + QStringList() << QString("*.desktop"), QDir::Files); + settings.beginGroup(item); + foreach(QString it, items) + copyExtensions(it, item, settings, false); + settings.endGroup(); + } + + // additional files + settings.beginGroup(QString("json")); + // script filters + readFile(settings, QString("filters"), + QString("%1/scripts/awesomewidgets-extscripts-filters.json").arg(m_baseDir)); + // weather icon settings + readFile(settings, QString("weathers"), + QString("%1/weather/awesomewidgets-extweather-ids.json").arg(m_baseDir)); + settings.endGroup(); + + // sync settings + settings.sync(); +} + + +QVariantMap AWConfigHelper::importConfiguration() const +{ + qCDebug(LOG_AW); + + QVariantMap configuration; + // get file path and init settings object + QString fileName = QFileDialog::getOpenFileName(nullptr, i18n("Import")); + if (fileName.isEmpty()) + return configuration; + qCInfo(LOG_AW) << "Selected filename" << fileName; + QSettings settings(fileName, QSettings::IniFormat); + QHash selection = selectImport(); + + // extenstions + if (selection[QString("extenstions")]) { + foreach(QString item, m_dirs) { + settings.beginGroup(item); + foreach(QString it, settings.childGroups()) + copyExtensions(it, item, settings, true); + settings.endGroup(); + } + } + + // additional files + if (selection[QString("adds")]) { + settings.beginGroup(QString("json")); + // script filters + writeFile(settings, QString("filters"), + QString("%1/scripts/awesomewidgets-extscripts-filters.json").arg(m_baseDir)); + // weather icon settings + writeFile(settings, QString("weathers"), + QString("%1/weather/awesomewidgets-extweather-ids.json").arg(m_baseDir)); + settings.endGroup(); + } + + // plasmoid configuration + if (selection[QString("plasmoid")]) { + settings.beginGroup(QString("plasmoid")); + foreach(QString key, settings.childKeys()) + configuration[key] = settings.value(key); + settings.endGroup(); + } + + return configuration; +} + + +QVariantMap AWConfigHelper::readDataEngineConfiguration() const +{ + qCDebug(LOG_AW); + + QString fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation, + QString("plasma-dataengine-extsysmon.conf")); + qCInfo(LOG_AW) << "Configuration file" << fileName; + QSettings settings(fileName, QSettings::IniFormat); + QVariantMap configuration; + + settings.beginGroup(QString("Configuration")); + configuration[QString("ACPIPATH")] = settings.value(QString("ACPIPATH"), QString("/sys/class/power_supply/")); + configuration[QString("GPUDEV")] = settings.value(QString("GPUDEV"), QString("auto")); + configuration[QString("HDDDEV")] = settings.value(QString("HDDDEV"), QString("all")); + configuration[QString("HDDTEMPCMD")] = settings.value(QString("HDDTEMPCMD"), QString("sudo smartctl -a")); + configuration[QString("MPDADDRESS")] = settings.value(QString("MPDADDRESS"), QString("localhost")); + configuration[QString("MPDPORT")] = settings.value(QString("MPDPORT"), QString("6600")); + configuration[QString("MPRIS")] = settings.value(QString("MPRIS"), QString("auto")); + configuration[QString("PLAYER")] = settings.value(QString("PLAYER"), QString("mpris")); + configuration[QString("PLAYERSYMBOLS")] = settings.value(QString("PLAYERSYMBOLS"), QString("10")); + settings.endGroup(); + + qCInfo(LOG_AW) << "Configuration" << configuration; + + return configuration; +} + + +void AWConfigHelper::writeDataEngineConfiguration(const QVariantMap configuration) const +{ + qCDebug(LOG_AW); + + QString fileName = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + + QString("/plasma-dataengine-extsysmon.conf"); + QSettings settings(fileName, QSettings::IniFormat); + qCInfo(LOG_AW) << "Configuration file" << settings.fileName(); + + settings.beginGroup(QString("Configuration")); + settings.setValue(QString("ACPIPATH"), configuration[QString("ACPIPATH")]); + settings.setValue(QString("GPUDEV"), configuration[QString("GPUDEV")]); + settings.setValue(QString("HDDDEV"), configuration[QString("HDDDEV")]); + settings.setValue(QString("HDDTEMPCMD"), configuration[QString("HDDTEMPCMD")]); + settings.setValue(QString("MPDADDRESS"), configuration[QString("MPDADDRESS")]); + settings.setValue(QString("MPDPORT"), configuration[QString("MPDPORT")]); + settings.setValue(QString("MPRIS"), configuration[QString("MPRIS")]); + settings.setValue(QString("PLAYER"), configuration[QString("PLAYER")]); + settings.setValue(QString("PLAYERSYMBOLS"), configuration[QString("PLAYERSYMBOLS")]); + settings.endGroup(); + + settings.sync(); +} + + +void AWConfigHelper::copyExtensions(const QString item, const QString type, + QSettings &settings, const bool inverse) const +{ + qCDebug(LOG_AW); + qCDebug(LOG_AW) << "Extension" << item; + qCDebug(LOG_AW) << "Type" << type; + qCDebug(LOG_AW) << "Inverse" << inverse; + + settings.beginGroup(item); + QSettings itemSettings(QString("%1/%2/%3").arg(m_baseDir).arg(type).arg(item), QSettings::IniFormat); + itemSettings.beginGroup(QString("Desktop Entry")); + if (inverse) + copySettings(settings, itemSettings); + else + copySettings(itemSettings, settings); + itemSettings.endGroup(); + settings.endGroup(); + + if (inverse) + itemSettings.sync(); +} + + +void AWConfigHelper::copySettings(QSettings &from, QSettings &to) const +{ + qCDebug(LOG_AW); + + foreach(QString key, from.childKeys()) + to.setValue(key, from.value(key)); +} + + +void AWConfigHelper::readFile(QSettings &settings, const QString key, const QString fileName) const +{ + qCDebug(LOG_AW); + qCDebug(LOG_AW) << "Key" << key; + qCDebug(LOG_AW) << "File" << fileName; + + QFile file(fileName); + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QString text = QTextCodec::codecForMib(106)->toUnicode(file.readAll()); + file.close(); + settings.setValue(key, text); + } else { + qCWarning(LOG_LIB) << "Could not open" << file.fileName(); + } +} + + +QHash AWConfigHelper::selectImport() const +{ + qCDebug(LOG_AW); + + QDialog *dialog = new QDialog(nullptr); + QCheckBox *importPlasmoidSettings = new QCheckBox(i18n("Import plasmoid settings"), dialog); + importPlasmoidSettings->setChecked(true); + QCheckBox *importExtensionsSettings = new QCheckBox(i18n("Import extenstions"), dialog); + importExtensionsSettings->setChecked(true); + QCheckBox *importAddsSettings = new QCheckBox(i18n("Import additional files"), dialog); + importAddsSettings->setChecked(true); + QDialogButtonBox *dialogButtons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, + Qt::Horizontal, dialog); + QVBoxLayout *layout = new QVBoxLayout(dialog); + layout->addWidget(importPlasmoidSettings); + layout->addWidget(importExtensionsSettings); + layout->addWidget(importAddsSettings); + layout->addWidget(dialogButtons); + connect(dialogButtons, SIGNAL(accepted()), dialog, SLOT(accept())); + connect(dialogButtons, SIGNAL(rejected()), dialog, SLOT(reject())); + + // get parameters + QHash import; + import[QString("plasmoid")] = false; + import[QString("extenstions")] = false; + import[QString("adds")] = false; + switch(int ret = dialog->exec()) { + case QDialog::Accepted: + import[QString("plasmoid")] = importPlasmoidSettings->isChecked(); + import[QString("extenstions")] = importExtensionsSettings->isChecked(); + import[QString("adds")] = importAddsSettings->isChecked(); + break; + case QDialog::Rejected: + default: + break; + } + dialog->deleteLater(); + + return import; +} + + +void AWConfigHelper::writeFile(QSettings &settings, const QString key, const QString fileName) const +{ + qCDebug(LOG_AW); + qCDebug(LOG_AW) << "Key" << key; + qCDebug(LOG_AW) << "File" << fileName; + + if (settings.contains(key)) { + QFile file(fileName); + if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QDataStream out(&file); + out << settings.value(key).toString().toUtf8(); + file.close(); + } else { + qCWarning(LOG_LIB) << "Could not open" << file.fileName(); + } + } +} diff --git a/sources/awesome-widget/plugin/awconfighelper.h b/sources/awesome-widget/plugin/awconfighelper.h new file mode 100644 index 0000000..62b40e9 --- /dev/null +++ b/sources/awesome-widget/plugin/awconfighelper.h @@ -0,0 +1,58 @@ +/*************************************************************************** + * This file is part of awesome-widgets * + * * + * awesome-widgets 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 3 of the * + * License, or (at your option) any later version. * + * * + * awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + + +#ifndef AWCONFIGHELPER_H +#define AWCONFIGHELPER_H + +#include +#include + + +class QSettings; + +class AWConfigHelper : public QObject +{ + Q_OBJECT + +public: + explicit AWConfigHelper(QObject *parent = nullptr); + virtual ~AWConfigHelper(); + Q_INVOKABLE bool dropCache() const; + Q_INVOKABLE void exportConfiguration(QObject *nativeConfig) const; + Q_INVOKABLE QVariantMap importConfiguration() const; + // dataengine + Q_INVOKABLE QVariantMap readDataEngineConfiguration() const; + Q_INVOKABLE void writeDataEngineConfiguration(const QVariantMap configuration) const; + +private: + // methods + void copyExtensions(const QString item, const QString type, + QSettings &settings, const bool inverse) const; + void copySettings(QSettings &from, QSettings &to) const; + void readFile(QSettings &settings, const QString key, const QString fileName) const; + QHash selectImport() const; + void writeFile(QSettings &settings, const QString key, const QString fileName) const; + // properties + QString m_baseDir = QString("%1/awesomewidgets"). + arg(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)); + QStringList m_dirs = QStringList() << QString("desktops") << QString("quotes") + << QString("scripts") << QString("upgrade") << QString("weather"); +}; + + +#endif /* AWCONFIGHELPER_H */ diff --git a/sources/awesome-widget/plugin/awesomewidget.cpp b/sources/awesome-widget/plugin/awesomewidget.cpp index f32cf97..f306bf2 100644 --- a/sources/awesome-widget/plugin/awesomewidget.cpp +++ b/sources/awesome-widget/plugin/awesomewidget.cpp @@ -20,6 +20,7 @@ #include #include "awactions.h" +#include "awconfighelper.h" #include "awkeys.h" @@ -28,5 +29,6 @@ void AWPlugin::registerTypes(const char *uri) Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.awesomewidget")); qmlRegisterType(uri, 1, 0, "AWActions"); + qmlRegisterType(uri, 1, 0, "AWConfigHelper"); qmlRegisterType(uri, 1, 0, "AWKeys"); } diff --git a/sources/desktop-panel/package/contents/ui/about.qml b/sources/desktop-panel/package/contents/ui/about.qml index 894678a..3b29952 100644 --- a/sources/desktop-panel/package/contents/ui/about.qml +++ b/sources/desktop-panel/package/contents/ui/about.qml @@ -26,7 +26,7 @@ Item { id: aboutPage // backend DPAdds { - id: dpAdds; + id: dpAdds } width: childrenRect.width diff --git a/sources/desktop-panel/package/contents/ui/activeapp.qml b/sources/desktop-panel/package/contents/ui/activeapp.qml index f57ac2c..64009c7 100644 --- a/sources/desktop-panel/package/contents/ui/activeapp.qml +++ b/sources/desktop-panel/package/contents/ui/activeapp.qml @@ -27,7 +27,7 @@ Item { id: activeAppearancePage // backend DPAdds { - id: dpAdds; + id: dpAdds } width: childrenRect.width diff --git a/sources/desktop-panel/package/contents/ui/advanced.qml b/sources/desktop-panel/package/contents/ui/advanced.qml index 037e901..684fd15 100644 --- a/sources/desktop-panel/package/contents/ui/advanced.qml +++ b/sources/desktop-panel/package/contents/ui/advanced.qml @@ -27,7 +27,7 @@ Item { id: advancedPage // backend DPAdds { - id: dpAdds; + id: dpAdds } width: childrenRect.width diff --git a/sources/desktop-panel/package/contents/ui/inactiveapp.qml b/sources/desktop-panel/package/contents/ui/inactiveapp.qml index 684c9b5..09ad20d 100644 --- a/sources/desktop-panel/package/contents/ui/inactiveapp.qml +++ b/sources/desktop-panel/package/contents/ui/inactiveapp.qml @@ -27,7 +27,7 @@ Item { id: inactiveAppearancePage // backend DPAdds { - id: dpAdds; + id: dpAdds } width: childrenRect.width diff --git a/sources/desktop-panel/package/contents/ui/main.qml b/sources/desktop-panel/package/contents/ui/main.qml index a84311f..684f05a 100644 --- a/sources/desktop-panel/package/contents/ui/main.qml +++ b/sources/desktop-panel/package/contents/ui/main.qml @@ -30,7 +30,7 @@ Item { id: main // backend DPAdds { - id: dpAdds; + id: dpAdds } property bool debug: dpAdds.isDebugEnabled() diff --git a/sources/desktop-panel/package/contents/ui/widget.qml b/sources/desktop-panel/package/contents/ui/widget.qml index eb5edd1..99b30a6 100644 --- a/sources/desktop-panel/package/contents/ui/widget.qml +++ b/sources/desktop-panel/package/contents/ui/widget.qml @@ -25,7 +25,7 @@ Item { id: widgetPage // backend DPAdds { - id: dpAdds; + id: dpAdds } width: childrenRect.width diff --git a/sources/translations/awesome-widgets.pot b/sources/translations/awesome-widgets.pot index 6e684e8..2bdedeb 100644 --- a/sources/translations/awesome-widgets.pot +++ b/sources/translations/awesome-widgets.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" -"POT-Creation-Date: 2015-09-21 20:49+0300\n" +"POT-Creation-Date: 2015-10-16 20:22+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -107,6 +107,12 @@ msgstr "" msgid "Drop key cache" msgstr "" +msgid "Export configuration" +msgstr "" + +msgid "Import configuration" +msgstr "" + msgid "Font" msgstr "" @@ -393,6 +399,21 @@ msgstr "" msgid "There are updates" msgstr "" +msgid "Export" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Import plasmoid settings" +msgstr "" + +msgid "Import extensions" +msgstr "" + +msgid "Import additional files" +msgstr "" + msgid "AC online" msgstr "" diff --git a/sources/translations/en.po b/sources/translations/en.po index b8a7f8e..d000ac6 100644 --- a/sources/translations/en.po +++ b/sources/translations/en.po @@ -6,16 +6,16 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" -"POT-Creation-Date: 2015-09-21 20:49+0300\n" -"PO-Revision-Date: 2015-09-21 10:26+0300\n" +"POT-Creation-Date: 2015-10-16 20:22+0300\n" +"PO-Revision-Date: 2015-10-16 20:22+0300\n" "Last-Translator: Evgeniy Alekseev \n" "Language-Team: English \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<" +"=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Lokalize 2.0\n" msgid "Widget" @@ -108,6 +108,12 @@ msgstr "AC offline tag" msgid "Drop key cache" msgstr "Drop key cache" +msgid "Export configuration" +msgstr "Export configuration" + +msgid "Import configuration" +msgstr "Import configuration" + msgid "Font" msgstr "Font" @@ -398,6 +404,21 @@ msgstr "Click \"Ok\" to download" msgid "There are updates" msgstr "There are updates" +msgid "Export" +msgstr "Export" + +msgid "Import" +msgstr "Import" + +msgid "Import plasmoid settings" +msgstr "Import plasmoid settings" + +msgid "Import extensions" +msgstr "Import extensions" + +msgid "Import additional files" +msgstr "Import additional files" + msgid "AC online" msgstr "AC online" @@ -750,9 +771,6 @@ msgstr "esalexeev@gmail.com" #~ msgid "Appearance configuration" #~ msgstr "Appearance configuration" -#~ msgid "Tooltip configuration" -#~ msgstr "Tooltip configuration" - #~ msgid "Widget configuration" #~ msgstr "Widget configuration" diff --git a/sources/translations/es.po b/sources/translations/es.po index 192e588..d208180 100644 --- a/sources/translations/es.po +++ b/sources/translations/es.po @@ -1,7 +1,7 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: # Ernesto Avilés Vázquez , 2014-2015 # Evgeniy Alekseev , 2014-2015 @@ -9,14 +9,15 @@ msgid "" msgstr "" "Project-Id-Version: Awesome widgets\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" -"POT-Creation-Date: 2015-09-21 20:49+0300\n" +"POT-Creation-Date: 2015-10-16 20:22+0300\n" "PO-Revision-Date: 2015-09-26 22:07+0000\n" "Last-Translator: Ernesto Avilés Vázquez \n" -"Language-Team: Spanish (http://www.transifex.com/arcanis/awesome-widgets/language/es/)\n" +"Language-Team: Spanish (http://www.transifex.com/arcanis/awesome-widgets/" +"language/es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" msgid "Widget" @@ -109,6 +110,12 @@ msgstr "Etiqueta para la alimentación desconectada" msgid "Drop key cache" msgstr "Borrar caché de claves" +msgid "Export configuration" +msgstr "" + +msgid "Import configuration" +msgstr "" + msgid "Font" msgstr "Tipo de letra" @@ -238,7 +245,10 @@ msgstr "Comprobar actualizaciones" msgid "" "CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "To enable them just make needed checkbox checked." -msgstr "Las etiquetas para CPU, reloj de CPU, memoria, swap y red soportan ventanas emergentes. Para habilitarlas, simplemente marca las casillas correspondientes." +msgstr "" +"Las etiquetas para CPU, reloj de CPU, memoria, swap y red soportan ventanas " +"emergentes. Para habilitarlas, simplemente marca las casillas " +"correspondientes." msgid "Number of values for tooltips" msgstr "Número de valores para las ventanas emergentes" @@ -292,9 +302,11 @@ msgid "Battery inactive color" msgstr "Color de la batería inactiva" msgid "" -"Detailed information may be found on project homepage" -msgstr "Puedes encontrar información detallada en el sitio del proyecto" +"Detailed information may be found on project homepage" +msgstr "" +"Puedes encontrar información detallada en el sitio del proyecto" msgid "AC" msgstr "CA" @@ -395,6 +407,23 @@ msgstr "Haz clic en «Ok» para descargar" msgid "There are updates" msgstr "Hay actualizaciones disponibles" +msgid "Export" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Import plasmoid settings" +msgstr "" + +#, fuzzy +msgid "Import extensions" +msgstr "Extensiones" + +#, fuzzy +msgid "Import additional files" +msgstr "Filtros adicionales" + msgid "AC online" msgstr "Alimentación conectada" @@ -458,9 +487,13 @@ msgstr "Etiqueta" msgid "" "

Use YAHOO! finance ticker to get quotes for the " "instrument. Refer to http://finance.yahoo.com/

" -msgstr "

Usa el tablero electrónico de YAHOO! para obtener la cotización del medio. Dirígete a http://finance.yahoo.com/

" +"text-decoration: underline; color:#0057ae;\">http://finance.yahoo.com/

" +msgstr "" +"

Usa el tablero electrónico de YAHOO! para obtener la " +"cotización del medio. Dirígete a http://finance.yahoo." +"com/

" msgid "Ticker" msgstr "Tablero" diff --git a/sources/translations/fr.po b/sources/translations/fr.po index a22f4d4..0fb5925 100644 --- a/sources/translations/fr.po +++ b/sources/translations/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" -"POT-Creation-Date: 2015-09-21 20:49+0300\n" +"POT-Creation-Date: 2015-10-16 20:22+0300\n" "PO-Revision-Date: 2015-07-31 22:16+0300\n" "Last-Translator: Evgeniy Alekseev \n" "Language-Team: French \n" @@ -112,6 +112,12 @@ msgstr "Étiquette alimentation débranchée" msgid "Drop key cache" msgstr "" +msgid "Export configuration" +msgstr "" + +msgid "Import configuration" +msgstr "" + msgid "Font" msgstr "Police" @@ -416,6 +422,21 @@ msgstr "Cliquer sur \"Valider\" pour télécharger" msgid "There are updates" msgstr "Des mises à jour sont disponibles" +msgid "Export" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Import plasmoid settings" +msgstr "" + +msgid "Import extensions" +msgstr "" + +msgid "Import additional files" +msgstr "" + msgid "AC online" msgstr "Alimentation branchée" diff --git a/sources/translations/nl.po b/sources/translations/nl.po index 6d6e60a..a3f0fe7 100644 --- a/sources/translations/nl.po +++ b/sources/translations/nl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Awesome widgets\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" -"POT-Creation-Date: 2015-09-21 20:49+0300\n" +"POT-Creation-Date: 2015-10-16 20:22+0300\n" "PO-Revision-Date: 2015-08-20 22:52+0300\n" "Last-Translator: Evgeniy Alekseev \n" "Language-Team: Dutch \n" @@ -112,6 +112,14 @@ msgstr "AC offline-sleutelwoord" msgid "Drop key cache" msgstr "" +#, fuzzy +msgid "Export configuration" +msgstr "Configuratie" + +#, fuzzy +msgid "Import configuration" +msgstr "Configuratie" + msgid "Font" msgstr "Lettertype" @@ -416,6 +424,21 @@ msgstr "Klik op \"OK\" om te downloaden" msgid "There are updates" msgstr "Er zijn updates" +msgid "Export" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Import plasmoid settings" +msgstr "" + +msgid "Import extensions" +msgstr "" + +msgid "Import additional files" +msgstr "" + msgid "AC online" msgstr "AC online" @@ -726,9 +749,6 @@ msgstr "vistausss@outlook.com" #~ msgid "NOTE: Player DBus interface should be an active" #~ msgstr "LET OP: De DBus-interface van de speler moet actief zijn" -#~ msgid "Configuration" -#~ msgstr "Configuratie" - #~ msgid "Ctrl+B" #~ msgstr "Ctrl+B" diff --git a/sources/translations/pt_BR.po b/sources/translations/pt_BR.po index 829900f..211fe0c 100644 --- a/sources/translations/pt_BR.po +++ b/sources/translations/pt_BR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" -"POT-Creation-Date: 2015-09-21 20:49+0300\n" +"POT-Creation-Date: 2015-10-16 20:22+0300\n" "PO-Revision-Date: 2015-07-31 22:21+0300\n" "Last-Translator: Evgeniy Alekseev \n" "Language-Team: Russian \n" @@ -111,6 +111,14 @@ msgstr "Rótulo com carregador desconectado" msgid "Drop key cache" msgstr "" +#, fuzzy +msgid "Export configuration" +msgstr "Configuração" + +#, fuzzy +msgid "Import configuration" +msgstr "Configuração" + msgid "Font" msgstr "Tamanho da fonte" @@ -412,6 +420,21 @@ msgstr "Clique \"Ok\" para baixar" msgid "There are updates" msgstr "Há atualizações disponíveis" +msgid "Export" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Import plasmoid settings" +msgstr "" + +msgid "Import extensions" +msgstr "" + +msgid "Import additional files" +msgstr "" + msgid "AC online" msgstr "Carregador conectado" @@ -712,9 +735,6 @@ msgstr "under@insicuri.net" #~ msgid "NOTE: Player DBus interface should be an active" #~ msgstr "NOTA: Interface do player DBus deverá ser uma ativa" -#~ msgid "Configuration" -#~ msgstr "Configuração" - #~ msgid "Ctrl+B" #~ msgstr "Ctrl+B" diff --git a/sources/translations/ru.po b/sources/translations/ru.po index 7921676..8a6098a 100644 --- a/sources/translations/ru.po +++ b/sources/translations/ru.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" -"POT-Creation-Date: 2015-09-21 20:49+0300\n" -"PO-Revision-Date: 2015-09-26 21:53+0300\n" +"POT-Creation-Date: 2015-10-16 20:22+0300\n" +"PO-Revision-Date: 2015-10-16 20:23+0300\n" "Last-Translator: Evgeniy Alekseev \n" "Language-Team: Russian \n" "Language: ru\n" @@ -108,6 +108,12 @@ msgstr "AC отключен" msgid "Drop key cache" msgstr "Сбросить кеш ключей" +msgid "Export configuration" +msgstr "Экспорт настроек" + +msgid "Import configuration" +msgstr "Импорт настроек" + msgid "Font" msgstr "Шрифт" @@ -398,6 +404,21 @@ msgstr "Нажмите \"Ok\" для загрузки" msgid "There are updates" msgstr "Найдены обновления" +msgid "Export" +msgstr "Экспорт" + +msgid "Import" +msgstr "Импорт" + +msgid "Import plasmoid settings" +msgstr "Импорт настроек плазмоида" + +msgid "Import extensions" +msgstr "Импорт расширений" + +msgid "Import additional files" +msgstr "Импорт дополнительных файлов" + msgid "AC online" msgstr "AC подключен" @@ -750,9 +771,6 @@ msgstr "esalexeev@gmail.com" #~ msgid "Appearance configuration" #~ msgstr "Настройка внешнего вида" -#~ msgid "Tooltip configuration" -#~ msgstr "Настройка тултипа" - #~ msgid "Widget configuration" #~ msgstr "Настройка виджета" diff --git a/sources/translations/uk.po b/sources/translations/uk.po index b38961f..4fd2c60 100644 --- a/sources/translations/uk.po +++ b/sources/translations/uk.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" -"POT-Creation-Date: 2015-09-21 20:49+0300\n" +"POT-Creation-Date: 2015-10-16 20:22+0300\n" "PO-Revision-Date: 2015-09-27 12:37+0300\n" "Last-Translator: Evgeniy Alekseev \n" "Language-Team: Ukrainian \n" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<" -"=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Lokalize 2.0\n" msgid "Widget" @@ -110,6 +110,14 @@ msgstr "AC відключений" msgid "Drop key cache" msgstr "Скинути кеш ключів" +#, fuzzy +msgid "Export configuration" +msgstr "Налаштування" + +#, fuzzy +msgid "Import configuration" +msgstr "Налаштування" + msgid "Font" msgstr "Шрифт" @@ -412,6 +420,23 @@ msgstr "Натисніть \"Ok\" для завантаження" msgid "There are updates" msgstr "Знайдені оновлення" +msgid "Export" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Import plasmoid settings" +msgstr "" + +#, fuzzy +msgid "Import extensions" +msgstr "Розширення" + +#, fuzzy +msgid "Import additional files" +msgstr "Додаткові фільтри" + msgid "AC online" msgstr "AC підключений" @@ -727,9 +752,6 @@ msgstr "sarumyan@i.ua" #~ msgid "NOTE: Player DBus interface should be an active" #~ msgstr "УВАГА: DBus інтерфейс плеєра має бути активним" -#~ msgid "Configuration" -#~ msgstr "Налаштування" - #~ msgid "Ctrl+B" #~ msgstr "Ctrl+B" diff --git a/sources/translations/zh.po b/sources/translations/zh.po index 4428f42..f7dff2c 100644 --- a/sources/translations/zh.po +++ b/sources/translations/zh.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" -"POT-Creation-Date: 2015-09-21 20:49+0300\n" +"POT-Creation-Date: 2015-10-16 20:22+0300\n" "PO-Revision-Date: 2015-07-31 22:24+0300\n" "Last-Translator: Evgeniy Alekseev \n" "Language-Team: Russian \n" @@ -108,6 +108,12 @@ msgstr "外接电源未使用标签" msgid "Drop key cache" msgstr "" +msgid "Export configuration" +msgstr "" + +msgid "Import configuration" +msgstr "" + msgid "Font" msgstr "字体" @@ -412,6 +418,21 @@ msgstr "" msgid "There are updates" msgstr "" +msgid "Export" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Import plasmoid settings" +msgstr "" + +msgid "Import extensions" +msgstr "" + +msgid "Import additional files" +msgstr "" + #, fuzzy msgid "AC online" msgstr "外接电源使用中标签"