i18n fixes
This commit is contained in:
parent
34bee764e8
commit
39c72cb4b2
11 changed files with 14 additions and 14 deletions
|
@ -28,7 +28,7 @@
|
||||||
#include "kdebugnamespace.h"
|
#include "kdebugnamespace.h"
|
||||||
|
|
||||||
K_PLUGIN_FACTORY(KdeConnectFactory, registerPlugin<Kded>();)
|
K_PLUGIN_FACTORY(KdeConnectFactory, registerPlugin<Kded>();)
|
||||||
K_EXPORT_PLUGIN(KdeConnectFactory("kdeconnect", "kdeconnect"))
|
K_EXPORT_PLUGIN(KdeConnectFactory("kdeconnect", "kdeconnect-kded"))
|
||||||
|
|
||||||
Kded::Kded(QObject *parent, const QList<QVariant>&)
|
Kded::Kded(QObject *parent, const QList<QVariant>&)
|
||||||
: KDEDModule(parent)
|
: KDEDModule(parent)
|
||||||
|
|
|
@ -73,7 +73,7 @@ bool BatteryPlugin::receivePackage(const NetworkPackage& np)
|
||||||
if ( thresholdEvent == ThresholdBatteryLow && !isCharging ) {
|
if ( thresholdEvent == ThresholdBatteryLow && !isCharging ) {
|
||||||
KNotification* notification = new KNotification("batteryLow");
|
KNotification* notification = new KNotification("batteryLow");
|
||||||
notification->setPixmap(KIcon("battery-040").pixmap(48, 48));
|
notification->setPixmap(KIcon("battery-040").pixmap(48, 48));
|
||||||
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
|
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
|
||||||
notification->setTitle(i18nc("device name: low battery", "%1: low battery", device()->name()));
|
notification->setTitle(i18nc("device name: low battery", "%1: low battery", device()->name()));
|
||||||
notification->setText(i18n("Battery at %1%", currentCharge));
|
notification->setText(i18n("Battery at %1%", currentCharge));
|
||||||
notification->sendEvent();
|
notification->sendEvent();
|
||||||
|
|
|
@ -75,7 +75,7 @@ void MprisControlPlugin::addPlayer(const QString& service)
|
||||||
{
|
{
|
||||||
QDBusInterface mprisInterface(service, "/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2");
|
QDBusInterface mprisInterface(service, "/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2");
|
||||||
//FIXME: This call hangs and returns an empty string if KDED is still starting!
|
//FIXME: This call hangs and returns an empty string if KDED is still starting!
|
||||||
const QString& identity = mprisInterface.property("Identity").toString();
|
const QString identity = mprisInterface.property("Identity").toString();
|
||||||
playerList[identity] = service;
|
playerList[identity] = service;
|
||||||
kDebug(kdeconnect_kded()) << "Mpris addPlayer" << service << "->" << identity;
|
kDebug(kdeconnect_kded()) << "Mpris addPlayer" << service << "->" << identity;
|
||||||
sendPlayerList();
|
sendPlayerList();
|
||||||
|
@ -130,7 +130,7 @@ void MprisControlPlugin::propertiesChanged(const QString& propertyInterface, con
|
||||||
|
|
||||||
void MprisControlPlugin::removePlayer(const QString& ifaceName)
|
void MprisControlPlugin::removePlayer(const QString& ifaceName)
|
||||||
{
|
{
|
||||||
QString identity = playerList.key(ifaceName);
|
const QString identity = playerList.key(ifaceName);
|
||||||
kDebug(kdeconnect_kded()) << "Mpris removePlayer" << ifaceName << "->" << identity;
|
kDebug(kdeconnect_kded()) << "Mpris removePlayer" << ifaceName << "->" << identity;
|
||||||
playerList.remove(identity);
|
playerList.remove(identity);
|
||||||
sendPlayerList();
|
sendPlayerList();
|
||||||
|
@ -143,7 +143,7 @@ bool MprisControlPlugin::receivePackage (const NetworkPackage& np)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Send the player list
|
//Send the player list
|
||||||
const QString& player = np.get<QString>("player");
|
const QString player = np.get<QString>("player");
|
||||||
bool valid_player = playerList.contains(player);
|
bool valid_player = playerList.contains(player);
|
||||||
if (!valid_player || np.get<bool>("requestPlayerList")) {
|
if (!valid_player || np.get<bool>("requestPlayerList")) {
|
||||||
sendPlayerList();
|
sendPlayerList();
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "ui_pausemusic_config.h"
|
#include "ui_pausemusic_config.h"
|
||||||
|
|
||||||
K_PLUGIN_FACTORY(PauseMusicConfigFactory, registerPlugin<PauseMusicConfig>();)
|
K_PLUGIN_FACTORY(PauseMusicConfigFactory, registerPlugin<PauseMusicConfig>();)
|
||||||
K_EXPORT_PLUGIN(PauseMusicConfigFactory("kdeconnect_pausemusic_config", "kdeconnect_pausemusic_config"))
|
K_EXPORT_PLUGIN(PauseMusicConfigFactory("kdeconnect_pausemusic_config", "kdeconnect-kded"))
|
||||||
|
|
||||||
PauseMusicConfig::PauseMusicConfig(QWidget *parent, const QVariantList& )
|
PauseMusicConfig::PauseMusicConfig(QWidget *parent, const QVariantList& )
|
||||||
: KCModule(PauseMusicConfigFactory::componentData(), parent)
|
: KCModule(PauseMusicConfigFactory::componentData(), parent)
|
||||||
|
|
|
@ -44,7 +44,7 @@ bool PingPlugin::receivePackage(const NetworkPackage& np)
|
||||||
{
|
{
|
||||||
KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent
|
KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent
|
||||||
notification->setPixmap(KIcon("dialog-ok").pixmap(48, 48));
|
notification->setPixmap(KIcon("dialog-ok").pixmap(48, 48));
|
||||||
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
|
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
|
||||||
notification->setTitle(device()->name());
|
notification->setTitle(device()->name());
|
||||||
notification->setText(np.get<QString>("message",i18n("Ping!"))); //This can be a source of spam
|
notification->setText(np.get<QString>("message",i18n("Ping!"))); //This can be a source of spam
|
||||||
notification->sendEvent();
|
notification->sendEvent();
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "ui_sftp_config.h"
|
#include "ui_sftp_config.h"
|
||||||
|
|
||||||
K_PLUGIN_FACTORY(SftpConfigFactory, registerPlugin<SftpConfig>();)
|
K_PLUGIN_FACTORY(SftpConfigFactory, registerPlugin<SftpConfig>();)
|
||||||
K_EXPORT_PLUGIN(SftpConfigFactory("kdeconnect_sftp_config", "kdeconnect_sftp_config"))
|
K_EXPORT_PLUGIN(SftpConfigFactory("kdeconnect_sftp_config", "kdeconnect-kded"))
|
||||||
|
|
||||||
SftpConfig::SftpConfig(QWidget *parent, const QVariantList& )
|
SftpConfig::SftpConfig(QWidget *parent, const QVariantList& )
|
||||||
: KCModule(SftpConfigFactory::componentData(), parent)
|
: KCModule(SftpConfigFactory::componentData(), parent)
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "../../kdebugnamespace.h"
|
#include "../../kdebugnamespace.h"
|
||||||
|
|
||||||
K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< SftpPlugin >(); )
|
K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< SftpPlugin >(); )
|
||||||
K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_sftp", "kdeconnect_sftp") )
|
K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_sftp", "kdeconnect-kded") )
|
||||||
|
|
||||||
static const QSet<QString> fields_c = QSet<QString>() << "ip" << "port" << "user" << "port" << "path";
|
static const QSet<QString> fields_c = QSet<QString>() << "ip" << "port" << "user" << "port" << "path";
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ void SftpPlugin::onMounted()
|
||||||
|
|
||||||
KNotification* notification = new KNotification("mounted", KNotification::CloseOnTimeout, this);
|
KNotification* notification = new KNotification("mounted", KNotification::CloseOnTimeout, this);
|
||||||
notification->setPixmap(KIconLoader::global()->loadIcon("drive-removable-media", KIconLoader::Desktop));
|
notification->setPixmap(KIconLoader::global()->loadIcon("drive-removable-media", KIconLoader::Desktop));
|
||||||
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
|
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
|
||||||
notification->setTitle(i18n("Device %1", device()->name()));
|
notification->setTitle(i18n("Device %1", device()->name()));
|
||||||
notification->setText(i18n("Filesystem mounted at %1", mountPoint()));
|
notification->setText(i18n("Filesystem mounted at %1", mountPoint()));
|
||||||
notification->sendEvent();
|
notification->sendEvent();
|
||||||
|
|
|
@ -128,7 +128,7 @@ void SharePlugin::finished(KJob* job)
|
||||||
FileTransferJob* transferJob = (FileTransferJob*)job;
|
FileTransferJob* transferJob = (FileTransferJob*)job;
|
||||||
KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent
|
KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent
|
||||||
notification->setPixmap(KIcon(error? "edit-delete" : "dialog-ok").pixmap(48, 48));
|
notification->setPixmap(KIcon(error? "edit-delete" : "dialog-ok").pixmap(48, 48));
|
||||||
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
|
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
|
||||||
notification->setTitle(i18n("Transfer finished"));
|
notification->setTitle(i18n("Transfer finished"));
|
||||||
notification->setText(transferJob->destination().fileName());
|
notification->setText(transferJob->destination().fileName());
|
||||||
notification->setActions(QStringList(i18n("Open destination folder")));
|
notification->setActions(QStringList(i18n("Open destination folder")));
|
||||||
|
|
|
@ -70,7 +70,7 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
|
||||||
|
|
||||||
KNotification* notification = new KNotification(type, KNotification::CloseOnTimeout, this); //, KNotification::Persistent
|
KNotification* notification = new KNotification(type, KNotification::CloseOnTimeout, this); //, KNotification::Persistent
|
||||||
notification->setPixmap(KIcon(icon).pixmap(48, 48));
|
notification->setPixmap(KIcon(icon).pixmap(48, 48));
|
||||||
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
|
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
|
||||||
notification->setTitle(title);
|
notification->setTitle(title);
|
||||||
notification->setText(content);
|
notification->setText(content);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "libkdeconnect/devicesmodel.h"
|
#include "libkdeconnect/devicesmodel.h"
|
||||||
#include "libkdeconnect/notificationsmodel.h"
|
#include "libkdeconnect/notificationsmodel.h"
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN2(kdeconnectdeclarativeplugin, KdeConnectDeclarativePlugin);
|
Q_EXPORT_PLUGIN2(kdeconnectdeclarativeplugin, KdeConnectDeclarativePlugin)
|
||||||
|
|
||||||
QObject* createDeviceDbusInterface(QVariant deviceId)
|
QObject* createDeviceDbusInterface(QVariant deviceId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@ public:
|
||||||
ObjectFactory(QObject* parent, Func1 f1) : QObject(parent), m_f0(0), m_f1(f1), m_f2(0) {}
|
ObjectFactory(QObject* parent, Func1 f1) : QObject(parent), m_f0(0), m_f1(f1), m_f2(0) {}
|
||||||
ObjectFactory(QObject* parent, Func2 f2) : QObject(parent), m_f0(0), m_f1(0), m_f2(f2) {}
|
ObjectFactory(QObject* parent, Func2 f2) : QObject(parent), m_f0(0), m_f1(0), m_f2(f2) {}
|
||||||
|
|
||||||
virtual ~ObjectFactory() {};
|
virtual ~ObjectFactory() {}
|
||||||
|
|
||||||
|
|
||||||
Q_INVOKABLE QObject* create() {
|
Q_INVOKABLE QObject* create() {
|
||||||
|
|
Loading…
Reference in a new issue