Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gtk4Prep] Views: Use EventControllerKey where possible #2380

Merged
merged 3 commits into from
Jan 21, 2024

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Jan 20, 2024

An EventControllerKey is added to AbstractDirectoryView.

It was still necessary to handle Gdk.EventKey in some places, in particular to override the native behaviour of Gtk.TreeView. This will become unnecessary on porting to Gtk4.

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

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

Works as expected afaict. Nice job

clipboard.changed.connect (on_clipboard_changed);
connect_tree_signals ();

update_menu_actions ();
}

key_controller.propagation_phase = value ? Gtk.PropagationPhase.NONE : Gtk.PropagationPhase.BUBBLE;
Copy link
Member

Choose a reason for hiding this comment

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

that's clever

@danirabbit danirabbit enabled auto-merge (squash) January 21, 2024 23:10
@danirabbit danirabbit merged commit 9abf00b into main Jan 21, 2024
4 checks passed
@danirabbit danirabbit deleted the jeremypw/gtk4prep-eventkey-views branch January 21, 2024 23:11
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