cinatic / taskwhisperer

Taskwhisperer is a extension for TaskWarrior Application https://taskwarrior.org. It is to display upcoming tasks and task details as well as to create and modify them.
GNU General Public License v3.0
141 stars 20 forks source link

Add support for Gnome 40 #86

Closed tasmo closed 3 years ago

tasmo commented 3 years ago

Would be great to get the extension running in latest Gnome Shell again.

cinatic commented 3 years ago

do you get errors? it is running normally on my archlinux gnome 40.0 setup

tasmo commented 3 years ago

Thank you for sharing you positive experience!

I just cannot install it:

TypeError: ExtensionUtils.versionCheck is not a function

Stack trace:
  initTranslations@/home/user/.local/share/gnome-shell/extensions/taskwhisperer-extension@infinicode.de/helpers/translations.js:52:22
  init@/home/user/.local/share/gnome-shell/extensions/taskwhisperer-extension@infinicode.de/prefs.js:268:21
  _init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:207:25
  OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
  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
cinatic commented 3 years ago

thanks for the report, that is odd, what distro are you using?

Could you please try to replace the initTranslations at the bottom ~/.local/share/gnome-shell/extensions/taskwhisperer-extension@infinicode.de/helpers/translations.js with the following and then try to reload (alt+f2, r) or relogin

var initTranslations = domain => {
    const extension = ExtensionUtils.getCurrentExtension()

    domain = domain || SETTINGS_SCHEMA_DOMAIN || extension.metadata['gettext-domain']

    // check if this extension was built with "make zip-file", and thus
    // has the locale files in a subfolder
    // otherwise assume that extension has been installed in the
    // same prefix as gnome-shell
    const localeDir = extension.dir.get_child('locale')
    if (localeDir.query_exists(null)) {
      Gettext.bindtextdomain(domain, localeDir.get_path())
    } else {
      Gettext.bindtextdomain(domain, Config.LOCALEDIR)
    }
}
cinatic commented 3 years ago

ok don't mind i was only parially on the new version, i need to fix several things

tasmo commented 3 years ago

Thank you for caring! Meanwhile I'll try the quickfix. The distro is Fedora 34.

Edit: It works. \o/

cinatic commented 3 years ago

nice but the settings are still buggy, can you do me a favor and check if this is working for you including the settings?

taskwhisperer-extension.zip.zip

tasmo commented 3 years ago

@cinatic Yes, works great!