Commit ed756899 authored by Jan Blackquill's avatar Jan Blackquill 🌈 Committed by Nate Graham

[kcms/users] Open logged in user in two-column view when opening KCM

parent 2daee11f
......@@ -28,6 +28,7 @@ import QtQuick.Controls 2.5 as QQC2
import org.kde.kcm 1.2 as KCM
import org.kde.kirigami 2.13 as Kirigami
import org.kde.kcoreaddons 1.0 as KCoreAddons
import org.kde.plasma.kcm.users 1.0
KCM.ScrollViewKCM {
id: root
......@@ -40,6 +41,11 @@ KCM.ScrollViewKCM {
implicitWidth: Kirigami.Units.gridUnit * 30
implicitHeight: Kirigami.Units.gridUnit * 20
Component.onCompleted: {
kcm.columnWidth = Kirigami.Units.gridUnit * 15
kcm.push("UserDetailsPage.qml", {user: kcm.userModel.getLoggedInUser()})
}
view: ListView {
id: userList
model: kcm.userModel
......
......@@ -48,6 +48,7 @@ KCMUser::KCMUser(QObject *parent, const QVariantList &args)
m_dbusInterface(new OrgFreedesktopAccountsInterface(QStringLiteral("org.freedesktop.Accounts"), QStringLiteral("/org/freedesktop/Accounts"), QDBusConnection::systemBus(), this)),
m_model(new UserModel(this))
{
qmlRegisterUncreatableType<User>("org.kde.plasma.kcm.users", 1, 0, "User", QString());
KAboutData* about = new KAboutData(QStringLiteral("kcm_users"), i18n("Manage user accounts"),
QStringLiteral("0.1"), QString(), KAboutLicense::GPL);
about->addAuthor(i18n("Nicolas Fella"), QString(), QStringLiteral("nicolas.fella@gmx.de"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment