Changeset View
Changeset View
Standalone View
Standalone View
greeter/greeterapp.cpp
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Line(s) | 167 | { | |||
---|---|---|---|---|---|
191 | m_wallpaperIntegration->setConfig(KScreenSaverSettings::self()->sharedConfig()); | 191 | m_wallpaperIntegration->setConfig(KScreenSaverSettings::self()->sharedConfig()); | ||
192 | m_wallpaperIntegration->setPluginName(KScreenSaverSettings::self()->wallpaperPlugin()); | 192 | m_wallpaperIntegration->setPluginName(KScreenSaverSettings::self()->wallpaperPlugin()); | ||
193 | m_wallpaperIntegration->init(); | 193 | m_wallpaperIntegration->init(); | ||
194 | 194 | | |||
195 | m_lnfIntegration->setPackage(package); | 195 | m_lnfIntegration->setPackage(package); | ||
196 | m_lnfIntegration->setConfig(KScreenSaverSettings::self()->sharedConfig()); | 196 | m_lnfIntegration->setConfig(KScreenSaverSettings::self()->sharedConfig()); | ||
197 | m_lnfIntegration->init(); | 197 | m_lnfIntegration->init(); | ||
198 | 198 | | |||
199 | const KUser user; | ||||
200 | const QString fullName = user.property(KUser::FullName).toString(); | ||||
201 | | ||||
202 | m_userName = fullName.isEmpty() ? user.loginName() : fullName; | ||||
203 | m_userImage = user.faceIconPath(); | ||||
199 | 204 | | |||
200 | installEventFilter(this); | 205 | installEventFilter(this); | ||
201 | } | 206 | } | ||
202 | 207 | | |||
203 | void UnlockApp::initializeWayland() | 208 | void UnlockApp::initializeWayland() | ||
204 | { | 209 | { | ||
205 | if (!platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { | 210 | if (!platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { | ||
206 | return; | 211 | return; | ||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 295 | if (m_plasmaShell) { | |||
292 | if (Surface *surface = Surface::fromWindow(view)) { | 297 | if (Surface *surface = Surface::fromWindow(view)) { | ||
293 | PlasmaShellSurface *shellSurface = m_plasmaShell->createSurface(surface, view); | 298 | PlasmaShellSurface *shellSurface = m_plasmaShell->createSurface(surface, view); | ||
294 | view->setProperty("plasmaShellSurface", QVariant::fromValue(shellSurface)); | 299 | view->setProperty("plasmaShellSurface", QVariant::fromValue(shellSurface)); | ||
295 | } | 300 | } | ||
296 | } | 301 | } | ||
297 | 302 | | |||
298 | // engine stuff | 303 | // engine stuff | ||
299 | QQmlContext* context = view->engine()->rootContext(); | 304 | QQmlContext* context = view->engine()->rootContext(); | ||
300 | const KUser user; | | |||
301 | const QString fullName = user.property(KUser::FullName).toString(); | | |||
302 | 305 | | |||
303 | context->setContextProperty(QStringLiteral("kscreenlocker_userName"), fullName.isEmpty() ? user.loginName() : fullName); | 306 | context->setContextProperty(QStringLiteral("kscreenlocker_userName"), m_userName); | ||
304 | context->setContextProperty(QStringLiteral("kscreenlocker_userImage"), user.faceIconPath()); | 307 | context->setContextProperty(QStringLiteral("kscreenlocker_userImage"), m_userImage); | ||
305 | context->setContextProperty(QStringLiteral("authenticator"), m_authenticator); | 308 | context->setContextProperty(QStringLiteral("authenticator"), m_authenticator); | ||
306 | context->setContextProperty(QStringLiteral("org_kde_plasma_screenlocker_greeter_interfaceVersion"), 2); | 309 | context->setContextProperty(QStringLiteral("org_kde_plasma_screenlocker_greeter_interfaceVersion"), 2); | ||
307 | context->setContextProperty(QStringLiteral("org_kde_plasma_screenlocker_greeter_view"), view); | 310 | context->setContextProperty(QStringLiteral("org_kde_plasma_screenlocker_greeter_view"), view); | ||
308 | context->setContextProperty(QStringLiteral("defaultToSwitchUser"), m_defaultToSwitchUser); | 311 | context->setContextProperty(QStringLiteral("defaultToSwitchUser"), m_defaultToSwitchUser); | ||
309 | context->setContextProperty(QStringLiteral("config"), m_lnfIntegration->configuration()); | 312 | context->setContextProperty(QStringLiteral("config"), m_lnfIntegration->configuration()); | ||
310 | 313 | | |||
311 | view->setSource(m_mainQmlPath); | 314 | view->setSource(m_mainQmlPath); | ||
312 | // on error, load the fallback lockscreen to not lock the user out of the system | 315 | // on error, load the fallback lockscreen to not lock the user out of the system | ||
▲ Show 20 Lines • Show All 444 Lines • Show Last 20 Lines |