From aefd66c0a9bdcc9f9ea1b5e7f516d51576e0eeb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 28 Jan 2026 11:17:48 -0800 Subject: [PATCH 1/3] ScreenCast/Dialog: add icon, explanation text --- data/gresource.xml | 3 +++ src/ScreenCast/Dialog.vala | 6 ++++-- src/ScreenCast/Portal.vala | 2 +- src/ScreenCast/Session.vala | 15 +++++++++++++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/data/gresource.xml b/data/gresource.xml index 69e69cf5..7e848a6f 100644 --- a/data/gresource.xml +++ b/data/gresource.xml @@ -1,6 +1,9 @@ + icons/screencast.svg + icons/screencast.svg + icons/grab-area-symbolic.svg icons/grab-screen-symbolic.svg icons/grab-window-symbolic.svg diff --git a/src/ScreenCast/Dialog.vala b/src/ScreenCast/Dialog.vala index 4bbe8fc8..072daeba 100644 --- a/src/ScreenCast/Dialog.vala +++ b/src/ScreenCast/Dialog.vala @@ -5,7 +5,7 @@ * Authored by: Leonhard Kargl */ -public class ScreenCast.Dialog : Granite.Dialog { +public class ScreenCast.Dialog : Granite.MessageDialog { public SourceType source_types { get; construct; } public bool allow_multiple { get; construct; } @@ -27,6 +27,7 @@ public class ScreenCast.Dialog : Granite.Dialog { monitor_rows = new List (); list_box = new Gtk.ListBox () { + hexpand = true, vexpand = true }; list_box.add_css_class (Granite.STYLE_CLASS_RICH_LIST); @@ -64,8 +65,9 @@ public class ScreenCast.Dialog : Granite.Dialog { child = scrolled_window }; - get_content_area ().append (frame); + custom_bin.append (frame); + resizable = true; default_height = 400; default_width = 300; diff --git a/src/ScreenCast/Portal.vala b/src/ScreenCast/Portal.vala index 2155ee91..38f7870c 100644 --- a/src/ScreenCast/Portal.vala +++ b/src/ScreenCast/Portal.vala @@ -115,7 +115,7 @@ public class ScreenCast.Portal : Object { start.callback (); }); - session.start (parent_window); + session.start (app_id, parent_window); yield; diff --git a/src/ScreenCast/Session.vala b/src/ScreenCast/Session.vala index 3f1324d1..8d852c9d 100644 --- a/src/ScreenCast/Session.vala +++ b/src/ScreenCast/Session.vala @@ -85,8 +85,19 @@ public class ScreenCast.Session : Object { this.cursor_mode = cursor_mode; } - internal void start (string parent_window) { - var dialog = new Dialog (source_types, allow_multiple); + internal void start (string app_id, string parent_window) { + var dialog = new Dialog (source_types, allow_multiple) { + image_icon = new ThemedIcon ("accessories-screencast-tool"), + primary_text = _("An application wants to access the screen"), + secondary_text = _("Select which parts of the screen to share.") + }; + + if (app_id != "") { + var app_info = new DesktopAppInfo (app_id + ".desktop"); + if (app_info != null) { + dialog.primary_text = _("ā€œ%sā€ wants to access the screen").printf (app_info.get_display_name ()); + } + } try { var parent = ExternalWindow.from_handle (parent_window); From 47cc9fcbba56857266d6df6a7f06d161df9c82da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 28 Jan 2026 11:18:06 -0800 Subject: [PATCH 2/3] Add missing icon --- data/icons/screencast.svg | 119 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 data/icons/screencast.svg diff --git a/data/icons/screencast.svg b/data/icons/screencast.svg new file mode 100644 index 00000000..690e16d8 --- /dev/null +++ b/data/icons/screencast.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From e600ae15450c13ead35d00ebffa8ae66a6dc13e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Thu, 29 Jan 2026 10:47:18 -0800 Subject: [PATCH 3/3] Update src/ScreenCast/Session.vala Co-authored-by: William Kelso --- src/ScreenCast/Session.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScreenCast/Session.vala b/src/ScreenCast/Session.vala index 8d852c9d..fe5694b5 100644 --- a/src/ScreenCast/Session.vala +++ b/src/ScreenCast/Session.vala @@ -89,7 +89,7 @@ public class ScreenCast.Session : Object { var dialog = new Dialog (source_types, allow_multiple) { image_icon = new ThemedIcon ("accessories-screencast-tool"), primary_text = _("An application wants to access the screen"), - secondary_text = _("Select which parts of the screen to share.") + secondary_text = _("Select which parts of the screen to share:") }; if (app_id != "") {