Re: Extension/Preferences shared variables
- From: Amy <mathematical coffee gmail com>
- To: Vadim <vadim dbfin com>
- Cc: Gnome-Shell List <gnome-shell-list gnome org>
- Subject: Re: Extension/Preferences shared variables
- Date: Thu, 11 Apr 2013 09:55:30 +1000
Hi Vadim,
Could you just use gsettings (i.e. the same thing that you use with `prefs.js` to store extension settings) for this?
In the `prefs.js` your widget does a:
let settings = Convenience.getSettings();
settings.set_int('my-setting-name', 1);
and in the extension you connect to the change:
// in your init() say
let settings = Convenience.getSettings();
// in your enable() say
settings.connect('changed::my-setting-name', callback)
So `callback` is called whenever a user changes the setting in the prefs widget.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]