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 load in gnome 46.1 (fedora 40) #76

Open pieska opened 2 months ago

pieska commented 2 months ago

sadly, it fails to load, again:

gnome-shell[6320]: Extension connectionmanager2@ciancio.net: TypeError: this._box.add is not a function

                                                           Stack trace:
                                                             ConnectionManager@file:///home/pharaoh/.local/share/gnome-shell/extensions/connectionmanager2@ciancio.net/extension.js:79:19
                                                             enable@file:///home/pharaoh/.local/share/gnome-shell/extensions/connectionmanager2@ciancio.net/extension.js:333:19
                                                             _callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:266:38
                                                             loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:478:32
                                                             async*_loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:786:24
                                                             async*_enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:792:48
                                                             _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:827:20
                                                             async*init@resource:///org/gnome/shell/ui/extensionSystem.js:76:14
                                                             _initializeUI@resource:///org/gnome/shell/ui/main.js:303:22
                                                             start@resource:///org/gnome/shell/ui/main.js:175:11
                                                             @resource:///org/gnome/shell/ui/init.js:12:47
                                                             @resource:///org/gnome/shell/ui/init.js:21:20

Does anyone knows how to fix it?

pieska commented 2 months ago

quick and dirty fix in extension.js:

        this._bin = new St.Bin({child: this._icon});

//        this._box.add(this._bin);
        this._box.actor.add_child(this._bin);
//        this.add_actor(this._box);
        this.actor.add_child(this._box);
        this.add_style_class_name('panel-status-button');

the extension needs probably a rewrite following the gnome shell extension reference guide

sbadger commented 1 month ago

quick and dirty fix in extension.js:

        this._bin = new St.Bin({child: this._icon});

//        this._box.add(this._bin);
        this._box.actor.add_child(this._bin);
//        this.add_actor(this._box);
        this.actor.add_child(this._box);
        this.add_style_class_name('panel-status-button');

the extension needs probably a rewrite following the gnome shell extension reference guide

I'm using the fork for Gnome 45 from @xkahn and this modification worked for me!!! Thanks @pieska

pieska commented 1 month ago

I created a branch for gnome-46: https://github.com/pieska/connectionmanager2/tree/gnome-46

xkahn commented 1 month ago

Ah! Great! I hadn't had time to look at the problem yet. thank you @pieska.

sbadger commented 1 month ago

Also as I just tested the change on gnome 45 (fedora 39) and it worked as well.