From b84b266431e32e2fb9ba89194f9fd0c7506ef6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 28 Jan 2026 16:30:53 -0800 Subject: [PATCH 1/4] ScreenCast/Dialog: check when row activated --- src/ScreenCast/Dialog.vala | 9 +++++++++ src/ScreenCast/SelectionRow.vala | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ScreenCast/Dialog.vala b/src/ScreenCast/Dialog.vala index 4bbe8fc8..61e6fb38 100644 --- a/src/ScreenCast/Dialog.vala +++ b/src/ScreenCast/Dialog.vala @@ -77,6 +77,15 @@ public class ScreenCast.Dialog : Granite.Dialog { to_val.set_boolean (n_selected > 0); return true; }); + + list_box.row_activated.connect ((row) => { + if (row == null) { + return; + } + + var check_button = ((SelectionRow) row).check_button; + check_button.active = !check_button.active; + }); } private async void populate_windows () { diff --git a/src/ScreenCast/SelectionRow.vala b/src/ScreenCast/SelectionRow.vala index 58bb7c7e..238cf620 100644 --- a/src/ScreenCast/SelectionRow.vala +++ b/src/ScreenCast/SelectionRow.vala @@ -12,7 +12,7 @@ public class ScreenCast.SelectionRow : Gtk.ListBoxRow { public Icon icon { get; construct; } public Gtk.CheckButton? group { get; construct; } - public Gtk.CheckButton check_button { get; construct; } + public Gtk.CheckButton check_button { get; private set; } public bool selected { get; set; default = false; } From 619f4d7137508ba1cd890a2258651000c1de1b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 28 Jan 2026 16:31:44 -0800 Subject: [PATCH 2/4] Remove null check --- src/ScreenCast/Dialog.vala | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ScreenCast/Dialog.vala b/src/ScreenCast/Dialog.vala index 61e6fb38..0718a7b2 100644 --- a/src/ScreenCast/Dialog.vala +++ b/src/ScreenCast/Dialog.vala @@ -79,10 +79,6 @@ public class ScreenCast.Dialog : Granite.Dialog { }); list_box.row_activated.connect ((row) => { - if (row == null) { - return; - } - var check_button = ((SelectionRow) row).check_button; check_button.active = !check_button.active; }); From 7b1997606d34fc7d8ac5e3387d0bf08cd6db8054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Fri, 30 Jan 2026 10:51:59 -0800 Subject: [PATCH 3/4] Child in checkbutton --- src/ScreenCast/Dialog.vala | 5 ----- src/ScreenCast/SelectionRow.vala | 13 +++++++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/ScreenCast/Dialog.vala b/src/ScreenCast/Dialog.vala index ebe445a9..cd816563 100644 --- a/src/ScreenCast/Dialog.vala +++ b/src/ScreenCast/Dialog.vala @@ -78,11 +78,6 @@ public class ScreenCast.Dialog : Granite.MessageDialog { to_val.set_boolean (n_selected > 0); return true; }); - - list_box.row_activated.connect ((row) => { - var check_button = ((SelectionRow) row).check_button; - check_button.active = !check_button.active; - }); } private async void populate_windows () { diff --git a/src/ScreenCast/SelectionRow.vala b/src/ScreenCast/SelectionRow.vala index 75defc33..b81a5a47 100644 --- a/src/ScreenCast/SelectionRow.vala +++ b/src/ScreenCast/SelectionRow.vala @@ -45,10 +45,6 @@ public class ScreenCast.SelectionRow : Gtk.ListBoxRow { } construct { - check_button = new Gtk.CheckButton () { - group = group - }; - var image = new Gtk.Image.from_gicon (icon) { icon_size = LARGE }; @@ -65,14 +61,19 @@ public class ScreenCast.SelectionRow : Gtk.ListBoxRow { label_box.append (title_label); var box = new Granite.Box (HORIZONTAL, NONE); - box.append (check_button); box.append (image); box.append (label_box); + check_button = new Gtk.CheckButton () { + child = box, + group = group + }; + var list_item = new Granite.ListItem () { - child = box + child = check_button }; + child = list_item; check_button.bind_property ("active", this, "selected", DEFAULT); From 566c673ab898c04985236af0c8cf05c355e73a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Fri, 30 Jan 2026 10:53:39 -0800 Subject: [PATCH 4/4] Remove extra whitespace --- src/ScreenCast/SelectionRow.vala | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ScreenCast/SelectionRow.vala b/src/ScreenCast/SelectionRow.vala index b81a5a47..95e7f1d0 100644 --- a/src/ScreenCast/SelectionRow.vala +++ b/src/ScreenCast/SelectionRow.vala @@ -73,7 +73,6 @@ public class ScreenCast.SelectionRow : Gtk.ListBoxRow { child = check_button }; - child = list_item; check_button.bind_property ("active", this, "selected", DEFAULT);