Skip to content

Commit

Permalink
Merge pull request #299 from hedayat/master
Browse files Browse the repository at this point in the history
Gnome shell 3.30 compatibility.
  • Loading branch information
mwilck authored Mar 25, 2020
2 parents 16b7a0e + d850644 commit cd1f1b5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ clean-docs:
clean-test-docs:
$(MAKE) -C docs clean SPHINX_BUILDDIR=$(SPHINX_TEST_SPHINX_BUILDDIR)

collect:
mkdir -p $(BUILDDIR)
$(BUILDDIR):
mkdir -p $@

$(BUILDDIR)/convenience.js: $(BUILDDIR)
wget https://gitlab.gnome.org/GNOME/gnome-shell-extensions/raw/gnome-3-30/lib/convenience.js -O $@

collect: $(BUILDDIR)/convenience.js
cp -R extension/* $(BUILDDIR)
cp -R data/* $(BUILDDIR)
wget https://gitlab.gnome.org/GNOME/gnome-shell-extensions/raw/master/lib/convenience.js -O $(BUILDDIR)/convenience.js

compile: collect
glib-compile-schemas $(BUILDDIR)/schemas
Expand All @@ -71,7 +75,7 @@ develop:
pip install -U pip setuptools wheel
pip install -U -r requirements.pip

dist: clean-build compile
dist: compile
# We need to do this like this as 'zip' always uses the cwd as archive root.
# And for the extension to work extension.js etc. need to be at the root.
mkdir -p $(DISTDIR);
Expand Down
3 changes: 2 additions & 1 deletion data/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"3.22",
"3.24",
"3.26",
"3.28"
"3.28",
"3.30"
],
"url": "https://github.com/projecthamster/hamster-shell-extension.git",
"uuid": "[email protected]"
Expand Down
12 changes: 3 additions & 9 deletions extension/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function Controller(extensionMeta) {
windowsProxy_vanished_callback.bind(this));

this.apiProxy.connectSignal('ActivitiesChanged', Lang.bind(this, this.refreshActivities));
this.activities = this.refreshActivities();
this.refreshActivities();

Main.panel.menuManager.addMenu(this.panelWidget.menu);
Main.wm.addKeybinding("show-hamster-dropdown",
Expand All @@ -193,8 +193,6 @@ function Controller(extensionMeta) {
global.log('Shutting down hamster-shell-extension.');
this._removeWidget(this.placement);
Main.panel.menuManager.removeMenu(this.panelWidget.menu);
GLib.source_remove(this.panelWidget.timeout);
this.panelWidget.actor.destroy();
this.panelWidget.destroy();
this.panelWidget = null;
this.apiProxy = null;
Expand All @@ -218,15 +216,11 @@ function Controller(extensionMeta) {
controller.apiProxy.GetActivitiesRemote("", Lang.bind(this, function([response], err) {
controller.runningActivitiesQuery = false;
controller.activities = response;
global.log('ACTIVITIES HAMSTER: ', controller.activities);
}));

global.log('ACTIVITIES HAMSTER: ', controller.activities);
return controller.activities;
}

let result = getActivities(this);
this.activities = result;
return result;
getActivities(this);
},

/**
Expand Down

0 comments on commit cd1f1b5

Please sign in to comment.