Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Add simple clipboard example #118

Merged
merged 1 commit into from
Jun 20, 2019

Conversation

Susurrus
Copy link
Contributor

Ported from https://developer.gnome.org/gtkmm-tutorial/stable/sec-clipboard-examples.html.en

Current implementation works, but is blocking on gtk-rs/gtk#478 and gtk-rs/gdk#148 which are soon to be merged.

There is additional functionality that is blocking on gtk-rs/gtk#479, which hasn't been started, but it's commented out.

@GuillaumeGomez
Copy link
Member

Code seems great. I'll just wait for the feature to be merged before this example if don't mind. Thanks anyway!

@EPashkin
Copy link
Member

EPashkin commented Apr 7, 2017

@GuillaumeGomez GuillaumeGomez changed the base branch from master to pending April 7, 2017 12:49
@GuillaumeGomez GuillaumeGomez force-pushed the pending branch 2 times, most recently from d4e9930 to d45da29 Compare May 6, 2017 17:42
@Susurrus Susurrus force-pushed the clipboard_simple branch 2 times, most recently from addebe1 to 9a46034 Compare November 26, 2017 22:48
@Susurrus Susurrus force-pushed the clipboard_simple branch 4 times, most recently from 6ce543b to dffb987 Compare June 16, 2019 15:39
@Susurrus
Copy link
Contributor Author

Alright, rebased from pending and cleaned up everything. GTK has managed to add all the functionality that was missing for this example over the last 2 years, so now we can finally merge this puppy!

@GuillaumeGomez
Copy link
Member

Closing due to inactivity. Don't hesitate to reopen once updated. :)

@Susurrus
Copy link
Contributor Author

Did you mean to close this issue? I just updated this a few days ago so it's all ready to merge now.

@GuillaumeGomez
Copy link
Member

Sorry, I just looked at the opening date of the PR, not the last update...

@GuillaumeGomez
Copy link
Member

I think you need to update your code. :)

@Susurrus
Copy link
Contributor Author

Yeah, so looks like there were breaking changes on the GTK side. For example Label::new() changed from new<'a, P: Into<Option<&'a str>>>(str: P) -> Label to new(str: Option<&str>) -> Label. Was that a purposeful change? It's nice not having to explicitly write the Some(...) wrapper around my strings, but now it looks like I need to again. I remember this being explicitly added in the past, so was this intentionally removed?

@Susurrus
Copy link
Contributor Author

Okay, started digging in to the git logs and it looks like this was a purposeful change due to the way you need to typecase None, which is annoying in many cases. So I'll update my code since the explicit Option looks to be necessary for the foreseeable future.

@Susurrus
Copy link
Contributor Author

Pushed a new version which should pass CI. So we'll see.

@Susurrus
Copy link
Contributor Author

Alright, it's all updated and passing in CI!

@GuillaumeGomez
Copy link
Member

Thanks! And yes it was on purpose. :)

@GuillaumeGomez GuillaumeGomez merged commit d773d14 into gtk-rs:pending Jun 20, 2019
@Susurrus Susurrus deleted the clipboard_simple branch June 20, 2019 13:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants