[sddm-kcm] Applied patch by Vincent Damewood to fix configuration file incompatibility (thanks!)
Martin Briza
mbriza at fedoraproject.org
Wed Jan 21 13:17:09 UTC 2015
commit 106b638c59edfabf579f102a0f00a8047e675dd4
Author: Martin Briza <mbriza at redhat.com>
Date: Wed Jan 21 14:17:27 2015 +0100
Applied patch by Vincent Damewood to fix configuration file incompatibility (thanks!)
Fixed theme listing
Resolves: #1172276 #1173825
sddm-kcm-new-format.patch | 610 +++++++++++++++++++++++++++++++++++++++++++++
sddm-kcm-noreturn.patch | 15 ++
sddm-kcm.spec | 6 +
3 files changed, 631 insertions(+), 0 deletions(-)
---
diff --git a/sddm-kcm-new-format.patch b/sddm-kcm-new-format.patch
new file mode 100644
index 0000000..3360c03
--- /dev/null
+++ b/sddm-kcm-new-format.patch
@@ -0,0 +1,610 @@
+diff -uNr sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/advanceconfig.cpp sddm-kcm-new/src/advanceconfig.cpp
+--- sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/advanceconfig.cpp 2014-01-06 03:51:16.000000000 -0800
++++ sddm-kcm-new/src/advanceconfig.cpp 2015-01-04 13:06:59.828095679 -0800
+@@ -13,7 +13,10 @@
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+- */
++*/
++
++// This file was modified by Vincent Damewood 2015-01-04.
++
+ #include "advanceconfig.h"
+ #include "ui_advanceconfig.h"
+
+@@ -23,6 +26,7 @@
+ #include <KUser>
+
+ #include "usersmodel.h"
++#include "sessionmodel.h"
+ #include "config.h"
+ #include "cursortheme/thememodel.h"
+ #include "cursortheme/sortproxymodel.h"
+@@ -42,6 +46,7 @@
+ load();
+
+ connect(configUi->userList, SIGNAL(activated(int)), SIGNAL(changed()));
++ connect(configUi->sessionList, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(configUi->haltCommand, SIGNAL(textChanged(QString)), SIGNAL(changed()));
+ connect(configUi->rebootCommand, SIGNAL(textChanged(QString)), SIGNAL(changed()));
+ connect(configUi->cursorList, SIGNAL(activated(int)), SIGNAL(changed()));
+@@ -66,33 +71,42 @@
+ proxyCursorModel->setSourceModel(cursorModel);
+ proxyCursorModel->setFilterCaseSensitivity(Qt::CaseSensitive);
+ proxyCursorModel->sort(Qt::DisplayRole, Qt::AscendingOrder);
+-
++
+ configUi->cursorList->setModel(proxyCursorModel);
+- QString currentCursor = mConfig->group("General").readEntry("CursorTheme", "");
++ QString currentCursor = mConfig->group("Theme").readEntry("CursorTheme", "");
+ QModelIndex cursorIndex = proxyCursorModel->findIndex(currentCursor);
+ configUi->cursorList->setCurrentIndex(cursorIndex.row() < 0 ? 0 : cursorIndex.row());
+
+ //User list
+ int minUid, maxUid;
+- minUid = mConfig->group("General").readEntry("MinimumUid", MIN_UID);
+- maxUid = mConfig->group("General").readEntry("MaximumUid", MAX_UID);
+-
++ minUid = mConfig->group("Users").readEntry("MinimumUid", MIN_UID);
++ maxUid = mConfig->group("Users").readEntry("MaximumUid", MAX_UID);
++
+ userModel = new UsersModel(this);
+ configUi->userList->setModel(userModel);
+ userModel->populate( minUid, maxUid );
+
+- QString currentUser = mConfig->group("General").readEntry("AutoUser", "");
++ QString currentUser = mConfig->group("Autologin").readEntry("User", "");
+ configUi->userList->setCurrentIndex(userModel->indexOf(currentUser));
++
++ //Session list
++ sessionModel = new SessionModel(this);
++ configUi->sessionList->setModel(sessionModel);
++ //sessionModel->populate( minUid, maxUid );
++
++ QString currentSession = mConfig->group("Autologin").readEntry("Session", "");
++ configUi->userList->setCurrentIndex(userModel->indexOf(currentSession));
++
+ configUi->autoLogin->setChecked(!currentUser.isEmpty());
+- configUi->reloginAfterQuit->setChecked(mConfig->group("General").readEntry("AutoRelogin", false));
+-
++ configUi->reloginAfterQuit->setChecked(mConfig->group("Autologin").readEntry("Relogin", false));
++
+ QValidator *uidValidator = new QIntValidator(MIN_UID, MAX_UID, configUi->minimumUid);
+ configUi->minimumUid->setValidator(uidValidator);
+ configUi->minimumUid->setText(QString::number(minUid));
+-
++
+ configUi->maximumUid->setValidator(uidValidator);
+ configUi->maximumUid->setText(QString::number(maxUid));
+-
++
+
+ //Commands
+ configUi->haltCommand->setUrl(mConfig->group("General").readEntry("HaltCommand"));
+@@ -109,17 +123,20 @@
+ if (cursorIndex.isValid()) {
+ const CursorTheme *cursorTheme = proxyCursorModel->theme(cursorIndex);
+ if (cursorTheme)
+- args["sddm.conf/General/CursorTheme"] = cursorTheme->name();
++ args["sddm.conf/Theme/CursorTheme"] = cursorTheme->name();
+ }
+
+- args["sddm.conf/General/AutoUser"] = ( configUi->autoLogin->isChecked() ) ? configUi->userList->currentText() : "";
+- args["sddm.conf/General/AutoRelogin"] = configUi->reloginAfterQuit->isChecked();
++ args["sddm.conf/Autologin/User"] = ( configUi->autoLogin->isChecked() ) ? configUi->userList->currentText() : "";
++ args["sddm.conf/Autologin/Session"] = ( configUi->autoLogin->isChecked() )
++ ? configUi->sessionList->itemData(configUi->sessionList->currentIndex())
++ : "";
++ args["sddm.conf/Autologin/Relogin"] = configUi->reloginAfterQuit->isChecked();
+
+ int minUid = configUi->minimumUid->text().toInt();
+ int maxUid = configUi->maximumUid->text().toInt();
+ if (isUidRangeValid(minUid, maxUid)) {
+- args["sddm.conf/General/MinimumUid"] = configUi->minimumUid->text();
+- args["sddm.conf/General/MaximumUid"] = configUi->maximumUid->text();
++ args["sddm.conf/Users/MinimumUid"] = configUi->minimumUid->text();
++ args["sddm.conf/Users/MaximumUid"] = configUi->maximumUid->text();
+ }
+
+ args["sddm.conf/General/HaltCommand"] = configUi->haltCommand->url().path();
+@@ -144,6 +161,6 @@
+ {
+ if (minUid < MIN_UID || minUid > maxUid)
+ return false;
+-
++
+ return true;
+-}
+\ No newline at end of file
++}
+diff -uNr sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/advanceconfig.h sddm-kcm-new/src/advanceconfig.h
+--- sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/advanceconfig.h 2014-01-06 03:51:16.000000000 -0800
++++ sddm-kcm-new/src/advanceconfig.h 2015-01-04 13:07:26.877244520 -0800
+@@ -1,19 +1,22 @@
+ /*
+ Copyright 2013 by Reza Fatahilah Shah <rshah0385 at kireihana.com>
+-
++
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+-
++
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+-
++
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
++
++// This file was modified by Vincent Damewood 2015-01-04.
++
+ #ifndef ADVANCECONFIG_H
+ #define ADVANCECONFIG_H
+
+@@ -28,6 +31,7 @@
+ class SortProxyModel;
+ class CursorTheme;
+ class UsersModel;
++class SessionModel;
+
+ class AdvanceConfig : public QWidget
+ {
+@@ -35,9 +39,9 @@
+ public:
+ explicit AdvanceConfig(QWidget *parent = 0);
+ ~AdvanceConfig();
+-
++
+ QVariantMap save();
+-
++
+ signals:
+ void changed(bool changed=true);
+
+@@ -53,6 +57,7 @@
+ KSharedConfigPtr mConfig;
+ SortProxyModel *proxyCursorModel;
+ UsersModel *userModel;
++ SessionModel *sessionModel;
+ };
+
+-#endif // ADVANCECONFIG_H
+\ No newline at end of file
++#endif // ADVANCECONFIG_H
+diff -uNr sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/CMakeLists.txt sddm-kcm-new/src/CMakeLists.txt
+--- sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/CMakeLists.txt 2014-01-06 03:51:16.000000000 -0800
++++ sddm-kcm-new/src/CMakeLists.txt 2015-01-04 09:24:38.571961371 -0800
+@@ -1,14 +1,14 @@
+ include(KDE4Defaults)
+ include(MacroLibrary)
+
+-include_directories(
++include_directories(
+ ${KDE4_INCLUDES}
+ ${CMAKE_CURRENT_SOURCE_DIR}/cursortheme/
+ ${CMAKE_CURRENT_SOURCE_DIR}/configwidgets/
+ )
+
+ set(SDDM_CONFIG_FILE "/etc/sddm.conf" CACHE PATH "Path of the sddm config file")
+-
++
+ configure_file(config.h.in config.h IMMEDIATE @ONLY)
+ add_subdirectory(configwidgets)
+
+@@ -20,6 +20,7 @@
+ themesdelegate.cpp
+ advanceconfig.cpp
+ usersmodel.cpp
++ sessionmodel.cpp
+ cursortheme/thememodel.cpp
+ cursortheme/legacytheme.cpp
+ cursortheme/xcursortheme.cpp
+diff -uNr sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/sessionmodel.cpp sddm-kcm-new/src/sessionmodel.cpp
+--- sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/sessionmodel.cpp 1969-12-31 16:00:00.000000000 -0800
++++ sddm-kcm-new/src/sessionmodel.cpp 2015-01-04 13:05:41.928306929 -0800
+@@ -0,0 +1,139 @@
++/***************************************************************************
++* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci at gmail.com>
++*
++* This program is free software; you can redistribute it and/or modify
++* it under the terms of the GNU General Public License as published by
++* the Free Software Foundation; either version 2 of the License, or
++* (at your option) any later version.
++*
++* This program is distributed in the hope that it will be useful,
++* but WITHOUT ANY WARRANTY; without even the implied warranty of
++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++* GNU General Public License for more details.
++*
++* You should have received a copy of the GNU General Public License
++* along with this program; if not, write to the
++* Free Software Foundation, Inc.,
++* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++***************************************************************************/
++
++// This file was modified by Vincent Damewood 2015-01-04.
++
++#include "sessionmodel.h"
++
++#include <QDir>
++#include <QFile>
++#include <QList>
++#include <QTextStream>
++
++#include <memory>
++
++class Session {
++public:
++ QString file;
++ QString name;
++ QString exec;
++ QString comment;
++
++ Session(QString newFile)
++ {
++ file = newFile;
++ name = "";
++ exec = "";
++ comment = "";
++ }
++};
++
++//typedef std::auto_ptr<Session> SessionPtr;
++typedef Session* SessionPtr;
++
++class SessionModelPrivate {
++public:
++ int lastIndex { 0 };
++ QList<SessionPtr> sessions;
++
++ ~SessionModelPrivate() {
++ foreach(SessionPtr deadSession, sessions)
++ delete deadSession;
++ }
++};
++
++SessionModel::SessionModel(QObject *parent) : QAbstractListModel(parent), d(new SessionModelPrivate()) {
++ // read session files
++ QDir dir("/usr/share/xsessions");
++ dir.setNameFilters(QStringList() << "*.desktop");
++ dir.setFilter(QDir::Files);
++ // read session
++ foreach(const QString &session, dir.entryList()) {
++ QFile inputFile(dir.absoluteFilePath(session));
++ if (!inputFile.open(QIODevice::ReadOnly))
++ continue;
++ SessionPtr si = new Session(session);
++ QTextStream in(&inputFile);
++ while (!in.atEnd()) {
++ QString line = in.readLine();
++ if (line.startsWith("Name="))
++ si->name = line.mid(5);
++ if (line.startsWith("Exec="))
++ si->exec = line.mid(5);
++ if (line.startsWith("Comment="))
++ si->comment = line.mid(8);
++ }
++ // add to sessions list
++ d->sessions.push_back(si);
++ // close file
++ inputFile.close();
++ }
++}
++
++SessionModel::~SessionModel() {
++ delete d;
++}
++
++/*QHash<int, QByteArray> SessionModel::roleNames() const {
++ // set role names
++ QHash<int, QByteArray> roleNames;
++ roleNames[FileRole] = "file";
++ roleNames[NameRole] = "name";
++ roleNames[ExecRole] = "exec";
++ roleNames[CommentRole] = "comment";
++
++ return roleNames;
++}*/
++
++int SessionModel::rowCount(const QModelIndex &parent) const {
++ return d->sessions.length();
++}
++
++QVariant SessionModel::data(const QModelIndex &index, int role) const {
++ if (index.row() < 0 || index.row() >= d->sessions.count())
++ return QVariant();
++
++ // get session
++ SessionPtr session = d->sessions[index.row()];
++
++ // return correct value
++ if (role == FileRole)
++ return session->file;
++ else if (role == NameRole)
++ return session->name;
++ else if (role == ExecRole)
++ return session->exec;
++ else if (role == CommentRole)
++ return session->comment;
++
++ // return empty value
++ return QVariant();
++}
++
++int SessionModel::indexOf(const QString &sessionId) const
++{
++ for (int i = 0; i < d->sessions.length(); i++) {
++ if (d->sessions[i]->file == sessionId) {
++ return i;
++ }
++ }
++ return 0;
++}
++
++
+diff -uNr sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/sessionmodel.h sddm-kcm-new/src/sessionmodel.h
+--- sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/sessionmodel.h 1969-12-31 16:00:00.000000000 -0800
++++ sddm-kcm-new/src/sessionmodel.h 2015-01-04 13:06:10.504353846 -0800
+@@ -0,0 +1,57 @@
++/***************************************************************************
++* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci at gmail.com>
++*
++* This program is free software; you can redistribute it and/or modify
++* it under the terms of the GNU General Public License as published by
++* the Free Software Foundation; either version 2 of the License, or
++* (at your option) any later version.
++*
++* This program is distributed in the hope that it will be useful,
++* but WITHOUT ANY WARRANTY; without even the implied warranty of
++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++* GNU General Public License for more details.
++*
++* You should have received a copy of the GNU General Public License
++* along with this program; if not, write to the
++* Free Software Foundation, Inc.,
++* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++***************************************************************************/
++
++// This file was modified by Vincent Damewood 2015-01-04.
++
++#ifndef SDDM_SESSIONMODEL_H
++#define SDDM_SESSIONMODEL_H
++
++#include <QAbstractListModel>
++
++#include <QHash>
++
++class SessionModelPrivate;
++
++class SessionModel : public QAbstractListModel {
++ Q_OBJECT
++ Q_DISABLE_COPY(SessionModel)
++public:
++ enum SessionRole {
++ NameRole = Qt::DisplayRole,
++ FileRole = Qt::UserRole,
++ ExecRole,
++ CommentRole
++ };
++
++ SessionModel(QObject *parent = 0);
++ ~SessionModel();
++
++ //QHash<int, QByteArray> roleNames() const override;
++
++ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
++ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
++
++ int indexOf(const QString& sessionId) const;
++
++private:
++ SessionModelPrivate *d { 0 };
++};
++
++
++#endif // SDDM_SESSIONMODEL_H
+diff -uNr sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/themeconfig.cpp sddm-kcm-new/src/themeconfig.cpp
+--- sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/themeconfig.cpp 2014-01-06 03:51:16.000000000 -0800
++++ sddm-kcm-new/src/themeconfig.cpp 2015-01-04 13:07:54.196803982 -0800
+@@ -1,19 +1,22 @@
+ /*
+ Copyright 2013 by Reza Fatahilah Shah <rshah0385 at kireihana.com>
+-
++
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+-
++
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+-
++
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+- */
++*/
++
++// This file was modified by Vincent Damewood 2015-01-04.
++
+ #include "themeconfig.h"
+ #include "ui_themeconfig.h"
+ #include "themesmodel.h"
+@@ -32,25 +35,25 @@
+ QWidget(parent)
+ {
+ mConfig = KSharedConfig::openConfig(SDDM_CONFIG_FILE, KConfig::SimpleConfig);
+-
++
+ configUi = new Ui::ThemeConfig();
+ configUi->setupUi(this);
+ configUi->customizeBox->setVisible(false);
+-
++
+ ThemesModel *model = new ThemesModel(this);
+ configUi->themesListView->setModel(model);
+-
++
+ ThemesDelegate *delegate = new ThemesDelegate(configUi->themesListView);
+ delegate->setPreviewSize(QSize(128,128));
+ configUi->themesListView->setItemDelegate(delegate);
+ model->populate();
+-
++
+ connect(configUi->themesListView, SIGNAL(activated(QModelIndex)), SLOT(themeSelected(QModelIndex)));
+ connect(configUi->themesListView, SIGNAL(clicked(QModelIndex)), SLOT(themeSelected(QModelIndex)));
+ connect(configUi->selectBackgroundButton, SIGNAL(imagePathChanged(QString)), SLOT(backgroundChanged(QString)));
+-
++
+ prepareInitialTheme();
+-
++
+ dump();
+ }
+
+@@ -65,15 +68,15 @@
+ if (!index.isValid()) {
+ return QVariantMap();
+ }
+-
++
+ QVariantMap args;
+-
+- args["sddm.conf/General/CurrentTheme"] = index.data(ThemesModel::IdRole);
+-
++
++ args["sddm.conf/Theme/Current"] = index.data(ThemesModel::IdRole);
++
+ if (!mThemeConfigPath.isEmpty()) {
+ args["theme.conf.user/General/background"] = mBackgroundPath;
+ }
+-
++
+ return args;
+ }
+
+@@ -88,9 +91,9 @@
+ //configUi->declarativeView->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+ //configUi->declarativeView->setResizeMode( QDeclarativeView::SizeRootObjectToView );
+ //configUi->declarativeView->setSource(mainQmlPath);
+-
+- QString initialTheme = mConfig->group("General").readEntry("CurrentTheme");
+-
++
++ QString initialTheme = mConfig->group("Theme").readEntry("Current");
++
+ QModelIndex index = findThemeIndex(initialTheme);
+ if (!index.isValid()) {
+ //KMessageBox::error(this, i18n("Could not find any themes. \nPlease install SDDM themes."), i18n("No SDDM themes"));
+@@ -103,14 +106,14 @@
+ QModelIndex ThemeConfig::findThemeIndex(const QString &id) const
+ {
+ QAbstractItemModel* model = configUi->themesListView->model();
+-
++
+ for (int i=0; i < model->rowCount(); i++) {
+ QModelIndex index = model->index(i, 0);
+ if (index.data(ThemesModel::IdRole).toString() == id) {
+ return index;
+ }
+ }
+-
++
+ return QModelIndex();
+ }
+
+@@ -120,11 +123,11 @@
+ const QString mainQmlPath = KStandardDirs::locate("data", "sddm-kcm/main.qml");
+ configUi->declarativeView->setSource(mainQmlPath);
+ }
+-
++
+ QString themePath = index.model()->data(index, ThemesModel::PathRole).toString();
+ QString previewFilename = themePath + index.model()->data(index, ThemesModel::PreviewRole).toString();
+-
+-
++
++
+ configUi->declarativeView->rootContext()->setContextProperty("themeName", index.data().toString());
+ configUi->declarativeView->rootContext()->setContextProperty("previewPath", previewFilename);
+ configUi->declarativeView->rootContext()->setContextProperty("authorName", index.data(ThemesModel::AuthorRole).toString());
+@@ -134,7 +137,7 @@
+ configUi->declarativeView->rootContext()->setContextProperty("website", index.data(ThemesModel::WebsiteRole).toString());
+ configUi->declarativeView->rootContext()->setContextProperty("copyright", index.data(ThemesModel::CopyrightRole).toString());
+ configUi->declarativeView->rootContext()->setContextProperty("version", index.data(ThemesModel::VersionRole).toString());
+-
++
+ //Check if we need to display configuration group
+ QString configPath = themePath + index.data(ThemesModel::ConfigFileRole).toString();
+ prepareConfigurationUi(configPath);
+@@ -153,7 +156,7 @@
+ mThemeConfigPath = configPath;
+
+ QFile configFile(configPath);
+-
++
+ if (configFile.exists()) {
+ KSharedConfigPtr themeConfig = KSharedConfig::openConfig(configFile.fileName() + ".user", KConfig::SimpleConfig);
+ configUi->customizeBox->setVisible(true);
+@@ -167,6 +170,6 @@
+ {
+ //dump sddm conf
+ KConfigGroup config = mConfig->group("General");
+-
++
+ kDebug() << "Current theme:" << config.readEntry("CurrentTheme");
+-}
+\ No newline at end of file
++}
+diff -uNr sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/ui/advanceconfig.ui sddm-kcm-new/src/ui/advanceconfig.ui
+--- sddm-kcm-fe615f21637872884bec50ca7c22f9b24c269d82/src/ui/advanceconfig.ui 2014-01-06 03:51:16.000000000 -0800
++++ sddm-kcm-new/src/ui/advanceconfig.ui 2015-01-04 09:52:19.102339230 -0800
+@@ -88,14 +88,37 @@
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="0">
++ <item row="1" column="1">
++ <widget class="QComboBox" name="sessionList"/>
++ </item>
++ <item row="1" column="2">
++ <spacer name="horizontalSpacer_6">
++ <property name="orientation">
++ <enum>Qt::Horizontal</enum>
++ </property>
++ <property name="sizeHint" stdset="0">
++ <size>
++ <width>40</width>
++ <height>20</height>
++ </size>
++ </property>
++ </spacer>
++ </item>
++ <item row="1" column="0" alignment="Qt::AlignRight">
++ <widget class="QLabel" name="label_9">
++ <property name="text">
++ <string>Session</string>
++ </property>
++ </widget>
++ </item>
++ <item row="2" column="0">
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Relogin after quit</string>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="1">
++ <item row="2" column="1">
+ <widget class="QCheckBox" name="reloginAfterQuit">
+ <property name="text">
+ <string/>
diff --git a/sddm-kcm-noreturn.patch b/sddm-kcm-noreturn.patch
new file mode 100644
index 0000000..971ba40
--- /dev/null
+++ b/sddm-kcm-noreturn.patch
@@ -0,0 +1,15 @@
+--- src/themesmodel.cpp.noreturn 2015-01-21 14:11:52.514272590 +0100
++++ src/themesmodel.cpp 2015-01-21 14:12:37.713378047 +0100
+@@ -83,10 +83,10 @@ QVariant ThemesModel::data(const QModelI
+
+ void ThemesModel::populate()
+ {
+- QString themesBaseDir = KSharedConfig::openConfig(SDDM_CONFIG_FILE, KConfig::SimpleConfig)->group("General").readEntry("ThemesDir");
++ QString themesBaseDir = KSharedConfig::openConfig(SDDM_CONFIG_FILE, KConfig::SimpleConfig)->group("Theme").readEntry("ThemeDir");
+
+ if (themesBaseDir.isEmpty())
+- return;
++ themesBaseDir = "/usr/share/sddm/themes";
+
+ QDir dir(themesBaseDir);
+
diff --git a/sddm-kcm.spec b/sddm-kcm.spec
index a28e803..34644ff 100644
--- a/sddm-kcm.spec
+++ b/sddm-kcm.spec
@@ -9,6 +9,9 @@ Summary: SDDM KDE configuration module
Url: https://github.com/sddm/sddm-kcm/
Source0: https://github.com/sddm/sddm-kcm/archive/%{sddm_kcm_commit}.tar.gz
+Patch1: sddm-kcm-new-format.patch
+Patch2: sddm-kcm-noreturn.patch
+
BuildRequires: cmake
BuildRequires: kdelibs4-devel
@@ -21,6 +24,9 @@ Graphical interface to configure SDDM using the KDE system settings.
%prep
%setup -q -n %{name}-%{sddm_kcm_commit}
+%patch1 -p1 -b .format
+%patch2 -p0 -b .noreturn
+
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
More information about the scm-commits
mailing list