minor message fixes
Change-Id: I050b2e70ad1d9a57eb99c0f8fd34a80b76b66736
This commit is contained in:
parent
cef6b23e74
commit
ad06e7c8a2
@ -253,7 +253,7 @@ public:
|
||||
ActiveStatus = 2, /**< The Item is active **/
|
||||
NeedsAttentionStatus = 3, /**< The Item needs attention **/
|
||||
RequiresAttentionStatus = 4, /**< The Item needs persistent attention **/
|
||||
AcceptingInputStatus = 5, /**< The Item is accepting input **/
|
||||
AcceptingInputStatus = 5 /**< The Item is accepting input **/
|
||||
};
|
||||
Q_ENUMS(ItemStatus)
|
||||
|
||||
|
@ -238,7 +238,17 @@ void AppletPrivate::askDestroy()
|
||||
deleteNotification = new KNotification("plasmoidDeleted", KNotification::Persistent, 0);
|
||||
QStringList actions;
|
||||
deleteNotification->setIconName(q->icon());
|
||||
deleteNotification->setText(i18n("The widget \"%1\" has been removed.", q->title()));
|
||||
Plasma::Containment *asContainment = qobject_cast<Plasma::Containment *>(q);
|
||||
|
||||
if (!q->isContainment()) {
|
||||
deleteNotification->setText(i18n("The widget \"%1\" has been removed.", q->title()));
|
||||
} else if (asContainment && (asContainment->containmentType() == Types::PanelContainment || asContainment->containmentType() == Types::CustomPanelContainment)) {
|
||||
deleteNotification->setText(i18n("A Panel has been removed."));
|
||||
//This will never happen with our current shell, but could with a custom one
|
||||
} else {
|
||||
deleteNotification->setText(i18n("A Desktop has been removed."));
|
||||
}
|
||||
|
||||
actions.append(i18n("Undo"));
|
||||
deleteNotification->setActions(actions);
|
||||
QObject::connect(deleteNotification.data(), &KNotification::action1Activated,
|
||||
@ -263,7 +273,7 @@ void AppletPrivate::askDestroy()
|
||||
});
|
||||
QObject::connect(deleteNotification.data(), &KNotification::closed,
|
||||
[=]() {
|
||||
//If the timer still exists, it meand the undo action was NOT triggered
|
||||
//If the timer still exists, it means the undo action was NOT triggered
|
||||
if (deleteNotificationTimer) {
|
||||
transient = true;
|
||||
emit q->destroyedChanged(true);
|
||||
|
@ -59,7 +59,8 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, const QVariant
|
||||
m_appletScriptEngine(script),
|
||||
m_backgroundHints(Plasma::Types::StandardBackground),
|
||||
m_busy(false),
|
||||
m_hideOnDeactivate(true)
|
||||
m_hideOnDeactivate(true),
|
||||
m_positionBeforeRemoval(QPointF(-1, -1))
|
||||
{
|
||||
qmlRegisterType<QAction>();
|
||||
|
||||
@ -74,7 +75,7 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, const QVariant
|
||||
this, &AppletInterface::statusChanged);
|
||||
|
||||
connect(applet(), &Plasma::Applet::destroyedChanged,
|
||||
[=] () {
|
||||
this, [=] () {
|
||||
setVisible(!applet()->destroyed());
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user