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

Gnome shell 3.30 compatibility #299

Merged
merged 7 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "contact@projecthamster.org"
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