Drop PreventScreenLocking electric border
It was broken on so many ways, it's unbelievable: * action was read but did nothing * config was saved into a different file than read from REVIEW: 125701 CCBUG: 331841
This commit is contained in:
parent
c408e9ccec
commit
5d37ccfce0
3 changed files with 0 additions and 22 deletions
|
@ -187,12 +187,6 @@ void KWinScreenEdgesConfig::monitorInit()
|
||||||
monitorAddItem(i18n("No Action"));
|
monitorAddItem(i18n("No Action"));
|
||||||
monitorAddItem(i18n("Show Desktop"));
|
monitorAddItem(i18n("Show Desktop"));
|
||||||
monitorAddItem(i18n("Lock Screen"));
|
monitorAddItem(i18n("Lock Screen"));
|
||||||
monitorAddItem(i18n("Prevent Screen Locking"));
|
|
||||||
//Prevent Screen Locking is not supported on some edges
|
|
||||||
m_ui->monitor->setEdgeItemEnabled(int(Monitor::Top), 3, false);
|
|
||||||
m_ui->monitor->setEdgeItemEnabled(int(Monitor::Left), 3, false);
|
|
||||||
m_ui->monitor->setEdgeItemEnabled(int(Monitor::Right), 3, false);
|
|
||||||
m_ui->monitor->setEdgeItemEnabled(int(Monitor::Bottom), 3, false);
|
|
||||||
|
|
||||||
// Add the effects
|
// Add the effects
|
||||||
const QString presentWindowsName = BuiltInEffects::effectData(BuiltInEffect::PresentWindows).displayName;
|
const QString presentWindowsName = BuiltInEffects::effectData(BuiltInEffect::PresentWindows).displayName;
|
||||||
|
@ -217,7 +211,6 @@ void KWinScreenEdgesConfig::monitorLoadAction(ElectricBorder edge, const QString
|
||||||
QString lowerName = config.readEntry(configName, "None").toLower();
|
QString lowerName = config.readEntry(configName, "None").toLower();
|
||||||
if (lowerName == "showdesktop") monitorChangeEdge(edge, int(ElectricActionShowDesktop));
|
if (lowerName == "showdesktop") monitorChangeEdge(edge, int(ElectricActionShowDesktop));
|
||||||
else if (lowerName == "lockscreen") monitorChangeEdge(edge, int(ElectricActionLockScreen));
|
else if (lowerName == "lockscreen") monitorChangeEdge(edge, int(ElectricActionLockScreen));
|
||||||
else if (lowerName == "preventscreenlocking") monitorChangeEdge(edge, int(ElectricActionPreventScreenLocking));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinScreenEdgesConfig::monitorLoad()
|
void KWinScreenEdgesConfig::monitorLoad()
|
||||||
|
@ -314,20 +307,8 @@ void KWinScreenEdgesConfig::monitorSaveAction(int edge, const QString& configNam
|
||||||
config.writeEntry(configName, "ShowDesktop");
|
config.writeEntry(configName, "ShowDesktop");
|
||||||
else if (item == 2)
|
else if (item == 2)
|
||||||
config.writeEntry(configName, "LockScreen");
|
config.writeEntry(configName, "LockScreen");
|
||||||
else if (item == 3)
|
|
||||||
config.writeEntry(configName, "PreventScreenLocking");
|
|
||||||
else // Anything else
|
else // Anything else
|
||||||
config.writeEntry(configName, "None");
|
config.writeEntry(configName, "None");
|
||||||
|
|
||||||
if ((edge == int(Monitor::TopRight)) ||
|
|
||||||
(edge == int(Monitor::BottomRight)) ||
|
|
||||||
(edge == int(Monitor::BottomLeft)) ||
|
|
||||||
(edge == int(Monitor::TopLeft))) {
|
|
||||||
KConfig scrnConfig("kscreensaverrc");
|
|
||||||
KConfigGroup scrnGroup = scrnConfig.group("ScreenSaver");
|
|
||||||
scrnGroup.writeEntry("Action" + configName, (item == 3) ? 2 /* Prevent Screen Locking */ : 0 /* None */);
|
|
||||||
scrnGroup.sync();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinScreenEdgesConfig::monitorSave()
|
void KWinScreenEdgesConfig::monitorSave()
|
||||||
|
|
|
@ -93,7 +93,6 @@ enum ElectricBorderAction {
|
||||||
ElectricActionNone, // No special action, not set, desktop switch or an effect
|
ElectricActionNone, // No special action, not set, desktop switch or an effect
|
||||||
ElectricActionShowDesktop, // Show desktop or restore
|
ElectricActionShowDesktop, // Show desktop or restore
|
||||||
ElectricActionLockScreen, // Lock screen
|
ElectricActionLockScreen, // Lock screen
|
||||||
ElectricActionPreventScreenLocking,
|
|
||||||
ELECTRIC_ACTION_COUNT
|
ELECTRIC_ACTION_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -670,8 +670,6 @@ static ElectricBorderAction electricBorderAction(const QString& name)
|
||||||
return ElectricActionShowDesktop;
|
return ElectricActionShowDesktop;
|
||||||
} else if (lowerName == QStringLiteral("lockscreen")) {
|
} else if (lowerName == QStringLiteral("lockscreen")) {
|
||||||
return ElectricActionLockScreen;
|
return ElectricActionLockScreen;
|
||||||
} else if (lowerName == QStringLiteral("preventscreenlocking")) {
|
|
||||||
return ElectricActionPreventScreenLocking;
|
|
||||||
}
|
}
|
||||||
return ElectricActionNone;
|
return ElectricActionNone;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue