← Back to team overview

elementary-dev-community team mailing list archive

Re: Applying settings (GSettings, Vala)

 

You can listen to Settings Changes according to a example on Gnomes
Vala documentation: https://live.gnome.org/Vala/GSettingsSample


// Change notification for any key in the schema
settings.changed.connect ((key) => {
    print ("Key '%s' changed\n", key);
    print ("New greeting: %s\n", settings.get_string (key));
});

// Change notification for a single key
settings.changed["greeting"].connect (() => {
    print ("New greeting: %s\n", settings.get_string ("greeting"));
});


On Sat, Dec 17, 2011 at 1:08 PM, David Gomes <davidrafagomes@xxxxxxxxx> wrote:
>
> Hey guys,
>
> I've been having an issue with Pantheon Terminal. I have an option in the preferences dialog that shows/hides the toolbar. The switch is linked to a GSetting. So, when I change the switch to true or false, the setting in dconf-editor is changed.
>
> However, the settings will only be applied when the terminal is reopened (I have to reload settings). How can I go about this and do it on the fly? I mean, how can I apply settings instantaneously.
>
> Thanks
>
> --
> Mailing list: https://launchpad.net/~elementary-dev-community
> Post to     : elementary-dev-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~elementary-dev-community
> More help   : https://help.launchpad.net/ListHelp
>



--
Fabian Thoma | Council Member
elementary OS
fabian@xxxxxxxxxxxxxxxx / elementaryos.org


References