Re: Gio.GSettings bind Gtk.ColorButton



Hello Andre,

The Gtk.ColorButton has two properties available, color and rgba.
Both are are not simple types. color is Gdk.Color and rgba is Gdk.RGBA.
I converted from the Gdk structure contents to a hex string.
See the extension Activities Configurator.
https://github.com/nls1729/acme-code/tree/master/activities-config
You will find code to do what you need.  The code is fairly simple.

If you have any questions about the code I will be happy to try
and answer them.

Regards,
Norman  


On Sun, 2015-10-18 at 11:32 +0200, Andre 
Hi,

i'm doing my first gnome-shell extension (specifically prefs.js for
gnome-tweak-tool) and was wondering how we bind Gtk.ColorButton with
Gio.GSettings?

Like Gtk.Entry can be bound with 'text' (s), Gtk.CheckButton with
'active' (b) and Gtk.SpinButton with 'value' (i/d). Is there a type
we
can use for Gtk.ColorButton?

Cheers
Andre Schmidt

ps. i was guessing i need to use
https://developer.gnome.org/gio/stable/GSettings.html#g-settings-bind
-with-mapping
to map what ever Gtk.ColorButton uses, to text, but that seems to be
not implemented in javascript.
_______________________________________________
gnome-shell-list mailing list
gnome-shell-list gnome org
https://mail.gnome.org/mailman/listinfo/gnome-shell-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]