mzur / gnome-shell-wsmatrix

GNOME shell extension to arrange workspaces in a two-dimensional grid with workspace thumbnails
GNU General Public License v3.0
462 stars 58 forks source link

Wrap remaining ES6 classes in GObject.registerClass(). #78

Closed ettavolt closed 4 years ago

ettavolt commented 4 years ago

Override Gio.Settings._init instead of constructor. Closes #77.

ettavolt commented 4 years ago

Maybe I need to change formatting a bit?

ViggoGaming commented 4 years ago

hmm idk, is that a fix? IT still dosen't work for me.

ebeem commented 4 years ago

seems like the GObject issue was fixed, but there is another issue with the way settings file gets the schema. Thanks for your contribution.

ettavolt commented 4 years ago

Do you mean "can't use 'in' operator to check for presence of 'schema' in 'org.gnome.shell…"? With my gjs 1.58.2, I had to change from 'constructor' to 'init' in Settings class.

ebeem commented 4 years ago

@ettavolt I am trying your branch, usually, I think extension.js should throw this exception in line 10 in your branch, extensions.js seems to be ok, but prefs.js throws the exception

TypeError: cannot use 'in' operator to search for 'schema' in 'org.gnome.shell....'

TypeError: cannot use 'in' operator to search for 'schema' in 'org.gnome.shell....'

Stack trace:
  _init/_init/<@resource:///org/gnome/gjs/modules/overrides/Gio.js:539:45
  _init@resource:///org/gnome/gjs/modules/overrides/Gio.js:539:17
  buildPrefsWidget@/home/ebeem/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/prefs.js:144:19
  _showPrefs@resource:///org/gnome/shell/extensionPrefs/main.js:57:22
  vfunc_command_line@resource:///org/gnome/shell/extensionPrefs/main.js:351:23
  main@resource:///org/gnome/shell/extensionPrefs/main.js:707:5
  @<main>:1:43
let settings = new Settings(WsMatrix.metadata['settings-schema']);
ebeem commented 4 years ago

@ViggoGaming can you please show the error that you got?

ettavolt commented 4 years ago

What? Same code, but works in one place and not another? However, judging by stacktrace it didn't go through overridden _init in WsMa's Settings. Maybe your session wasn't entirely restarted, only shell was reloaded?

ebeem commented 4 years ago

my bad, seems like not all files were pulled from your branch for some reason. it's actually working properly. Thanks!

ettavolt commented 4 years ago

Now it's

var X = GO.rC(
class X extends GODescendant {
…
});

And GitHub shows less changes.