gtk-rs-core icon indicating copy to clipboard operation
gtk-rs-core copied to clipboard

Implement FromValueOptional for OsString, PathBuf?

Open nagisa opened this issue 3 years ago • 5 comments

The GString does not necessarily contain UTF-8 data, so being able to convert to less stringent OsString/PathBuf types would help.

nagisa avatar Feb 17 '21 18:02 nagisa

Good idea, and also SetValueOptional. Do you want to send a PR?

sdroege avatar Feb 17 '21 18:02 sdroege

I'll see if I can get to this later. Got to get my application working first before I tackle minor improvements ^^

nagisa avatar Feb 17 '21 18:02 nagisa

Sure :) I'll otherwise do it in the next days, just let me know

sdroege avatar Feb 17 '21 18:02 sdroege

Should probably also add some UTF-8 validation into the glib::GString constructors so it fails early.

sdroege avatar Feb 18 '21 09:02 sdroege

See https://github.com/gtk-rs/gtk3-rs/pull/326

sdroege avatar May 18 '21 08:05 sdroege