tarelda / todoist-indicator

A simple, unofficial Todoist extension for Gnome shell which shows the count of open tasks in the top right corner of your screen. Also lets you view your past due/today tasks views in dropdown.
MIT License
12 stars 4 forks source link

Extension crashes on GNOME 40 #3

Closed aadilayub closed 2 years ago

aadilayub commented 3 years ago

The extension is unable to run on GNOME 40, even after manually changing the shell version in metadata.json

{
  "name": "Todoist",
  "description": "Lists tasks from Todoist task manager",
  "shell-version": ["40.4"],
  "uuid": "todoist@tarelda.github.com",
  "settings-schema": "org.gnome.shell.extensions.todoist"
}

image

tarelda commented 3 years ago

@aadilayub I don't use GNOME 40 yet and this extension is not yet compatible with it. I can't give ETA when I will get around to port it.

tarelda commented 2 years ago

I updated to 3.36 and had exact same error. Fixed it and pushed into the main repository. Can you check @aadilayub if it works on 40 after patching the metadata?

tarelda commented 2 years ago

@aadilayub, 37540843c05d227c7e2bf02105f8ea48c240db50 should also fix #2 .

aadilayub commented 2 years ago

I don't get this error anymore! However, I get this error when I try to open the preferences:

The settings of extension todoist@tarelda.github.com had an error:

TypeError: widget.show_all is not a function

Stack trace:

buildPrefsWidget@/home/aadil/.local/share/gnome-shell/extensions/todoist@tarelda.github.com/prefs.js:85:12
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:219:40
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:128:33
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:177:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:206:19
start@resource:///org/gnome/gjs/modules/script/package.js:190:8
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

I'm currently using GNOME 41.2

tarelda commented 2 years ago

@aadilayub well porting guide didn't mention that function was removed ...

Can you try to modify function buildPrefsWidget in prefs.js as follows:

function buildPrefsWidget() {
    let widget = new TodoistPrefsWidget();
    if(typeof widget.show_all != "undefined") widget.show_all();
    return widget;
}

?

aadilayub commented 2 years ago

Yes that worked!