Skip to content

Comments

Access: use PortalDialog#178

Open
danirabbit wants to merge 5 commits intomainfrom
danirabbit/access-portaldialog
Open

Access: use PortalDialog#178
danirabbit wants to merge 5 commits intomainfrom
danirabbit/access-portaldialog

Conversation

@danirabbit
Copy link
Member

Screenshot from 2026-02-13 08 30 04@2x Screenshot from 2026-02-13 08 46 24

@danirabbit danirabbit added this to OS 9 Feb 13, 2026
@danirabbit danirabbit moved this to Needs Review in OS 9 Feb 13, 2026
@danirabbit danirabbit requested a review from a team February 13, 2026 16:49
danirabbit and others added 2 commits February 13, 2026 14:06
Co-authored-by: Ryo Nakano <ryonakaknock3@gmail.com>
@danirabbit danirabbit requested a review from ryonakano February 13, 2026 22:09
Copy link
Member

@ryonakano ryonakano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few other comments and questions.


allow_button.clicked.connect (() => response (ResponseType.ALLOW));
cancel_button.clicked.connect (() => response (ResponseType.CANCEL));
close_request.connect (() => { response (ResponseType.CANCEL); });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is CANCEL instead of DELETE_EVENT here expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great question. I just copied what was already being done in AccessDialog. There's no close button and the escape key doesn't close the dialog, but you can secondary click on the header to close from the context menu. So I'm guessing this was done so that we fail safely in that case and make sure permission isn't granted unless an explicit choice is made

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, doesn't calling response (ResponseType.DELETE_EVENT) return the caller of PortalDialog and Portal classes (i.e. apps that requested access) that its access request was rejected then? 🤔 Also Access.Dialog.on_close() calls response (DELETE_EVENT); instead of response (CANCEL);.

We should leave a comment why we use CANCEL instead of DELETE_EVENT if your guess is true. Otherwise I think we should use DELETE_EVENT.

I just copied what was already being done in AccessDialog.

Could you tell me where is AccessDialog.vala? (Gala or Greeter?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I meant I was trying to just adapt from here:

public override void close () {

But yeah I don't have any strong feelings about this and I didn't put a lot of time into understanding it. Happy to remove this if it doesn't make sense!

@danirabbit danirabbit requested a review from ryonakano February 16, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

2 participants