Re: getting system UI defaults



Chuck Crisler wrote:
How do you get system default values such as text color, window
background color, desktop color, etc?
Thank you,
Chuck

You read the gconf settings. For example, in vala:

public static string getSystemDefaultMonospaceFont() {
  string value = "";
  var gc = GConf.Client.get_default ();
  try {
    value = gc.get_string("/desktop/gnome/interface/monospace_font_name");
  } catch (GLib.Error e) {
    warning(_("Unable to retrieve gconf key: %s"), e.message);
    value = "Monospace 10";
  }
  return value;
}

- Mike



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