This PR adds classes to every widget.
Introduces a breaking change for the lock-button, which needs to be
added to the style.css manually if you're using a custom one.
Every widget gets a "widget" class as well as a specific one like an id.
In the future, names/ids should be used for that.
Also cleaned up the sensors a little as well as the related CSS.
Fixes#70.
To facilitate that, Texture now accepts GdkPixbuf instead of raw
uint8_t[], because we can't convert svgs into uint8_t[] easily without
the use of GdkPixbuf.
The margins are still not perfect, but it at least acceptable.
SensorTooltips is required, as the sensor texts break due to being
right-side up.
Implements https://github.com/scorpion-26/gBar/issues/48
g_variant_iter_n_children apparently returns 1 instead of 3 (array =
child, but I don't know).
I inverted the statement, because for empty property, it hasn't any
children.
TeamViewer exposes ToolTip as String (which is not compliant to the spec).
This caused gBar to crash, since we assume, that the tooltip variant is
always a container (struct), which glibc doesn't like.
We now fallback to g_variant_get_string if it is not according to spec
Fixes https://github.com/scorpion-26/gBar/issues/37
Some apps have a tendency to deadlock after registration (notably
KeePassXC). Now we flush before querying the item properties, so any
pending answer should have left the bus, hopefully avoiding the deadlock
ItemPropertyChanged is called multiple times per actual icon change.
senderName is the same, objectPath is the same, but our registered name
for the callback differs.
We can't use the provided name for item searching, since that *can*
differ from the one we registered with (Looking at you, Discord. Discord
registers with org.kde.StatusNotifierItem-*, but calls back with :*.*)
Since then the object path will sometimes be wrong for the name, we just
use the one from the icon we originally registered with. This causes
multiple icons to reload though
Potential fix for https://github.com/scorpion-26/gBar/issues/26
Implements a rough outline of the SNI (StatusNotifierItem) d-bus
protocol for tray icons.
Note: This is currently *very* WIP
Full implementation will close https://github.com/scorpion-26/gBar/issues/5