diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2007-06-03 10:45:22 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-06-03 10:45:22 +0800 |
commit | 646455c0f94ac047b3ed44dbd7e796f746451700 (patch) | |
tree | e7750dcec0ad360755a6503f1f128d6a80c16e43 /widgets/menus | |
parent | a01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e (diff) | |
download | gsoc2013-evolution-646455c0f94ac047b3ed44dbd7e796f746451700.tar.gz gsoc2013-evolution-646455c0f94ac047b3ed44dbd7e796f746451700.tar.zst gsoc2013-evolution-646455c0f94ac047b3ed44dbd7e796f746451700.zip |
Fix compilation warnings in widgets folder (#441014).
svn path=/trunk/; revision=33626
Diffstat (limited to 'widgets/menus')
-rw-r--r-- | widgets/menus/gal-view-collection.c | 38 | ||||
-rw-r--r-- | widgets/menus/gal-view-instance.c | 12 |
2 files changed, 25 insertions, 25 deletions
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c index 36f9cea25c..b94fb02f5f 100644 --- a/widgets/menus/gal-view-collection.c +++ b/widgets/menus/gal-view-collection.c @@ -369,10 +369,10 @@ load_single_file (GalViewCollection *collection, item->ever_changed = local; item->changed = FALSE; item->built_in = !local; - item->id = e_xml_get_string_prop_by_name(node, "id"); - item->filename = e_xml_get_string_prop_by_name(node, "filename"); - item->title = e_xml_get_translated_utf8_string_prop_by_name(node, "title"); - item->type = e_xml_get_string_prop_by_name(node, "type"); + item->id = e_xml_get_string_prop_by_name(node, (const unsigned char *)"id"); + item->filename = e_xml_get_string_prop_by_name(node, (const unsigned char *)"filename"); + item->title = e_xml_get_translated_utf8_string_prop_by_name(node, (const unsigned char *)"title"); + item->type = e_xml_get_string_prop_by_name(node, (const unsigned char *)"type"); item->collection = collection; item->view_changed_id = 0; @@ -422,10 +422,10 @@ load_single_dir (GalViewCollection *collection, gboolean found = FALSE; int i; - if (!strcmp (child->name, "text")) + if (!strcmp ((char *)child->name, "text")) continue; - id = e_xml_get_string_prop_by_name(child, "id"); + id = e_xml_get_string_prop_by_name(child, (const unsigned char *)"id"); for (i = 0; i < collection->view_count; i++) { if (!strcmp(id, collection->view_data[i]->id)) { if (!local) @@ -460,7 +460,7 @@ load_single_dir (GalViewCollection *collection, g_free(id); } - default_view = e_xml_get_string_prop_by_name (root, "default-view"); + default_view = e_xml_get_string_prop_by_name (root, (const unsigned char *)"default-view"); if (default_view) { if (local) collection->default_view_built_in = FALSE; @@ -521,12 +521,12 @@ gal_view_collection_save (GalViewCollection *collection) g_return_if_fail (GAL_IS_VIEW_COLLECTION (collection)); g_return_if_fail (collection->local_dir != NULL); - doc = xmlNewDoc("1.0"); - root = xmlNewNode(NULL, "GalViewCollection"); + doc = xmlNewDoc((const unsigned char *)"1.0"); + root = xmlNewNode(NULL, (const unsigned char *)"GalViewCollection"); xmlDocSetRootElement(doc, root); if (collection->default_view && !collection->default_view_built_in) { - e_xml_set_string_prop_by_name(root, "default-view", collection->default_view); + e_xml_set_string_prop_by_name(root, (const unsigned char *)"default-view", collection->default_view); } for (i = 0; i < collection->view_count; i++) { @@ -535,11 +535,11 @@ gal_view_collection_save (GalViewCollection *collection) item = collection->view_data[i]; if (item->ever_changed) { - child = xmlNewChild(root, NULL, "GalView", NULL); - e_xml_set_string_prop_by_name(child, "id", item->id); - e_xml_set_string_prop_by_name(child, "title", item->title); - e_xml_set_string_prop_by_name(child, "filename", item->filename); - e_xml_set_string_prop_by_name(child, "type", item->type); + child = xmlNewChild(root, NULL, (const unsigned char *)"GalView", NULL); + e_xml_set_string_prop_by_name(child, (const unsigned char *)"id", item->id); + e_xml_set_string_prop_by_name(child, (const unsigned char *)"title", item->title); + e_xml_set_string_prop_by_name(child, (const unsigned char *)"filename", item->filename); + e_xml_set_string_prop_by_name(child, (const unsigned char *)"type", item->type); if (item->changed) { filename = g_build_filename(collection->local_dir, item->filename, NULL); @@ -554,10 +554,10 @@ gal_view_collection_save (GalViewCollection *collection) item = collection->removed_view_data[i]; - child = xmlNewChild(root, NULL, "GalView", NULL); - e_xml_set_string_prop_by_name(child, "id", item->id); - e_xml_set_string_prop_by_name(child, "title", item->title); - e_xml_set_string_prop_by_name(child, "type", item->type); + child = xmlNewChild(root, NULL, (const unsigned char *)"GalView", NULL); + e_xml_set_string_prop_by_name(child, (const unsigned char *)"id", item->id); + e_xml_set_string_prop_by_name(child, (const unsigned char *)"title", item->title); + e_xml_set_string_prop_by_name(child, (const unsigned char *)"type", item->type); } filename = g_build_filename(collection->local_dir, "galview.xml", NULL); if (e_xml_save_file (filename, doc) == -1) diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c index 821a299afb..521da6a6b3 100644 --- a/widgets/menus/gal-view-instance.c +++ b/widgets/menus/gal-view-instance.c @@ -90,14 +90,14 @@ save_current_view (GalViewInstance *instance) xmlDoc *doc; xmlNode *root; - doc = xmlNewDoc("1.0"); - root = xmlNewNode (NULL, "GalViewCurrentView"); + doc = xmlNewDoc((const unsigned char *)"1.0"); + root = xmlNewNode (NULL, (const unsigned char *)"GalViewCurrentView"); xmlDocSetRootElement(doc, root); if (instance->current_id) - e_xml_set_string_prop_by_name (root, "current_view", instance->current_id); + e_xml_set_string_prop_by_name (root, (const unsigned char *)"current_view", instance->current_id); if (instance->current_type) - e_xml_set_string_prop_by_name (root, "current_view_type", instance->current_type); + e_xml_set_string_prop_by_name (root, (const unsigned char *)"current_view_type", instance->current_type); if (e_xml_save_file (instance->current_view_filename, doc) == -1) g_warning ("Unable to save view to %s - %s", instance->current_view_filename, g_strerror(errno)); @@ -278,7 +278,7 @@ load_current_view (GalViewInstance *instance) } root = xmlDocGetRootElement(doc); - instance->current_id = e_xml_get_string_prop_by_name_with_default (root, "current_view", NULL); + instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const unsigned char *)"current_view", NULL); if (instance->current_id != NULL) { int index = gal_view_collection_get_view_index_by_id (instance->collection, @@ -292,7 +292,7 @@ load_current_view (GalViewInstance *instance) } if (view == NULL) { char *type; - type = e_xml_get_string_prop_by_name_with_default (root, "current_view_type", NULL); + type = e_xml_get_string_prop_by_name_with_default (root, (const unsigned char *)"current_view_type", NULL); view = gal_view_collection_load_view_from_file (instance->collection, type, instance->custom_filename); |