Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from mathematicalcoffee/master

Fix bug where you can't disable the extension
  • Loading branch information...
commit 6f7d1363acb836e09b791bc1da0905d7d4e1a6de 2 parents 73282a5 + ac1ef8b
@jancborchardt authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 distraction-free@jancborchardt.net/extension.js
View
10 distraction-free@jancborchardt.net/extension.js
@@ -5,21 +5,23 @@ const Overview = imports.ui.main.overview;
const Panel = imports.ui.main.panel;
const MessageTray = imports.ui.main.messageTray;
+let showID, hideID;
+
function init() {
}
function enable() {
hideDistractions();
Panel._activitiesButton.actor.hide();
- Overview.connect('hiding', hideDistractions);
- Overview.connect('showing', showDistractions);
+ hideID = Overview.connect('hiding', hideDistractions);
+ showID = Overview.connect('showing', showDistractions);
}
function disable() {
+ Overview.disconnect(showID);
+ Overview.disconnect(hideID);
showDistractions();
Panel._activitiesButton.actor.show();
- Overview.disconnect(Overview.connect('hiding', hideDistractions));
- Overview.disconnect(Overview.connect('showing', showDistractions));
}
function hideDistractions() {
Please sign in to comment.
Something went wrong with that request. Please try again.