From 43a1cef5f857b43b158f78ebdc9012977b4fa3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Mon, 2 Mar 2026 13:49:22 -0800 Subject: [PATCH 1/9] Create Account portal --- data/pantheon.portal | 2 +- po/POTFILES | 1 + src/Account/Portal.vala | 61 +++++++++++++++++++++++++++++++ src/XdgDesktopPortalPantheon.vala | 3 ++ src/meson.build | 1 + 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 src/Account/Portal.vala diff --git a/data/pantheon.portal b/data/pantheon.portal index b9de94e3..dab25b77 100644 --- a/data/pantheon.portal +++ b/data/pantheon.portal @@ -1,4 +1,4 @@ [portal] DBusName=org.freedesktop.impl.portal.desktop.pantheon -Interfaces=org.freedesktop.impl.portal.Access;org.freedesktop.impl.portal.AppChooser;org.freedesktop.impl.portal.Background;org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.Wallpaper;org.freedesktop.impl.portal.ScreenCast +Interfaces=org.freedesktop.impl.portal.Access;org.freedesktop.impl.portal.Account;org.freedesktop.impl.portal.AppChooser;org.freedesktop.impl.portal.Background;org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.Wallpaper;org.freedesktop.impl.portal.ScreenCast UseIn=pantheon diff --git a/po/POTFILES b/po/POTFILES index e43f71dc..f08918f7 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -2,6 +2,7 @@ src/XdgDesktopPortalPantheon.vala src/ExternalWindow.vala src/Access/Portal.vala src/Access/Dialog.vala +src/Account/Portal.vala src/AppChooser/Portal.vala src/AppChooser/Dialog.vala src/AppChooser/AppButton.vala diff --git a/src/Account/Portal.vala b/src/Account/Portal.vala new file mode 100644 index 00000000..e8b3dff6 --- /dev/null +++ b/src/Account/Portal.vala @@ -0,0 +1,61 @@ +/* + * SPDX-FileCopyrigthText: 2026 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +[DBus (name = "org.freedesktop.impl.portal.Account")] +public class Account.Portal : Object { + private DBusConnection connection; + + public Portal (DBusConnection connection) { + this.connection = connection; + } + + [DBus (name = "GetUserInformation")] + public void get_user_information ( + ObjectPath handle, + string app_id, + string parent_window, + HashTable options, + out uint32 response, + out HashTable results + ) throws DBusError, IOError { + var dialog = new PortalDialog () { + title = _("An application wants to access your personal information"), + secondary_icon = new ThemedIcon ("preferences-desktop-useraccounts"), + secondary_text = _("It did not provide a reason for this request."), + parent_handle = parent_window + }; + + if (app_id != "") { + var app_info = new DesktopAppInfo (app_id + ".desktop"); + if (app_info != null) { + dialog.primary_icon = app_info.get_icon (); + dialog.title = _("“%s” wants to access your personal information").printf (app_info.get_display_name ()); + } + } + + if ("reason" in options) { + ("It provided the following reason, “%s”").printf (options["reason"].get_string ()); + } + + var _results = new HashTable (str_hash, str_equal); + var _response = 2; + + dialog.response.connect ((id) => { + switch (id) { + case ALLOW: + _response = 0; + break; + + case CANCEL: + _response = 1; + break; + } + + dialog.destroy (); + }); + + dialog.present (); + } +} diff --git a/src/XdgDesktopPortalPantheon.vala b/src/XdgDesktopPortalPantheon.vala index 1569817e..b83a1ac6 100644 --- a/src/XdgDesktopPortalPantheon.vala +++ b/src/XdgDesktopPortalPantheon.vala @@ -35,6 +35,9 @@ private void on_bus_acquired (DBusConnection connection, string name) { connection.register_object ("/org/freedesktop/portal/desktop", new Access.Portal (connection)); debug ("Access Portal registered!"); + connection.register_object ("/org/freedesktop/portal/desktop", new Account.Portal (connection)); + debug ("Account Portal registered!"); + connection.register_object ("/org/freedesktop/portal/desktop", new AppChooser.Portal (connection)); debug ("AppChooser Portal registered!"); diff --git a/src/meson.build b/src/meson.build index 843990a7..cf5f3091 100644 --- a/src/meson.build +++ b/src/meson.build @@ -3,6 +3,7 @@ executable( 'Access/Choice.vala', 'Access/Dialog.vala', 'Access/Portal.vala', + 'Account' / 'Portal.vala', 'AppChooser/AppButton.vala', 'AppChooser/Dialog.vala', 'AppChooser/Portal.vala', From 84d8ddcad670ff973d1bad644c083e7446aa638c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Mon, 2 Mar 2026 14:07:56 -0800 Subject: [PATCH 2/9] Create dialog class, fix up a bunch of stuff --- po/POTFILES | 1 + src/Account/Dialog.vala | 31 +++++++++++++++++++++++++++++++ src/Account/Portal.vala | 39 ++++++++++++++++++++++----------------- src/meson.build | 1 + 4 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 src/Account/Dialog.vala diff --git a/po/POTFILES b/po/POTFILES index f08918f7..3691af5a 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -2,6 +2,7 @@ src/XdgDesktopPortalPantheon.vala src/ExternalWindow.vala src/Access/Portal.vala src/Access/Dialog.vala +src/Account/Dialog.vala src/Account/Portal.vala src/AppChooser/Portal.vala src/AppChooser/Dialog.vala diff --git a/src/Account/Dialog.vala b/src/Account/Dialog.vala new file mode 100644 index 00000000..d7de1695 --- /dev/null +++ b/src/Account/Dialog.vala @@ -0,0 +1,31 @@ +/* + * SPDX-FileCopyrigthText: 2026 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +[DBus (name = "org.freedesktop.impl.portal.Request")] +public class Account.Dialog : PortalDialog { + // The ID used to register this dialog on the DBusConnection + public uint register_id { get; set; default = 0; } + + // The ID of the app sending the request + public string app_id { get; construct; } + + public Dialog (string app_id) { + Object (app_id: app_id); + } + + construct { + default_height = -1; + title = _("An application wants to access your personal information"); + secondary_icon = new ThemedIcon ("system-users"); + + if (app_id != "") { + var app_info = new DesktopAppInfo (app_id + ".desktop"); + if (app_info != null) { + primary_icon = app_info.get_icon (); + title = _("“%s” wants to access your personal information").printf (app_info.get_display_name ()); + } + } + } +} diff --git a/src/Account/Portal.vala b/src/Account/Portal.vala index e8b3dff6..a00968a4 100644 --- a/src/Account/Portal.vala +++ b/src/Account/Portal.vala @@ -5,6 +5,7 @@ [DBus (name = "org.freedesktop.impl.portal.Account")] public class Account.Portal : Object { + private HashTable handles; private DBusConnection connection; public Portal (DBusConnection connection) { @@ -12,35 +13,31 @@ public class Account.Portal : Object { } [DBus (name = "GetUserInformation")] - public void get_user_information ( + public async void get_user_information ( ObjectPath handle, string app_id, string parent_window, HashTable options, - out uint32 response, + out uint response, out HashTable results ) throws DBusError, IOError { - var dialog = new PortalDialog () { - title = _("An application wants to access your personal information"), - secondary_icon = new ThemedIcon ("preferences-desktop-useraccounts"), - secondary_text = _("It did not provide a reason for this request."), - parent_handle = parent_window + var dialog = new Dialog (app_id) { + parent_handle = parent_window, + secondary_text = _("It did not provide a reason for this request.") }; - if (app_id != "") { - var app_info = new DesktopAppInfo (app_id + ".desktop"); - if (app_info != null) { - dialog.primary_icon = app_info.get_icon (); - dialog.title = _("“%s” wants to access your personal information").printf (app_info.get_display_name ()); - } + if ("reason" in options) { + dialog.secondary_text = _("It provided the following reason, “%s”").printf (options["reason"].get_string ()); } - if ("reason" in options) { - ("It provided the following reason, “%s”").printf (options["reason"].get_string ()); + try { + dialog.register_id = connection.register_object (handle, dialog); + } catch (Error e) { + critical (e.message); } var _results = new HashTable (str_hash, str_equal); - var _response = 2; + uint _response = 2; dialog.response.connect ((id) => { switch (id) { @@ -53,9 +50,17 @@ public class Account.Portal : Object { break; } - dialog.destroy (); + get_user_information.callback (); }); + handles[handle] = dialog; dialog.present (); + yield; + + connection.unregister_object (dialog.register_id); + dialog.destroy (); + + results = _results; + response = _response; } } diff --git a/src/meson.build b/src/meson.build index cf5f3091..76412c8e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -3,6 +3,7 @@ executable( 'Access/Choice.vala', 'Access/Dialog.vala', 'Access/Portal.vala', + 'Account' / 'Dialog.vala', 'Account' / 'Portal.vala', 'AppChooser/AppButton.vala', 'AppChooser/Dialog.vala', From 4c444c927bfa5a7b738947d118974a795ff92e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Mon, 2 Mar 2026 16:52:53 -0800 Subject: [PATCH 3/9] More owl --- .github/workflows/ci.yml | 2 +- data/Application.css | 5 +++ meson.build | 2 ++ src/Account/Dialog.vala | 76 ++++++++++++++++++++++++++++++++++++++-- src/Account/Portal.vala | 9 +++-- src/meson.build | 2 ++ 6 files changed, 90 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7257b07..db0178ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - name: Install Dependencies run: | apt update - apt install -y libgranite-7-dev libgtk-4-dev libpantheon-wayland-1-dev meson valac + apt install -y libaccountsservice-dev libadwaita-1-dev libgranite-7-dev libgtk-4-dev libpantheon-wayland-1-dev meson valac - name: Build run: | meson build diff --git a/data/Application.css b/data/Application.css index 0543b2c9..cbb92291 100644 --- a/data/Application.css +++ b/data/Application.css @@ -14,3 +14,8 @@ .dialog toolbox .bottom button { min-width: 5em; } + +.flat avatar { + border: none; + box-shadow: none; +} diff --git a/meson.build b/meson.build index 1fe653ab..83d8b459 100644 --- a/meson.build +++ b/meson.build @@ -10,6 +10,8 @@ localedir = prefix / get_option('localedir') systemd_dep = dependency('systemd') +act_dep = dependency('accountsservice') +adw_dep = dependency('libadwaita-1') glib_dep = dependency('glib-2.0') gobject_dep = dependency('gobject-2.0') gio_dep = dependency('gio-2.0') diff --git a/src/Account/Dialog.vala b/src/Account/Dialog.vala index d7de1695..d54f8cab 100644 --- a/src/Account/Dialog.vala +++ b/src/Account/Dialog.vala @@ -11,6 +11,18 @@ public class Account.Dialog : PortalDialog { // The ID of the app sending the request public string app_id { get; construct; } + public string user_name; + public string image_uri; + public string real_name; + + private Adw.Avatar avatar; + + public string reason { + set { + secondary_text = _("It provided the following reason, “%s”").printf (value); + } + } + public Dialog (string app_id) { Object (app_id: app_id); } @@ -18,14 +30,74 @@ public class Account.Dialog : PortalDialog { construct { default_height = -1; title = _("An application wants to access your personal information"); - secondary_icon = new ThemedIcon ("system-users"); + secondary_icon = new ThemedIcon ("x-office-address-book"); + secondary_text = _("It did not provide a reason for this request."); if (app_id != "") { var app_info = new DesktopAppInfo (app_id + ".desktop"); if (app_info != null) { primary_icon = app_info.get_icon (); - title = _("“%s” wants to access your personal information").printf (app_info.get_display_name ()); + title = _("“%s” wants to access your name and photo").printf (app_info.get_display_name ()); } } + + user_name = Environment.get_user_name (); + real_name = Environment.get_real_name (); + + avatar = new Adw.Avatar (32, null, false); + avatar.add_css_class (Granite.STYLE_CLASS_FLAT); + + var username_label = new Gtk.Label (user_name) { + halign = START + }; + username_label.add_css_class (Granite.CssClass.DIM); + username_label.add_css_class (Granite.CssClass.SMALL); + + var name_box = new Granite.Box (VERTICAL, NONE) { + valign = CENTER + }; + name_box.append (new Gtk.Label (real_name)); + name_box.append (username_label); + + var box = new Granite.Box (HORIZONTAL, SINGLE); + box.append (avatar); + box.append (name_box); + + var listitem = new Granite.ListItem () { + child = box, + margin_top = 12, + margin_end = 12, + margin_bottom = 12, + margin_start = 12 + }; + listitem.add_css_class (Granite.CssClass.CARD); + + content = listitem; + + var usermanager = Act.UserManager.get_default (); + if (usermanager.is_loaded) { + on_usermanager_loaded (usermanager); + } else { + usermanager.notify["is-loaded"].connect (() => on_usermanager_loaded (usermanager)); + } + } + + private void on_usermanager_loaded (Act.UserManager usermanager) { + var user = usermanager.get_user (user_name); + if (user.is_loaded) { + on_user_loaded (user); + } else { + user.notify["is-loaded"].connect (() => on_user_loaded (user)); + } + + } + + private void on_user_loaded (Act.User user) { + image_uri = user.get_icon_file (); + try { + avatar.custom_image = Gdk.Texture.from_filename (image_uri); + } catch { + debug ("unable to set avatar"); + } } } diff --git a/src/Account/Portal.vala b/src/Account/Portal.vala index a00968a4..7bc3e66c 100644 --- a/src/Account/Portal.vala +++ b/src/Account/Portal.vala @@ -22,12 +22,11 @@ public class Account.Portal : Object { out HashTable results ) throws DBusError, IOError { var dialog = new Dialog (app_id) { - parent_handle = parent_window, - secondary_text = _("It did not provide a reason for this request.") + parent_handle = parent_window }; if ("reason" in options) { - dialog.secondary_text = _("It provided the following reason, “%s”").printf (options["reason"].get_string ()); + dialog.reason = options["reason"].get_string (); } try { @@ -42,6 +41,10 @@ public class Account.Portal : Object { dialog.response.connect ((id) => { switch (id) { case ALLOW: + _results["id"] = dialog.user_name; + _results["name"] = dialog.real_name; + _results["image"] = dialog.image_uri; + _response = 0; break; diff --git a/src/meson.build b/src/meson.build index 76412c8e..82962862 100644 --- a/src/meson.build +++ b/src/meson.build @@ -28,6 +28,8 @@ executable( 'XdgDesktopPortalPantheon.vala', icon_res, dependencies: [ + act_dep, + adw_dep, glib_dep, gobject_dep, gio_dep, From 5a0547f713d1f8a41c3fb32cf44dba7005bb0173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 4 Mar 2026 10:34:44 -0800 Subject: [PATCH 4/9] Add custom icon --- data/gresource.xml | 3 +++ data/icons/account.svg | 42 +++++++++++++++++++++++++++++++++++++++++ src/Account/Dialog.vala | 2 +- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 data/icons/account.svg diff --git a/data/gresource.xml b/data/gresource.xml index 38835c88..9325e836 100644 --- a/data/gresource.xml +++ b/data/gresource.xml @@ -4,6 +4,9 @@ Application.css + icons/account.svg + icons/account.svg + icons/screencast.svg icons/screencast.svg diff --git a/data/icons/account.svg b/data/icons/account.svg new file mode 100644 index 00000000..2cbf827c --- /dev/null +++ b/data/icons/account.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/src/Account/Dialog.vala b/src/Account/Dialog.vala index d54f8cab..5f53f329 100644 --- a/src/Account/Dialog.vala +++ b/src/Account/Dialog.vala @@ -30,7 +30,7 @@ public class Account.Dialog : PortalDialog { construct { default_height = -1; title = _("An application wants to access your personal information"); - secondary_icon = new ThemedIcon ("x-office-address-book"); + secondary_icon = new ThemedIcon ("emblem-portal-account"); secondary_text = _("It did not provide a reason for this request."); if (app_id != "") { From d8c228090298e7c01b88c7ff4f53fea4395bc91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 4 Mar 2026 10:35:45 -0800 Subject: [PATCH 5/9] fix lint --- src/Account/Dialog.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Account/Dialog.vala b/src/Account/Dialog.vala index 5f53f329..12f07810 100644 --- a/src/Account/Dialog.vala +++ b/src/Account/Dialog.vala @@ -76,7 +76,7 @@ public class Account.Dialog : PortalDialog { var usermanager = Act.UserManager.get_default (); if (usermanager.is_loaded) { - on_usermanager_loaded (usermanager); + on_usermanager_loaded (usermanager); } else { usermanager.notify["is-loaded"].connect (() => on_usermanager_loaded (usermanager)); } From 0d034b286a22ef4bbde99161615024ff2a588b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 4 Mar 2026 10:56:38 -0800 Subject: [PATCH 6/9] Handle delete --- src/Account/Dialog.vala | 5 +++++ src/Account/Portal.vala | 6 ++++-- src/PortalDialog.vala | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Account/Dialog.vala b/src/Account/Dialog.vala index 12f07810..a9eeadc1 100644 --- a/src/Account/Dialog.vala +++ b/src/Account/Dialog.vala @@ -100,4 +100,9 @@ public class Account.Dialog : PortalDialog { debug ("unable to set avatar"); } } + + [DBus (name = "Close")] + public void on_close () throws DBusError, IOError { + response (DELETE_EVENT); + } } diff --git a/src/Account/Portal.vala b/src/Account/Portal.vala index 7bc3e66c..21b9921c 100644 --- a/src/Account/Portal.vala +++ b/src/Account/Portal.vala @@ -5,7 +5,6 @@ [DBus (name = "org.freedesktop.impl.portal.Account")] public class Account.Portal : Object { - private HashTable handles; private DBusConnection connection; public Portal (DBusConnection connection) { @@ -51,12 +50,15 @@ public class Account.Portal : Object { case CANCEL: _response = 1; break; + + case DELETE_EVENT: + _response = 2; + break; } get_user_information.callback (); }); - handles[handle] = dialog; dialog.present (); yield; diff --git a/src/PortalDialog.vala b/src/PortalDialog.vala index e63bca71..57ab7459 100644 --- a/src/PortalDialog.vala +++ b/src/PortalDialog.vala @@ -46,7 +46,8 @@ public class PortalDialog : Gtk.Window, PantheonWayland.ExtendedBehavior { public enum ResponseType { ALLOW, - CANCEL + CANCEL, + DELETE_EVENT } /** @@ -125,6 +126,7 @@ public class PortalDialog : Gtk.Window, PantheonWayland.ExtendedBehavior { allow_button.clicked.connect (() => response (ResponseType.ALLOW)); cancel_button.clicked.connect (() => response (ResponseType.CANCEL)); + close_request.connect (() => { response (DELETE_EVENT); }); } private void on_realize () { From 16bfa303f913150459855e871b5b2ed041201d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 4 Mar 2026 11:01:07 -0800 Subject: [PATCH 7/9] send uri --- src/Account/Dialog.vala | 6 +++--- src/Account/Portal.vala | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Account/Dialog.vala b/src/Account/Dialog.vala index a9eeadc1..d69f7a09 100644 --- a/src/Account/Dialog.vala +++ b/src/Account/Dialog.vala @@ -12,7 +12,7 @@ public class Account.Dialog : PortalDialog { public string app_id { get; construct; } public string user_name; - public string image_uri; + public string image_filename; public string real_name; private Adw.Avatar avatar; @@ -93,9 +93,9 @@ public class Account.Dialog : PortalDialog { } private void on_user_loaded (Act.User user) { - image_uri = user.get_icon_file (); + image_filename = user.get_icon_file (); try { - avatar.custom_image = Gdk.Texture.from_filename (image_uri); + avatar.custom_image = Gdk.Texture.from_filename (image_filename); } catch { debug ("unable to set avatar"); } diff --git a/src/Account/Portal.vala b/src/Account/Portal.vala index 21b9921c..57f1da2c 100644 --- a/src/Account/Portal.vala +++ b/src/Account/Portal.vala @@ -42,7 +42,7 @@ public class Account.Portal : Object { case ALLOW: _results["id"] = dialog.user_name; _results["name"] = dialog.real_name; - _results["image"] = dialog.image_uri; + _results["image"] = Filename.to_uri (dialog.image_filename); _response = 0; break; From b7d88b8652043a2ea26b03c8e38e98a482d6313e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Fri, 6 Mar 2026 09:38:28 -0800 Subject: [PATCH 8/9] Add response to id func --- src/Access/Portal.vala | 17 ++++++----------- src/Account/Portal.vala | 16 +++++----------- src/PortalDialog.vala | 15 ++++++++++++++- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/Access/Portal.vala b/src/Access/Portal.vala index e000bb93..7a0bd0bc 100644 --- a/src/Access/Portal.vala +++ b/src/Access/Portal.vala @@ -69,10 +69,10 @@ public class Access.Portal : Object { } var _results = new HashTable (str_hash, str_equal); - var _response = 2; + uint32 _response = 2; - dialog.response.connect ((id) => { - switch (id) { + dialog.response.connect ((response) => { + switch (response) { case ALLOW: var choices_builder = new VariantBuilder (new VariantType ("a(ss)")); @@ -81,18 +81,13 @@ public class Access.Portal : Object { }); _results["choices"] = choices_builder.end (); - _response = 0; break; - - case CANCEL: - _response = 1; - break; - - case DELETE_EVENT: - _response = 2; + default: break; } + _response = response.to_id (); + access_dialog.callback (); }); diff --git a/src/Account/Portal.vala b/src/Account/Portal.vala index 57f1da2c..45bd2aff 100644 --- a/src/Account/Portal.vala +++ b/src/Account/Portal.vala @@ -37,25 +37,19 @@ public class Account.Portal : Object { var _results = new HashTable (str_hash, str_equal); uint _response = 2; - dialog.response.connect ((id) => { - switch (id) { + dialog.response.connect ((response) => { + switch (response) { case ALLOW: _results["id"] = dialog.user_name; _results["name"] = dialog.real_name; _results["image"] = Filename.to_uri (dialog.image_filename); - - _response = 0; break; - - case CANCEL: - _response = 1; - break; - - case DELETE_EVENT: - _response = 2; + default: break; } + _response = response.to_id (); + get_user_information.callback (); }); diff --git a/src/PortalDialog.vala b/src/PortalDialog.vala index 9dc7bdc4..bbb811fe 100644 --- a/src/PortalDialog.vala +++ b/src/PortalDialog.vala @@ -54,7 +54,20 @@ public class PortalDialog : Gtk.Window, PantheonWayland.ExtendedBehavior { public enum ResponseType { ALLOW, CANCEL, - DELETE_EVENT + DELETE_EVENT; + + // Convert to response ID expected by portal backends + public uint32 to_id () { + switch (this) { + case ALLOW: + return 0; + case CANCEL: + return 1; + default: + case DELETE_EVENT: + return 2; + } + } } /** From d3d8c0847953cc6669923dd6048aa21c9d38199e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Fri, 6 Mar 2026 09:40:55 -0800 Subject: [PATCH 9/9] Consistent label --- src/Account/Dialog.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Account/Dialog.vala b/src/Account/Dialog.vala index d69f7a09..157f01cd 100644 --- a/src/Account/Dialog.vala +++ b/src/Account/Dialog.vala @@ -29,7 +29,7 @@ public class Account.Dialog : PortalDialog { construct { default_height = -1; - title = _("An application wants to access your personal information"); + title = _("An application wants to access your name and photo"); secondary_icon = new ThemedIcon ("emblem-portal-account"); secondary_text = _("It did not provide a reason for this request.");