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

gtk: Add missing IMContextImpl methods #1394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bilelmoussaoui
Copy link
Member

Fixes #1388

let imp = instance.imp();

imp.set_surrounding_with_selection(
&glib::GString::from_glib_none_num(text, len as usize),
Copy link
Member

Choose a reason for hiding this comment

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

Why create a copy here, and not use e.g. glib::GStr?

Copy link
Member

Choose a reason for hiding this comment

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

Also in other places here

Copy link
Member Author

Choose a reason for hiding this comment

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

IIRC, we don't use glib::GStr in subclassing code at all. That is why I kept it using &str. But anyways, will update once #1678 lands

Copy link
Member

Choose a reason for hiding this comment

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

It might be useful to use if otherwise you just have to convert to a NUL-terminated string again in the end. I don't know if that's the case here

@bilelmoussaoui bilelmoussaoui added this to the 0.9.0 milestone May 31, 2024
@sdroege sdroege modified the milestones: 0.9.0, 0.10 Aug 12, 2024
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.

Add missing IMContextImpl functions
2 participants