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

Impl Write on text buffers #1452

Merged
merged 1 commit into from
Aug 6, 2023
Merged

Impl Write on text buffers #1452

merged 1 commit into from
Aug 6, 2023

Conversation

ranfdev
Copy link
Member

@ranfdev ranfdev commented Aug 4, 2023

Text is always written at the end. I could insert the text at cursor position, but I think inserting always at the end provides more consistent behavior.

@ranfdev ranfdev changed the title Impl Write on text buffers and Editable widgets Impl Write on text buffers Aug 4, 2023
@ranfdev
Copy link
Member Author

ranfdev commented Aug 4, 2023

I wanted to implement it also over IsA<Editable> but I'm unable to, because of rust's restrictions on doing blanked implementations of foreign traits.

Nevermind, I'll settle for implementing this on text buffers.

@bilelmoussaoui
Copy link
Member

I wanted to implement it also over IsA<Editable> but I'm unable to, because of rust's restrictions on doing blanked implementations of foreign traits.

Nevermind, I'll settle for implementing this on text buffers.

You could at least implement it for the provided Editables like Entry/Text ? Not sure if that is a good idea anyway

@ranfdev
Copy link
Member Author

ranfdev commented Aug 4, 2023

Well I could, but the user can also call entry.buffer() and then use Write on that, so... We aren't missing much anyway.

This also keeps things consistent with libadwaita. I'm not going to implement Write on the adw's Editable's.

@bilelmoussaoui bilelmoussaoui merged commit 42ea3eb into gtk-rs:master Aug 6, 2023
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants