Skip to content

The StatusIcon protocol for the XApp is an unnecessary overwork and a divergent project. #1

Closed
@lestcape

Description

@lestcape

Is there any special reason of why is needed a new API, or is just because it's fun have something different? With this, the shell programmer of other environments will need to be worried about the new XApp implementation and i think this is not fun then. If i understand correctly the XApp idea was to provide a commons place for programmers to not duplicate the work just because they want to target a different Human Interface Guidelines (HIG) and that is always good. But the new protocol seem to be the opposite of the initial idea. Here I think that is adding more work and is creating a different philosophy to be worried about. So, in my opinion this is NOT NICE!

What is the idea of add another protocol to Linux? Can not be used some current API and avoid the overwork? I think that this new protocol create an overwork in the client side (the application) and in the server side (the shell that want to support the new protocol for the XApp).

In the server side:
In the server side the are alternatives like the ApplicationIndicators that resolve the problems that have the StatusIcon implementation of Gtk. Why don't use it then?

Also there are people in GNOME trying to find with the KDE people an unify mechanism that not add more overwork to Linux (https://gitlab.gnome.org/GNOME/gnome-shell/issues/1014). Maybe the best idea is join to that initiative and all together find the best thing to do for all sides?

In the client side:
Create another specific API for the XApp seem to be not to much problematic as could be the case of the server side. This is because the problem here will reside in the specific programmer that want to use the new API only. Anyway, this seem to be also unnecessary, because can be used the same API of Gtk.StatusIcon and behind the scene implement a different behaviour that resolve that problematic. This have the advantage that can be apply to all applications, also if they are not an XApp and it can be complete transparent and platform specific. So, if the platform want that behaviour it can be used it, but if not, the current behaviour will be continues applying to all app, so the standard Gtk.StatusIcon, will continues be working.

The idea can be implemented changing the Gtk implementation (the Gtk.StatusIcon implementation) in the environment where this is need (example: The LinuxMint distribution). Another alternative is the creation of a GtkModule to internally override in execution time the Gtk.StatusIcon implementation. Also another way more that also work on real time is hack the Gtk application launch environment and modifying the LD_PRELOAD environment variable in that launch context with the path of some shared library, as that library will be loaded before any other library, for example:

$ LD_PRELOAD=/path/to/my/gtkStatusIconImplementation.so

Read more info here.

All in all:
There are alternatives like add a patch to Gtk and intercept all calls to create a Gtk.StatusIcon and then convert it in an instance of an AppIndicator behind the scene, without a developer intervention. If you don't want to modify Gtk, you can also launch your application in an environment where you can modify the call to the Gtk library in real time and also convert it to a AppIndicator API.

I hope this help to find a better way than create more divergence in Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions