mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-23 02:50:12 +03:00
include plasma taskmanagers in startup identify
--Latte when loading a layout tries to identify if based on the docks settings there will be at least one dock containing a tasks plasmoid. This code was extended in order to identify also the plasma taskmanagers. One more improvement is that this code now is executed also when dynamically changing layouts
This commit is contained in:
parent
ba3de5061f
commit
3f90c61d53
@ -204,6 +204,9 @@ bool DockCorona::reloadLayout(QString path)
|
||||
m_screenPool->reload(m_layoutDir);
|
||||
loadLayout(appletsrc.fileName());
|
||||
|
||||
m_tasksWillBeLoaded = heuresticForLoadingDockWithTasks();
|
||||
qDebug() << "TASKS WILL BE PRESENT AFTER LOADING ::: " << m_tasksWillBeLoaded;
|
||||
|
||||
foreach (auto containment, containments())
|
||||
addDock(containment);
|
||||
|
||||
@ -1470,7 +1473,11 @@ bool DockCorona::heuresticForLoadingDockWithTasks()
|
||||
bool containsTasks = false;
|
||||
|
||||
foreach (auto appId, appletEntries.groupList()) {
|
||||
if (appletEntries.group(appId).readEntry("plugin") == "org.kde.latte.plasmoid") {
|
||||
QString pluginId = appletEntries.group(appId).readEntry("plugin");
|
||||
|
||||
if ((pluginId == "org.kde.latte.plasmoid") ||
|
||||
(pluginId == "org.kde.plasma.taskmanager") ||
|
||||
(pluginId == "org.kde.plasma.icontasks")) {
|
||||
containsTasks = true;
|
||||
break;
|
||||
}
|
||||
@ -1513,7 +1520,11 @@ bool DockCorona::containmentContainsTasks(Plasma::Containment *cont)
|
||||
auto appletEntries = containmentsEntries.group(cId).group("Applets");
|
||||
|
||||
foreach (auto appId, appletEntries.groupList()) {
|
||||
if (appletEntries.group(appId).readEntry("plugin") == "org.kde.latte.plasmoid") {
|
||||
QString pluginId = appletEntries.group(appId).readEntry("plugin");
|
||||
|
||||
if ((pluginId == "org.kde.latte.plasmoid") ||
|
||||
(pluginId == "org.kde.plasma.taskmanager") ||
|
||||
(pluginId == "org.kde.plasma.icontasks")) {
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user