Skip to content

Gtk4Prep: ProjectChooserButton#1753

Open
jeremypw wants to merge 5 commits into
masterfrom
jeremypw/gtk4prep/project-button
Open

Gtk4Prep: ProjectChooserButton#1753
jeremypw wants to merge 5 commits into
masterfrom
jeremypw/gtk4prep/project-button

Conversation

@jeremypw

@jeremypw jeremypw commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator
  • Use Controller instead of button_release_event
  • Define action and target on each listboxrow instead of deprecated get_action_group/activate_action
  • Do not listen to listbox remove signal - the GitManager is source of truth and we already listen to changes there. There is no way to remove rows (projects) through the UI of this widget.

This should work in Gtk4 with minimal changes for porting purposes.

There are no dead areas when clicking on the listboxrows.

}
});

project_listbox.row_activated.connect ((row) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rows can be activated in other ways than just button presses, such as with the keyboard. So we really need to keep this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Are you sure? The rows are bound to an action now so it doesn't matter how they are activated, the action will fire.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't think itts possible for the checkboxes to get focus and change without activating the row but I'll check.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ok, it is possible (though not obvious how) so I'll make the checkbuttons non-focusable.

@jeremypw

Copy link
Copy Markdown
Collaborator Author

I've fixed it so that it is possible to operate the chooser with the keyboard (once it has been opened) but because of a previously reported css bug (upstream) there is no visible focus on the rows. But the whole issue of keyboard accessibility needs revisiting after the port anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants