Skip to content

RediWM is a Wayland compositor written in Zig (OpenGL ES) that includes everything in one process

Update users.zig

oxydizer1b2d304de5f6
diff --git a/src/control_center/sections/users.zig b/src/control_center/sections/users.zig
index 6b829b6..ec64100 100644
--- a/src/control_center/sections/users.zig
+++ b/src/control_center/sections/users.zig
@@ -166,6 +166,10 @@ fn tree(s: *Section, cc: *panel.ControlCenter, a: std.mem.Allocator) !W {
}
rows[count] = try selectRow(cc, a, i18n.tr("Session"), "autologin_session", session_labels, selected_session, s.auth != null or s.form != .none or !s.unlocked or snapshot.sessions.len == 0 or snapshot.autologin_user == null, autologinSessionChanged);
count += 1;
+ if (snapshot.autologin_user == null and snapshot.sessions.len > 0) {
+ rows[count] = text(i18n.tr("Choose a user first to pick a session."), 12, true);
+ count += 1;
+ }
rows[count] = text(i18n.tr("Takes effect at next boot. The keyring will not unlock automatically."), 12, true);
count += 1;
return buildCard(a, rows[0..count]);