mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-09 00:58:15 +03:00
remove deprecated functionality of sessions
This commit is contained in:
parent
116d817754
commit
b56d92383f
@ -55,16 +55,6 @@ bool Importer::updateOldConfiguration()
|
||||
importOldLayout(QDir::homePath() + "/.config/lattedock-appletsrc", i18n("My Layout"));
|
||||
importOldLayout(QDir::homePath() + "/.config/lattedock-appletsrc", i18n("Alternative"), true);
|
||||
|
||||
//! global settings that must be imported to universal
|
||||
KSharedConfigPtr oldFile = KSharedConfig::openConfig(QDir::homePath() + "/.config/lattedock-appletsrc");
|
||||
KConfigGroup oldGeneralSettings = KConfigGroup(oldFile, "General");
|
||||
bool exposeLayoutsMenu = oldGeneralSettings.readEntry("exposeAltSession", false);
|
||||
|
||||
if (m_manager) {
|
||||
m_manager->corona()->universalSettings()->setExposeLayoutsMenu(exposeLayoutsMenu);
|
||||
}
|
||||
|
||||
|
||||
QFile extFile(QDir::homePath() + "/.config/lattedockextrc");
|
||||
|
||||
//! import also the old user layouts into the new architecture
|
||||
|
@ -29,7 +29,6 @@ UniversalSettings::UniversalSettings(KSharedConfig::Ptr config, QObject *parent)
|
||||
{
|
||||
connect(this, &UniversalSettings::currentLayoutNameChanged, this, &UniversalSettings::saveConfig);
|
||||
connect(this, &UniversalSettings::versionChanged, this, &UniversalSettings::saveConfig);
|
||||
connect(this, &UniversalSettings::exposeLayoutsMenuChanged, this, &UniversalSettings::saveConfig);
|
||||
}
|
||||
|
||||
UniversalSettings::~UniversalSettings()
|
||||
@ -51,22 +50,6 @@ void UniversalSettings::load()
|
||||
loadConfig();
|
||||
}
|
||||
|
||||
bool UniversalSettings::exposeLayoutsMenu() const
|
||||
{
|
||||
return m_exposeLayoutsMenu;
|
||||
}
|
||||
|
||||
void UniversalSettings::setExposeLayoutsMenu(bool state)
|
||||
{
|
||||
if (m_exposeLayoutsMenu == state) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_exposeLayoutsMenu = state;
|
||||
emit exposeLayoutsMenuChanged();
|
||||
}
|
||||
|
||||
|
||||
int UniversalSettings::version() const
|
||||
{
|
||||
return m_version;
|
||||
@ -139,14 +122,12 @@ void UniversalSettings::setAutostart(bool state)
|
||||
void UniversalSettings::loadConfig()
|
||||
{
|
||||
m_version = m_universalGroup.readEntry("version", 1);
|
||||
m_exposeLayoutsMenu = m_universalGroup.readEntry("exposeLayoutsMenu", false);
|
||||
m_currentLayoutName = m_universalGroup.readEntry("currentLayout", QString());
|
||||
}
|
||||
|
||||
void UniversalSettings::saveConfig()
|
||||
{
|
||||
m_universalGroup.writeEntry("version", m_version);
|
||||
m_universalGroup.writeEntry("exposeLayoutsMenu", m_exposeLayoutsMenu);
|
||||
m_universalGroup.writeEntry("currentLayout", m_currentLayoutName);
|
||||
|
||||
m_universalGroup.sync();
|
||||
|
@ -35,7 +35,6 @@ namespace Latte {
|
||||
class UniversalSettings : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool autostart READ autostart WRITE setAutostart NOTIFY autostartChanged)
|
||||
Q_PROPERTY(bool exposeLayoutsMenu READ exposeLayoutsMenu WRITE setExposeLayoutsMenu NOTIFY exposeLayoutsMenuChanged)
|
||||
|
||||
Q_PROPERTY(QString currentLayoutName READ currentLayoutName WRITE setCurrentLayoutName NOTIFY currentLayoutNameChanged)
|
||||
|
||||
@ -48,9 +47,6 @@ public:
|
||||
bool autostart() const;
|
||||
void setAutostart(bool state);
|
||||
|
||||
bool exposeLayoutsMenu() const;
|
||||
void setExposeLayoutsMenu(bool state);
|
||||
|
||||
int version() const;
|
||||
void setVersion(int ver);
|
||||
|
||||
@ -60,7 +56,6 @@ public:
|
||||
signals:
|
||||
void autostartChanged();
|
||||
void currentLayoutNameChanged();
|
||||
void exposeLayoutsMenuChanged();
|
||||
void versionChanged();
|
||||
|
||||
private slots:
|
||||
@ -71,7 +66,6 @@ private:
|
||||
void cleanupSettings();
|
||||
|
||||
private:
|
||||
bool m_exposeLayoutsMenu{false};
|
||||
//when there isnt a version it is an old universal file
|
||||
int m_version{1};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user