sciancio / connectionmanager2

Simple GUI app for Gnome 3 that provides a menu for initiating SSH/Telnet connections
60 stars 45 forks source link

Failed to start in Gnome 42.0 #73

Open pieska opened 2 years ago

pieska commented 2 years ago

It fails to load in fedora core 36, gnome 42.0 (again):

gnome-shell[1514]: JS ERROR: Extension connectionmanager2@ciancio.net: TypeError: Object 0x108ab3f26940 is not a subclass of GObject_Object, it's a Object
                                                           _construct@resource:///org/gnome/gjs/modules/script/_legacy.js:536:31
                                                           wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:83:27
                                                           newClass@resource:///org/gnome/gjs/modules/script/_legacy.js:115:21
                                                           Class@resource:///org/gnome/gjs/modules/script/_legacy.js:66:16
                                                           @/home/pharaoh/.local/share/gnome-shell/extensions/connectionmanager2@ciancio.net/extension.js:49:27
                                                           _callExtensionInit@resource:///org/gnome/shell/ui/extensionSystem.js:435:13
                                                           loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:360:27
                                                           _loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:611:18
                                                           collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:28
                                                           _loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:590:19
                                                           _enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:617:18
                                                           _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:637:14
                                                           init@resource:///org/gnome/shell/ui/extensionSystem.js:55:14
                                                           _initializeUI@resource:///org/gnome/shell/ui/main.js:288:22
                                                           start@resource:///org/gnome/shell/ui/main.js:165:5
                                                           @resource:///org/gnome/shell/ui/init.js:6:17
didierm commented 2 years ago

https://gjs.guide/guides/gjs/legacy-class-syntax.html#comparison-between-legacy-and-es6

didierm commented 2 years ago

I've replaced Lang. incantations with GObject.registerClass , and managed to get CM running in GNOME 42.

pieska commented 2 years ago

that's great, could you do a pull request or post the patch?

didierm commented 2 years ago

CM is quite essential in my workflow. I'v looked at Argos (https://github.com/p-e-w/argos) as a polyvalent and supported replacement candidate, but IIRC, Argos does not provide a (for me essential) search provider.

Over the past few years and by comparing CM code with other extensions code (I don't know a single bit of GNOME/JS/gjs programming), I have modified CM to run with the different GNOME incantations (including the search provider functionality et al). As the changes are all over the place, posting a single patch or diff is useless (and I don't know too much about git either). CM runs perfectly in Fedora 36 (GNOME 42).

I am fully prepared to upload the zip file with the result of that work here, provided someone goes through the trouble to either sort the code out in patches and pull requests (but the project seems largely dormant), or fork the project.

didierm commented 2 years ago

@pieska I just noticed you maintain a fork yourself. Please find attached CM (internal version 6) : connectionmanager6@ciancio.net.zip

Note : CM6 expects to find "~/.connmgr" in ~/.config/connmgr.

pieska commented 2 years ago

@didierm thanks, i took the changes for ES6 from your version, see #72

didierm commented 2 years ago

My pleasure. I gather you did not commit the other changes (search provider stuff, config file location, debugging, etc.) ?

pieska commented 2 years ago

i just took the changes to make it working again. To create nice and correct pull requests i have to understand the changes, which i don't, I'm no software guy and especially no JS guy, it's all greek to me ;-)