plasma: adjust to plasma library changes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-05-19 23:34:33 +03:00
parent 6c4c7aa6b9
commit 4428efe5f0
5 changed files with 3 additions and 16 deletions

View file

@ -558,7 +558,7 @@ CalculatorApplet::CalculatorApplet(QObject *parent, const QVariantList &args)
{
KGlobal::locale()->insertCatalog("plasma_applet_calculator");
setAspectRatioMode(Plasma::AspectRatioMode::KeepAspectRatio);
setStatus(Plasma::ItemStatus::AcceptingInputStatus);
setStatus(Plasma::ItemStatus::ActiveStatus);
setPopupIcon("accessories-calculator");
}

View file

@ -216,7 +216,7 @@ DictApplet::DictApplet(QObject *parent, const QVariantList &args)
KGlobal::locale()->insertCatalog("plasma_applet_qstardict");
setPopupIcon(s_defaultpopupicon);
setAspectRatioMode(Plasma::IgnoreAspectRatio);
setStatus(Plasma::ItemStatus::AcceptingInputStatus);
setStatus(Plasma::ItemStatus::ActiveStatus);
}
void DictApplet::init()

View file

@ -83,7 +83,7 @@ NotesApplet::NotesApplet(QObject *parent, const QVariantList &args)
{
KGlobal::locale()->insertCatalog("plasma_applet_notes");
setAspectRatioMode(Plasma::AspectRatioMode::IgnoreAspectRatio);
setStatus(Plasma::AcceptingInputStatus);
setStatus(Plasma::ItemStatus::ActiveStatus);
setPopupIcon("knotes");
}

View file

@ -293,7 +293,6 @@ void PanelView::setContainment(Plasma::Containment *containment)
PlasmaApp::self()->prepareContainment(containment);
connect(containment, SIGNAL(newStatus(Plasma::ItemStatus)), this, SLOT(statusUpdated(Plasma::ItemStatus)));
connect(containment, SIGNAL(destroyed(QObject*)), this, SLOT(panelDeleted()));
connect(containment, SIGNAL(toolBoxToggled()), this, SLOT(togglePanelController()));
connect(containment, SIGNAL(appletAdded(Plasma::Applet*,QPointF)), this, SLOT(appletAdded(Plasma::Applet*)));
@ -1284,13 +1283,6 @@ void PanelView::unhide(bool destroyTrigger)
}
}
void PanelView::statusUpdated(Plasma::ItemStatus newStatus)
{
if (newStatus == Plasma::AcceptingInputStatus) {
KWindowSystem::forceActiveWindow(winId());
}
}
void PanelView::checkUnhide(Plasma::ItemStatus newStatus)
{
//kDebug() << "================= got a status: " << newStatus << Plasma::ActiveStatus;

View file

@ -132,11 +132,6 @@ public Q_SLOTS:
*/
void checkUnhide(Plasma::ItemStatus newStatus);
/**
* Decides whether give focus to the panel
*/
void statusUpdated(Plasma::ItemStatus newStatus);
/**
* Pinches the min/max sizes of the containment to the current screen resolution
*/