~ubuntu-branches/ubuntu/quantal/gconf/quantal

« back to all changes in this revision

Viewing changes to examples/simple-view.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2007-11-01 18:47:26 UTC
  • mto: (7.1.1 lenny) (1.2.1) (76.1.1 oneiric-proposed)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20071101184726-e3e4cxfcp41tz6ui
Tags: upstream-2.20.1
ImportĀ upstreamĀ versionĀ 2.20.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
/* A very simple program that monitors a single key for changes. */
22
22
 
23
 
#include <gconf-client.h> /* Once GConf is installed, this should be
24
 
                             <gconf/gconf-client.h> */
 
23
#include <gconf/gconf-client.h>
25
24
#include <gtk/gtk.h>
26
25
 
27
26
void
34
33
  
35
34
  label = GTK_WIDGET(user_data);
36
35
 
37
 
  if (entry->value == NULL)
 
36
  if (gconf_entry_get_value (entry) == NULL)
38
37
    {
39
 
      gtk_label_set(GTK_LABEL(label), "<unset>");
 
38
      gtk_label_set_text (GTK_LABEL (label), "<unset>");
40
39
    }
41
40
  else
42
41
    {
43
 
      if (entry->value->type == GCONF_VALUE_STRING)
 
42
      if (gconf_entry_get_value (entry)->type == GCONF_VALUE_STRING)
44
43
        {
45
 
          gtk_label_set(GTK_LABEL(label),
46
 
                        gconf_value_get_string(entry->value));
 
44
          gtk_label_set_text (GTK_LABEL (label),
 
45
                              gconf_value_get_string (gconf_entry_get_value (entry)));
47
46
        }
48
47
      else
49
48
        {
50
 
          gtk_label_set(GTK_LABEL(label), "<wrong type>");
 
49
          gtk_label_set_text (GTK_LABEL (label), "<wrong type>");
51
50
        }
52
51
    }
53
52
}