gpouilloux / gnome-shell-extension-docker

An extension for managing docker containers
GNU General Public License v3.0
146 stars 71 forks source link

Address deprecation warnings #56

Open alessandrodolci opened 4 years ago

alessandrodolci commented 4 years ago

Hello, I went on to fix the problems reported in #54, here is a brief summary:

ByteArray string representation

Calls to ByteArray toString method have been made explicit on Uint8Array objects returned by GLib functions. Compatibility with older Gnome Shell versions has been kept by checking the object type and invoking the method in the correct way.

Actor property on UI classes

Access to actor property belonging to UI classes instances has been replaced by direct access to the instances. This has been done for both DockerMenu as well as DockerSubMenuMenuItem, whose superclasses have now become Clutter actors themselves.

Actually, the warning appeared only for the first of the two classes, but digging inside the library source code for UI elements I found out that the case must be the same for both of the two base classes (namely, PanelMenu.Button and PopupMenu.PopupSubMenuMenuItem), as this exists on the second one, explaining the absence of the warning message:

get actor() {
        /* This is kept for compatibility with current implementation, and we
           don't want to warn here yet since PopupMenu depends on this */
        return this;
    }

I hope you'll find this clear enough and acceptable as well, as always I'll be happy to clarify a bit more or investigate further if needed.

Thank you!