~bcurtiswx/ubuntu/precise/empathy/3.4.2.1-0ubuntu1

« back to all changes in this revision

Viewing changes to libempathy/empathy-contact-groups.c

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2009-11-16 23:40:52 UTC
  • mfrom: (1.1.39 upstream)
  • mto: (6.3.7 experimental)
  • mto: This revision was merged to the branch mainline in revision 80.
  • Revision ID: james.westby@ubuntu.com-20091116234052-7hhwrpeln4mwdyw7
Tags: upstream-2.29.2
ImportĀ upstreamĀ versionĀ 2.29.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
                        gboolean      expanded;
132
132
                        ContactGroup *contact_group;
133
133
 
134
 
                        name = (gchar *) xmlGetProp (node, "name");
135
 
                        expanded_str = (gchar *) xmlGetProp (node, "expanded");
 
134
                        name = (gchar *) xmlGetProp (node, (const xmlChar *) "name");
 
135
                        expanded_str = (gchar *) xmlGetProp (node, (const xmlChar *) "expanded");
136
136
 
137
137
                        if (expanded_str && strcmp (expanded_str, "yes") == 0) {
138
138
                                expanded = TRUE;
195
195
        file = g_build_filename (dir, CONTACT_GROUPS_XML_FILENAME, NULL);
196
196
        g_free (dir);
197
197
 
198
 
        doc = xmlNewDoc ("1.0");
199
 
        root = xmlNewNode (NULL, "contacts");
 
198
        doc = xmlNewDoc ((const xmlChar *) "1.0");
 
199
        root = xmlNewNode (NULL, (const xmlChar *) "contacts");
200
200
        xmlDocSetRootElement (doc, root);
201
201
 
202
 
        node = xmlNewChild (root, NULL, "account", NULL);
203
 
        xmlNewProp (node, "name", "Default");
 
202
        node = xmlNewChild (root, NULL, (const xmlChar *) "account", NULL);
 
203
        xmlNewProp (node, (const xmlChar *) "name", (const xmlChar *) "Default");
204
204
 
205
205
        for (l = groups; l; l = l->next) {
206
206
                ContactGroup *cg;
208
208
 
209
209
                cg = l->data;
210
210
 
211
 
                subnode = xmlNewChild (node, NULL, "group", NULL);
212
 
                xmlNewProp (subnode, "expanded", cg->expanded ? "yes" : "no");
213
 
                xmlNewProp (subnode, "name", cg->name);
 
211
                subnode = xmlNewChild (node, NULL, (const xmlChar *) "group", NULL);
 
212
                xmlNewProp (subnode, (const xmlChar *) "expanded", cg->expanded ?
 
213
                                (const xmlChar *) "yes" : (const xmlChar *) "no");
 
214
                xmlNewProp (subnode, (const xmlChar *) "name", (const xmlChar *) cg->name);
214
215
        }
215
216
 
216
217
        /* Make sure the XML is indented properly */
262
263
        g_return_if_fail (group != NULL);
263
264
 
264
265
        for (l = groups; l; l = l->next) {
265
 
                ContactGroup *cg = l->data;
 
266
                cg = l->data;
266
267
 
267
268
                if (!cg || !cg->name) {
268
269
                        continue;