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

Use gtk3 instead of 2 #21

Closed
wants to merge 1 commit into from
Closed

Use gtk3 instead of 2 #21

wants to merge 1 commit into from

Conversation

meskio
Copy link
Contributor

@meskio meskio commented Jan 22, 2019

Closes #4

dlgs_linux.go Outdated
** returning from the dialog functions.
** Not sure how this interacts with an actual GTK app... */
for gtk.EventsPending() {
gtk.MainIteration()
Copy link
Owner

@sqweek sqweek Feb 7, 2019

Choose a reason for hiding this comment

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

Hm, can you elaborate on why this is no longer needed? Is it something to do with the switch to glib.IdleAdd? If that is doing what I think it is doing (submitting a function to be run as part of the main loop), does that break functionality for non-gtk apps?

I tried to test myself but I'm getting build errors upstream and don't have time to investigate tonight, eg.:

# github.com/gotk3/gotk3/glib
../../gotk3/gotk3/glib/glib.go:260: cannot use idleSrc (type *_Ctype_GSource) as type *_Ctype_struct__GSource in function argument
../../gotk3/gotk3/glib/glib.go:283: cannot use timeoutSrc (type *_Ctype_GSource) as type *_Ctype_struct__GSource in function argument
../../gotk3/gotk3/glib/glib.go:294: cannot use src (type *_Ctype_struct__GSource) as type *_Ctype_GSource in function argument

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think they are related, yes. I remember we were having problems as we have other gtk parts in our app, and switched to send the dialogs into the main loop.

I see this approach doesn't work properly in programs that doesn't have a gtk main loop already running. I need to investigate more how to support both our needs and the non-gtk app needs.

@meskio
Copy link
Contributor Author

meskio commented Feb 7, 2019

Let's remove the sending of dialogs into the main loop, and go step by step.

I think now is just the migration to gtk3. And I'll explore the other improvements more before pushing them into a pull-req. Sorry for the noise.

@sqweek
Copy link
Owner

sqweek commented Feb 9, 2019

No apology necessary, thanks for doing the work! I've filed #25 to follow up on the gtk interaction.

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