How to manage application profiles with GSettings ?

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

 



I have a little application with settings that are saved with GSettings in the DConf backend. Now I want to be able to manage profiles, ie: a list of different settings that users can save, choose, edit or delete. I looked at some sources of well known applications in order to see how it is done and it seems that everything is done with GSettings:

For example in gnome-terminal :

https://github.com/GNOME/gnome-terminal/blob/master/src/org.gnome.Terminal.gschema.xml#L97

they define a SettingsList base schema :

<schema id="org.gnome.Terminal.SettingsList">
    <key name="list" type="as">
      <default>[]</default>
    </key>
    <key name="default" type="s">
      <default>''</default>
    </key>
  </schema>


then a Profiles list schema:

<schema id="org.gnome.Terminal.ProfilesList"
          extends="org.gnome.Terminal.SettingsList"
          path="/org/gnome/terminal/legacy/profiles:/">
    <override name="list">['b1dcc9dd-5262-4d8d-a863-c897e6d979b9']</override>     <override name="default">'b1dcc9dd-5262-4d8d-a863-c897e6d979b9'</override>
  </schema>


then they define a terminal profile schema that describe all the settings of a profile. Can someone explain me how does it work and if there is another way to manage a list of profiles?


Regards


Cédric Le Moigne

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux