summaryrefslogtreecommitdiff
path: root/bin/dconf.c
blob: 318d42feeff6a32fd80886b58bf23e5738bf6eb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <dconf.h>

int
main (int argc, char **argv)
{
  DConfClient *client;
  GVariant *value;

  g_type_init ();

  client = dconf_client_new (NULL, NULL, NULL, NULL);

  value = dconf_client_read (client, argv[1], DCONF_READ_NORMAL);

  if (value == NULL)
    g_print ("(null)\n");
  else
    {
      gchar *printed;
      printed = g_variant_print (value, TRUE);
      g_print ("%s\n", printed);
      g_variant_unref (value);
      g_free (printed);
    }

  return 0;
}