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

Fix bug where you can't disable the extension #1

Merged
merged 1 commit into from Aug 30, 2012

Conversation

mathematicalcoffee
Copy link
Contributor

Hi,

I fixed your bug where you can't disable the extension.

When you connect to an event via object.connect(signal, callback); it returns an ID that you can use to disconnect that event later.

So when you disconnect in disable you should use the same IDs that were returned when you connected in enable, not a new connection ID (which is what you are currently doing).

That's why I've created some global variables showID and hideID, I store the ID returned from Overview.connect, and use it to disconnect in disable.

Hope that helps :) Keep up playing with extensions, it's fun!

jancborchardt added a commit that referenced this pull request Aug 30, 2012
Fix bug where you can't disable the extension
@jancborchardt jancborchardt merged commit 6f7d136 into jancborchardt:master Aug 30, 2012
@jancborchardt
Copy link
Owner

People like you is why I love open source. Thank you so much, especially for the good explanation! 🚀

@jancborchardt
Copy link
Owner

And the fix is now up and approved: https://extensions.gnome.org/extension/393/distraction-free/

Thanks again @mathematicalcoffee !

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.

None yet

2 participants