aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 10:45:22 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 10:45:22 +0800
commit646455c0f94ac047b3ed44dbd7e796f746451700 (patch)
treee7750dcec0ad360755a6503f1f128d6a80c16e43 /widgets
parenta01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e (diff)
downloadgsoc2013-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')
-rw-r--r--widgets/ChangeLog11
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c4
-rw-r--r--widgets/menus/gal-view-collection.c38
-rw-r--r--widgets/menus/gal-view-instance.c12
-rw-r--r--widgets/misc/ChangeLog18
-rw-r--r--widgets/misc/e-dateedit.c4
-rw-r--r--widgets/misc/e-filter-bar.c53
-rw-r--r--widgets/misc/e-image-chooser.c8
-rw-r--r--widgets/misc/e-task-widget.c8
-rw-r--r--widgets/misc/e-unicode.c30
-rw-r--r--widgets/table/ChangeLog30
-rw-r--r--widgets/table/e-cell-text.c6
-rw-r--r--widgets/table/e-cell-tree.c2
-rw-r--r--widgets/table/e-table-column-specification.c62
-rw-r--r--widgets/table/e-table-field-chooser-item.c2
-rw-r--r--widgets/table/e-table-group-container.c2
-rw-r--r--widgets/table/e-table-header-item.c25
-rw-r--r--widgets/table/e-table-sort-info.c38
-rw-r--r--widgets/table/e-table-specification.c74
-rw-r--r--widgets/table/e-table-state.c28
-rw-r--r--widgets/table/e-table-subset-variable.c2
-rw-r--r--widgets/table/e-table-subset.c2
-rw-r--r--widgets/table/e-tree-table-adapter.c26
23 files changed, 276 insertions, 209 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index 5dbac5864c..206de0fe5c 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,14 @@
+2007-06-02 Gilles Dartiguelongue <dartigug@esiee.fr>
+
+ ** Fixes part of bug #441014
+
+ * e-timezone-dialog/e-timezone-dialog.c:
+ (e_timezone_dialog_set_timezone):
+ * menus/gal-view-collection.c: (load_single_file),
+ (load_single_dir), (gal_view_collection_save):
+ * menus/gal-view-instance.c: (save_current_view),
+ (load_current_view): various compilation warning cleanups
+
2007-05-24 Matthew Barnes <mbarnes@redhat.com>
* text/e-text.c (e_text_copy_clipboard),
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index 291ea500ee..4bb404ee53 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -304,6 +304,7 @@ e_timezone_dialog_construct (ETimezoneDialog *etd)
return NULL;
}
+#if 0
static int
get_local_offset ()
{
@@ -319,6 +320,7 @@ get_local_offset ()
return diff;
}
+#endif
static const icaltimezone*
get_local_timezone()
@@ -677,7 +679,7 @@ e_timezone_dialog_set_timezone (ETimezoneDialog *etd,
g_return_if_fail (E_IS_TIMEZONE_DIALOG (etd));
if (!zone) {
- zone=get_local_timezone();
+ zone = (icaltimezone *)get_local_timezone();
if (!zone)
zone = icaltimezone_get_utc_timezone();
}
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);
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index fc6c7bf6ee..c817941d53 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,4 +1,20 @@
-2007-05-25 Matthew Barnes <mbarnes@redhat.com>
+2007-06-02 Gilles Dartiguelongue <dartigug@esiee.fr>
+
+ ** Fixes part of bug #441014
+
+ * e-dateedit.c: (rebuild_time_popup):
+ * e-filter-bar.c: (get_property), (xml_get_prop_int),
+ (set_property):
+ * e-image-chooser.c: (set_image_from_data),
+ (image_drag_data_received_cb):
+ * e-task-widget.c: (e_task_widget_construct):
+ * e-unicode.c: (e_utf8_strstrcasedecomp), (e_utf8_strstrcase),
+ (e_utf8_from_iconv_string_sized), (e_utf8_to_iconv_string_sized),
+ (e_utf8_xml1_decode), (e_utf8_xml1_encode),
+ (e_xml_get_translated_utf8_string_prop_by_name): various
+ compilation cleanups.
+
++2007-05-25 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #441010
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index df85c1b2ae..f3fc4cb43b 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -1400,7 +1400,7 @@ rebuild_time_popup (EDateEdit *dedit)
EDateEditPrivate *priv;
GtkList *list;
GtkWidget *listitem, *label;
- char buffer[40], *format;
+ char buffer[40];
struct tm tmp_tm;
gint hour, min;
@@ -1738,7 +1738,7 @@ static void
e_date_edit_update_time_entry (EDateEdit *dedit)
{
EDateEditPrivate *priv;
- char buffer[40], *format;
+ char buffer[40];
struct tm tmp_tm = { 0 };
priv = dedit->priv;
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index 0c1fce045c..164e58655d 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -586,15 +586,16 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp
break;
case PROP_STATE: {
/* FIXME: we should have ESearchBar save its own state to the xmlDocPtr */
- char *xmlbuf, *text, buf[12];
+ xmlChar *xmlbuf;
+ char *text, buf[12];
int searchscope, item_id, n, view_id;
xmlNodePtr root, node;
xmlDocPtr doc;
item_id = e_search_bar_get_item_id ((ESearchBar *) efb);
- doc = xmlNewDoc ("1.0");
- root = xmlNewDocNode (doc, NULL, "state", NULL);
+ doc = xmlNewDoc ((const unsigned char *)"1.0");
+ root = xmlNewDocNode (doc, NULL, (const unsigned char *)"state", NULL);
xmlDocSetRootElement (doc, root);
searchscope = e_search_bar_get_search_scope ((ESearchBar *) efb);
view_id = e_search_bar_get_viewitem_id ((ESearchBar *) efb);
@@ -604,37 +605,37 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp
if (item_id == E_FILTERBAR_ADVANCED_ID) {
/* advanced query, save the filterbar state */
- node = xmlNewChild (root, NULL, "filter-bar", NULL);
+ node = xmlNewChild (root, NULL, (const unsigned char *)"filter-bar", NULL);
sprintf (buf, "%d", esb->last_search_option);
- xmlSetProp (node, "item_id", buf);
+ xmlSetProp (node, (const unsigned char *)"item_id", (unsigned char *)buf);
sprintf (buf, "%d", searchscope);
- xmlSetProp (node, "searchscope", buf);
+ xmlSetProp (node, (const unsigned char *)"searchscope", (unsigned char *)buf);
sprintf (buf, "%d", view_id);
- xmlSetProp (node, "view_id", buf);
+ xmlSetProp (node, (const unsigned char *)"view_id", (unsigned char *)buf);
xmlAddChild (node, filter_rule_xml_encode (efb->current_query));
} else {
/* simple query, save the searchbar state */
text = e_search_bar_get_text ((ESearchBar *) efb);
- node = xmlNewChild (root, NULL, "search-bar", NULL);
- xmlSetProp (node, "text", text ? text : "");
+ node = xmlNewChild (root, NULL, (const unsigned char *)"search-bar", NULL);
+ xmlSetProp (node, (const unsigned char *)"text", (unsigned char *)(text ? text : ""));
sprintf (buf, "%d", item_id);
- xmlSetProp (node, "item_id", buf);
+ xmlSetProp (node, (const unsigned char *)"item_id", (unsigned char *)buf);
sprintf (buf, "%d", searchscope);
- xmlSetProp (node, "searchscope", buf);
+ xmlSetProp (node, (const unsigned char *)"searchscope", (unsigned char *)buf);
sprintf (buf, "%d", view_id);
- xmlSetProp (node, "view_id", buf);
+ xmlSetProp (node, (const unsigned char *)"view_id", (unsigned char *)buf);
g_free (text);
}
- xmlDocDumpMemory (doc, (xmlChar **) &xmlbuf, &n);
+ xmlDocDumpMemory (doc, &xmlbuf, &n);
xmlFreeDoc (doc);
/* remap to glib memory */
text = g_malloc (n + 1);
- memcpy (text, xmlbuf, n);
+ memcpy (text, (char *)xmlbuf, n);
text[n] = '\0';
xmlFree (xmlbuf);
@@ -653,7 +654,7 @@ xml_get_prop_int (xmlNodePtr node, const char *prop)
char *buf;
int ret;
- if ((buf = xmlGetProp (node, prop))) {
+ if ((buf = (char *)xmlGetProp (node, (unsigned char *)prop))) {
ret = strtol (buf, NULL, 10);
xmlFree (buf);
} else {
@@ -677,18 +678,18 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
switch (property_id) {
case PROP_STATE:
if ((state = g_value_get_string (value))) {
- if (!(doc = xmlParseDoc ((char *) state)))
+ if (!(doc = xmlParseDoc ((unsigned char *) state)))
return;
root = doc->children;
- if (strcmp (root->name, "state") != 0) {
+ if (strcmp ((char *)root->name, "state") != 0) {
xmlFreeDoc (doc);
return;
}
node = root->children;
while (node != NULL) {
- if (!strcmp (node->name, "filter-bar")) {
+ if (!strcmp ((char *)node->name, "filter-bar")) {
FilterRule *rule = NULL;
@@ -706,7 +707,7 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
rule = filter_rule_new ();
if (filter_rule_xml_decode (rule, node, efb->context) != 0) {
- gtk_widget_modify_base (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, NULL);
+ gtk_widget_modify_base (E_SEARCH_BAR (efb)->entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_text (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_base (((ESearchBar *)efb)->icon_entry, GTK_STATE_NORMAL, NULL);
g_object_unref (rule);
@@ -744,7 +745,7 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
efb->setquery = FALSE;
break;
- } else if (!strcmp (node->name, "search-bar")) {
+ } else if (!strcmp ((char *)node->name, "search-bar")) {
int subitem_id, item_id, scope, view_id;
char *text;
GtkStyle *style = gtk_widget_get_default_style ();
@@ -758,17 +759,17 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
esb->block_search = TRUE;
if (subitem_id >= 0)
- e_search_bar_set_ids ((ESearchBar *) efb, item_id, subitem_id);
+ e_search_bar_set_ids (E_SEARCH_BAR (efb), item_id, subitem_id);
else
- e_search_bar_set_item_menu ((ESearchBar *) efb, item_id);
+ e_search_bar_set_item_menu (E_SEARCH_BAR (efb), item_id);
esb->block_search = FALSE;
view_id = xml_get_prop_int (node, "view_id");
- e_search_bar_set_viewitem_id ((ESearchBar *) efb, view_id);
+ e_search_bar_set_viewitem_id (E_SEARCH_BAR (efb), view_id);
scope = xml_get_prop_int (node, "searchscope");
- e_search_bar_set_search_scope ((ESearchBar *) efb, scope);
+ e_search_bar_set_search_scope (E_SEARCH_BAR (efb), scope);
- text = xmlGetProp (node, "text");
- e_search_bar_set_text ((ESearchBar *) efb, text);
+ text = (char *)xmlGetProp (node, (const unsigned char *)"text");
+ e_search_bar_set_text (E_SEARCH_BAR (efb), text);
if (text && *text) {
efb->current_query = (FilterRule *)efb->option_rules->pdata[item_id - efb->option_base];
if (efb->config && efb->current_query)
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index 7fdb2cb415..b5004aca7f 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -232,7 +232,7 @@ set_image_from_data (EImageChooser *chooser,
GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
GdkPixbuf *pixbuf;
- gdk_pixbuf_loader_write (loader, data, length, NULL);
+ gdk_pixbuf_loader_write (loader, (unsigned char *)data, length, NULL);
gdk_pixbuf_loader_close (loader, NULL);
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
@@ -413,15 +413,15 @@ image_drag_data_received_cb (GtkWidget *widget,
GnomeVFSResult result;
GnomeVFSHandle *handle;
char *uri;
- char *nl = strstr (selection_data->data, "\r\n");
+ char *nl = strstr ((char *)selection_data->data, "\r\n");
char *buf = NULL;
/* Why can't we change the info parameter to a GnomeVFSFileInfo and use that? */
GnomeVFSFileInfo info;
if (nl)
- uri = g_strndup (selection_data->data, nl - (char*)selection_data->data);
+ uri = g_strndup ((char *)selection_data->data, nl - (char*)selection_data->data);
else
- uri = g_strdup (selection_data->data);
+ uri = g_strdup ((char *)selection_data->data);
result = gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ);
if (result == GNOME_VFS_OK) {
diff --git a/widgets/misc/e-task-widget.c b/widgets/misc/e-task-widget.c
index 6743b10cb2..43236de8c7 100644
--- a/widgets/misc/e-task-widget.c
+++ b/widgets/misc/e-task-widget.c
@@ -124,8 +124,8 @@ e_task_widget_construct (ETaskWidget *task_widget,
const char *information)
{
ETaskWidgetPrivate *priv;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
+ /*GdkPixmap *pixmap;
+ GdkBitmap *mask;*/
GtkWidget *box;
GtkWidget *frame;
@@ -156,8 +156,8 @@ e_task_widget_construct (ETaskWidget *task_widget,
/* gdk_pixbuf_render_pixmap_and_mask (icon_pixbuf, &pixmap, &mask, 128); */
priv->image = e_spinner_new ();
- e_spinner_set_size (priv->image, GTK_ICON_SIZE_SMALL_TOOLBAR);
- e_spinner_start (priv->image);
+ e_spinner_set_size (E_SPINNER (priv->image), GTK_ICON_SIZE_SMALL_TOOLBAR);
+ e_spinner_start (E_SPINNER (priv->image));
/* gtk_image_new_from_pixmap (pixmap, mask); */
gtk_widget_show (priv->image);
gtk_box_pack_start (GTK_BOX (box), priv->image, FALSE, TRUE, 0);
diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c
index 6bf1fdaaec..cac01ff5a0 100644
--- a/widgets/misc/e-unicode.c
+++ b/widgets/misc/e-unicode.c
@@ -71,7 +71,7 @@ e_utf8_strstrcasedecomp (const gchar *haystack, const gchar *needle)
gunichar *nuni;
gunichar unival;
gint nlen;
- const guchar *o, *p;
+ const gchar *o, *p;
if (haystack == NULL) return NULL;
if (needle == NULL) return NULL;
@@ -126,7 +126,7 @@ e_utf8_strstrcase (const gchar *haystack, const gchar *needle)
gunichar *nuni;
gunichar unival;
gint nlen;
- const guchar *o, *p;
+ const gchar *o, *p;
if (haystack == NULL) return NULL;
if (needle == NULL) return NULL;
@@ -248,7 +248,7 @@ e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
gint i;
/* iso-8859-1 */
ib = (char *) string;
- new = ob = g_new (unsigned char, bytes * 2 + 1);
+ new = ob = (char *)g_new (unsigned char, bytes * 2 + 1);
for (i = 0; i < (bytes); i ++) {
ob += e_unichar_to_utf8 (ib[i], ob);
}
@@ -307,7 +307,7 @@ e_utf8_to_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
const gchar *u;
gunichar uc;
- new = g_new (unsigned char, bytes * 4 + 1);
+ new = (char *)g_new (unsigned char, bytes * 4 + 1);
u = string;
len = 0;
@@ -512,7 +512,7 @@ gchar *
e_utf8_xml1_decode (const gchar *text)
{
const guchar *c;
- guchar *u, *d;
+ gchar *u, *d;
int len, s;
g_return_val_if_fail (text != NULL, NULL);
@@ -521,7 +521,7 @@ e_utf8_xml1_decode (const gchar *text)
/* len * 2 is absolute maximum */
u = d = g_malloc (len * 2);
- c = text;
+ c = (guchar *)text;
s = 0;
while (s < len) {
if ((s <= (len - 8)) &&
@@ -534,8 +534,8 @@ e_utf8_xml1_decode (const gchar *text)
isxdigit (c[s + 6]) &&
(c[s + 7] == '\\')) {
/* Valid \U+XXXX\ sequence */
- unsigned int unival;
- unival = strtol (c + s + 3, NULL, 16);
+ int unival;
+ unival = strtol ((char *)(c + s + 3), NULL, 16);
d += e_unichar_to_utf8 (unival, d);
s += 8;
} else if (c[s] > 127) {
@@ -555,8 +555,8 @@ e_utf8_xml1_decode (const gchar *text)
gchar *
e_utf8_xml1_encode (const gchar *text)
{
- guchar *u, *d, *c;
- int unival;
+ gchar *u, *d, *c;
+ unsigned int unival;
int len;
g_return_val_if_fail (text != NULL, NULL);
@@ -569,7 +569,7 @@ e_utf8_xml1_encode (const gchar *text)
len += 1;
}
}
- d = c = g_new (guchar, len + 1);
+ d = c = (char *)g_new (guchar, len + 1);
for (u = e_unicode_get_utf8 (text, &unival); u && unival; u = e_unicode_get_utf8 (u, &unival)) {
if ((unival >= 0x80) || (unival == '\\')) {
@@ -667,7 +667,7 @@ e_unicode_get_utf8 (const gchar *text, gunichar *out)
typedef struct
{
unsigned short ch;
- unsigned char *expansion;
+ char *expansion;
} e_decomposition;
static e_decomposition e_decomp_table[] =
@@ -2036,15 +2036,15 @@ e_xml_get_translated_utf8_string_prop_by_name (const xmlNode *parent, const xmlC
prop = xmlGetProp ((xmlNode *) parent, prop_name);
if (prop != NULL) {
- ret_val = g_strdup (prop);
+ ret_val = g_strdup ((char *)prop);
xmlFree (prop);
return ret_val;
}
combined_name = g_strdup_printf("_%s", prop_name);
- prop = xmlGetProp ((xmlNode *) parent, combined_name);
+ prop = xmlGetProp ((xmlNode *) parent, (unsigned char *)combined_name);
if (prop != NULL) {
- ret_val = g_strdup (gettext (prop));
+ ret_val = g_strdup (gettext ((char *)prop));
xmlFree (prop);
}
g_free(combined_name);
diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog
index cbf4ac167f..b997aa9d3e 100644
--- a/widgets/table/ChangeLog
+++ b/widgets/table/ChangeLog
@@ -1,3 +1,33 @@
+2007-06-02 Gilles Dartiguelongue <dartigug@esiee.fr>
+
+ ** Fixes part of bug #441014
+
+ * e-cell-text.c: (build_layout), (ect_print):
+ * e-cell-tree.c: (ect_realize):
+ * e-table-column-specification.c:
+ (e_table_column_specification_load_from_node),
+ (e_table_column_specification_save_to_node):
+ * e-table-field-chooser-item.c: (etfci_drag_data_get):
+ * e-table-group-container.c:
+ * e-table-header-item.c: (ethi_drag_data_received),
+ (ethi_drag_data_get), (ethi_popup_field_chooser),
+ (ethi_header_context_menu):
+ * e-table-sort-info.c: (e_table_sort_info_load_from_node),
+ (e_table_sort_info_save_to_node):
+ * e-table-specification.c: (e_table_specification_load_from_node),
+ (e_table_specification_save_to_file),
+ (e_table_specification_save_to_string),
+ (e_table_specification_save_to_node):
+ * e-table-state.c: (e_table_state_load_from_node),
+ (e_table_state_save_to_file), (e_table_state_save_to_string),
+ (e_table_state_save_to_node):
+ * e-table-subset-variable.c: (e_table_subset_variable_clear):
+ * e-table-subset.c: (e_table_subset_construct):
+ * e-tree-table-adapter.c: (save_expanded_state_func),
+ (e_tree_table_adapter_save_expanded_state), (open_file),
+ (e_tree_table_adapter_load_expanded_state): various
+ compilation warning cleanups
+
2007-05-31 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #333707 from David Moore
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index c6698182e7..90c9b4ac7e 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -590,11 +590,11 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
{
PangoFontDescription *desc = NULL, *fixed_desc = NULL;
char *fixed_family = NULL;
- gint fixed_size;
+ gint fixed_size = 0;
fixed_desc = pango_font_description_from_string (ect->font_name);
if (fixed_desc) {
- fixed_family = pango_font_description_get_family (fixed_desc);
+ fixed_family = (char *)pango_font_description_get_family (fixed_desc);
fixed_size = pango_font_description_get_size (fixed_desc);
}
@@ -1343,7 +1343,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
gboolean strikeout, underline;
cairo_t *cr;
char *string;
- double ty, ly, text_width, text_height;
+ double ty, ly, text_width = 0.0, text_height = 0.0;
cr = gtk_print_context_get_cairo_context (context);
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index 6bb61e03d8..1751176637 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -181,7 +181,7 @@ ect_realize (ECellView *ecell_view)
GDK_LINE_ON_OFF_DASH,
GDK_CAP_NOT_LAST,
GDK_JOIN_MITER);
- gdk_gc_set_dashes (tree_view->gc, 0, "\1\1", 2);
+ gdk_gc_set_dashes (tree_view->gc, 0, (gint8 *)"\1\1", 2);
if (parent_class->realize)
(* parent_class->realize) (ecell_view);
diff --git a/widgets/table/e-table-column-specification.c b/widgets/table/e-table-column-specification.c
index a563248735..9bfc4460b0 100644
--- a/widgets/table/e-table-column-specification.c
+++ b/widgets/table/e-table-column-specification.c
@@ -103,21 +103,21 @@ e_table_column_specification_load_from_node (ETableColumnSpecification *etcs,
{
free_strings(etcs);
- etcs->model_col = e_xml_get_integer_prop_by_name (node, "model_col");
- etcs->compare_col = e_xml_get_integer_prop_by_name_with_default (node, "compare_col", etcs->model_col);
- etcs->title = e_xml_get_string_prop_by_name (node, "_title");
- etcs->pixbuf = e_xml_get_string_prop_by_name (node, "pixbuf");
-
- etcs->expansion = e_xml_get_double_prop_by_name (node, "expansion");
- etcs->minimum_width = e_xml_get_integer_prop_by_name (node, "minimum_width");
- etcs->resizable = e_xml_get_bool_prop_by_name (node, "resizable");
- etcs->disabled = e_xml_get_bool_prop_by_name (node, "disabled");
-
- etcs->cell = e_xml_get_string_prop_by_name (node, "cell");
- etcs->compare = e_xml_get_string_prop_by_name (node, "compare");
- etcs->search = e_xml_get_string_prop_by_name (node, "search");
- etcs->sortable = e_xml_get_string_prop_by_name (node, "sortable");
- etcs->priority = e_xml_get_integer_prop_by_name_with_default (node, "priority", 0);
+ etcs->model_col = e_xml_get_integer_prop_by_name (node, (const unsigned char *)"model_col");
+ etcs->compare_col = e_xml_get_integer_prop_by_name_with_default (node, (const unsigned char *)"compare_col", etcs->model_col);
+ etcs->title = e_xml_get_string_prop_by_name (node, (const unsigned char *)"_title");
+ etcs->pixbuf = e_xml_get_string_prop_by_name (node, (const unsigned char *)"pixbuf");
+
+ etcs->expansion = e_xml_get_double_prop_by_name (node, (const unsigned char *)"expansion");
+ etcs->minimum_width = e_xml_get_integer_prop_by_name (node, (const unsigned char *)"minimum_width");
+ etcs->resizable = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"resizable");
+ etcs->disabled = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"disabled");
+
+ etcs->cell = e_xml_get_string_prop_by_name (node, (const unsigned char *)"cell");
+ etcs->compare = e_xml_get_string_prop_by_name (node, (const unsigned char *)"compare");
+ etcs->search = e_xml_get_string_prop_by_name (node, (const unsigned char *)"search");
+ etcs->sortable = e_xml_get_string_prop_by_name (node, (const unsigned char *)"sortable");
+ etcs->priority = e_xml_get_integer_prop_by_name_with_default (node, (const unsigned char *)"priority", 0);
if (etcs->title == NULL)
etcs->title = g_strdup("");
@@ -129,26 +129,26 @@ e_table_column_specification_save_to_node (ETableColumnSpecification *specificat
{
xmlNode *node;
if (parent)
- node = xmlNewChild(parent, NULL, "ETableColumn", NULL);
+ node = xmlNewChild(parent, NULL, (const unsigned char *)"ETableColumn", NULL);
else
- node = xmlNewNode(NULL, "ETableColumn");
+ node = xmlNewNode(NULL, (const unsigned char *)"ETableColumn");
- e_xml_set_integer_prop_by_name(node, "model_col", specification->model_col);
+ e_xml_set_integer_prop_by_name(node, (const unsigned char *)"model_col", specification->model_col);
if (specification->compare_col != specification->model_col)
- e_xml_set_integer_prop_by_name(node, "compare_col", specification->compare_col);
- e_xml_set_string_prop_by_name(node, "_title", specification->title);
- e_xml_set_string_prop_by_name(node, "pixbuf", specification->pixbuf);
-
- e_xml_set_double_prop_by_name(node, "expansion", specification->expansion);
- e_xml_set_integer_prop_by_name(node, "minimum_width", specification->minimum_width);
- e_xml_set_bool_prop_by_name(node, "resizable", specification->resizable);
- e_xml_set_bool_prop_by_name(node, "disabled", specification->disabled);
-
- e_xml_set_string_prop_by_name(node, "cell", specification->cell);
- e_xml_set_string_prop_by_name(node, "compare", specification->compare);
- e_xml_set_string_prop_by_name(node, "search", specification->search);
+ e_xml_set_integer_prop_by_name(node, (const unsigned char *)"compare_col", specification->compare_col);
+ e_xml_set_string_prop_by_name(node, (const unsigned char *)"_title", specification->title);
+ e_xml_set_string_prop_by_name(node, (const unsigned char *)"pixbuf", specification->pixbuf);
+
+ e_xml_set_double_prop_by_name(node, (const unsigned char *)"expansion", specification->expansion);
+ e_xml_set_integer_prop_by_name(node, (const unsigned char *)"minimum_width", specification->minimum_width);
+ e_xml_set_bool_prop_by_name(node, (const unsigned char *)"resizable", specification->resizable);
+ e_xml_set_bool_prop_by_name(node, (const unsigned char *)"disabled", specification->disabled);
+
+ e_xml_set_string_prop_by_name(node, (const unsigned char *)"cell", specification->cell);
+ e_xml_set_string_prop_by_name(node, (const unsigned char *)"compare", specification->compare);
+ e_xml_set_string_prop_by_name(node, (const unsigned char *)"search", specification->search);
if (specification->priority != 0)
- e_xml_set_integer_prop_by_name (node, "priority", specification->priority);
+ e_xml_set_integer_prop_by_name (node, (const unsigned char *)"priority", specification->priority);
return node;
}
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index 3a94645550..75062051d9 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -399,7 +399,7 @@ etfci_drag_data_get (GtkWidget *widget,
gtk_selection_data_set(selection_data,
GDK_SELECTION_TYPE_STRING,
sizeof(string[0]),
- string,
+ (unsigned char *)string,
strlen(string));
g_free(string);
}
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 0cccdd6e38..4c900624a2 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -1124,6 +1124,7 @@ typedef struct {
#define CHECK(x) if((x) == -1) return -1;
+#if 0
static gint
gp_draw_rect (GtkPrintContext *context, double x, double y, double width, double height)
{
@@ -1133,6 +1134,7 @@ gp_draw_rect (GtkPrintContext *context, double x, double y, double width, double
cairo_rectangle (cr, x, y, x + width, y + height);
cairo_fill (cr);
}
+#endif
#define TEXT_HEIGHT (12)
#define TEXT_AREA_HEIGHT (TEXT_HEIGHT + 4)
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index deee4bbd5d..5e45bb2e66 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -782,7 +782,7 @@ ethi_drag_data_received (GtkWidget *canvas,
if (data->data) {
count = e_table_header_count(ethi->eth);
- column = atoi(data->data);
+ column = atoi((char *)data->data);
drop_col = ethi->drop_col;
ethi->drop_col = -1;
@@ -826,7 +826,7 @@ ethi_drag_data_get (GtkWidget *canvas,
gtk_selection_data_set(selection_data,
GDK_SELECTION_TYPE_STRING,
sizeof(string[0]),
- string,
+ (unsigned char *)string,
strlen(string));
g_free(string);
}
@@ -1364,22 +1364,26 @@ ethi_popup_remove_column(GtkWidget *widget, EthiHeaderInfo *info)
static void
ethi_popup_field_chooser(GtkWidget *widget, EthiHeaderInfo *info)
{
- if (info->ethi->etfcd) {
- gtk_window_present (GTK_WINDOW (info->ethi->etfcd));
+ gpointer etfcd = (gpointer)info->ethi->etfcd;
+
+ if (etfcd) {
+ gtk_window_present (GTK_WINDOW (etfcd));
return;
}
- info->ethi->etfcd = e_table_field_chooser_dialog_new();
- g_object_add_weak_pointer (G_OBJECT (info->ethi->etfcd), (gpointer *)&info->ethi->etfcd);
+ info->ethi->etfcd = e_table_field_chooser_dialog_new ();
+ etfcd = (gpointer)info->ethi->etfcd;
+
+ g_object_add_weak_pointer (G_OBJECT (info->ethi->etfcd), &etfcd);
- g_object_set(info->ethi->etfcd,
+ g_object_set (info->ethi->etfcd,
"full_header", info->ethi->full_header,
"header", info->ethi->eth,
"dnd_code", info->ethi->dnd_code,
NULL);
- gtk_widget_show(info->ethi->etfcd);
+ gtk_widget_show (etfcd);
}
static void
@@ -1509,17 +1513,18 @@ popup_custom (GtkWidget *menu_item, EthiHeaderInfo *info)
ethi_popup_customize_view(menu_item, info);
}
+
static void
ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
{
- EthiHeaderInfo *info = g_new(EthiHeaderInfo, 1);
+ EthiHeaderInfo *info = g_new (EthiHeaderInfo, 1);
ETableCol *col;
GtkMenu *popup;
int ncol, sort_count, sort_col;
GtkWidget *menu_item, *sub_menu;
GSList *group = NULL;
ETableSortColumn column;
- gboolean ascending;
+ gboolean ascending = TRUE;
info->ethi = ethi;
info->col = ethi_find_col_by_x (ethi, event->x);
diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c
index cfc5f05e1c..cdd600de53 100644
--- a/widgets/table/e-table-sort-info.c
+++ b/widgets/table/e-table-sort-info.c
@@ -367,17 +367,17 @@ e_table_sort_info_load_from_node (ETableSortInfo *info,
if (state_version <= 0.05) {
i = 0;
- for (grouping = node->xmlChildrenNode; grouping && !strcmp (grouping->name, "group"); grouping = grouping->xmlChildrenNode) {
+ for (grouping = node->xmlChildrenNode; grouping && !strcmp ((char *)grouping->name, "group"); grouping = grouping->xmlChildrenNode) {
ETableSortColumn column;
- column.column = e_xml_get_integer_prop_by_name (grouping, "column");
- column.ascending = e_xml_get_bool_prop_by_name (grouping, "ascending");
+ column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column");
+ column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending");
e_table_sort_info_grouping_set_nth(info, i++, column);
}
i = 0;
- for (; grouping && !strcmp (grouping->name, "leaf"); grouping = grouping->xmlChildrenNode) {
+ for (; grouping && !strcmp ((char *)grouping->name, "leaf"); grouping = grouping->xmlChildrenNode) {
ETableSortColumn column;
- column.column = e_xml_get_integer_prop_by_name (grouping, "column");
- column.ascending = e_xml_get_bool_prop_by_name (grouping, "ascending");
+ column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column");
+ column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending");
e_table_sort_info_sorting_set_nth(info, i++, column);
}
} else {
@@ -389,13 +389,13 @@ e_table_sort_info_load_from_node (ETableSortInfo *info,
if (grouping->type != XML_ELEMENT_NODE)
continue;
- if (!strcmp (grouping->name, "group")) {
- column.column = e_xml_get_integer_prop_by_name (grouping, "column");
- column.ascending = e_xml_get_bool_prop_by_name (grouping, "ascending");
+ if (!strcmp ((char *)grouping->name, "group")) {
+ column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column");
+ column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending");
e_table_sort_info_grouping_set_nth(info, gcnt++, column);
- } else if (!strcmp (grouping->name, "leaf")) {
- column.column = e_xml_get_integer_prop_by_name (grouping, "column");
- column.ascending = e_xml_get_bool_prop_by_name (grouping, "ascending");
+ } else if (!strcmp ((char *)grouping->name, "leaf")) {
+ column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column");
+ column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending");
e_table_sort_info_sorting_set_nth(info, scnt++, column);
}
}
@@ -422,22 +422,22 @@ e_table_sort_info_save_to_node (ETableSortInfo *info,
const int sort_count = e_table_sort_info_sorting_get_count (info);
const int group_count = e_table_sort_info_grouping_get_count (info);
- grouping = xmlNewChild (parent, NULL, "grouping", NULL);
+ grouping = xmlNewChild (parent, NULL, (const unsigned char *)"grouping", NULL);
for (i = 0; i < group_count; i++) {
ETableSortColumn column = e_table_sort_info_grouping_get_nth(info, i);
- xmlNode *new_node = xmlNewChild(grouping, NULL, "group", NULL);
+ xmlNode *new_node = xmlNewChild(grouping, NULL, (const unsigned char *)"group", NULL);
- e_xml_set_integer_prop_by_name (new_node, "column", column.column);
- e_xml_set_bool_prop_by_name (new_node, "ascending", column.ascending);
+ e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"column", column.column);
+ e_xml_set_bool_prop_by_name (new_node, (const unsigned char *)"ascending", column.ascending);
}
for (i = 0; i < sort_count; i++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(info, i);
- xmlNode *new_node = xmlNewChild(grouping, NULL, "leaf", NULL);
+ xmlNode *new_node = xmlNewChild(grouping, NULL, (const unsigned char *)"leaf", NULL);
- e_xml_set_integer_prop_by_name (new_node, "column", column.column);
- e_xml_set_bool_prop_by_name (new_node, "ascending", column.ascending);
+ e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"column", column.column);
+ e_xml_set_bool_prop_by_name (new_node, (const unsigned char *)"ascending", column.ascending);
}
return grouping;
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index dca17e1bd1..fb8f821335 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -187,24 +187,24 @@ e_table_specification_load_from_node (ETableSpecification *specification,
GList *list = NULL, *list2;
int i;
- specification->no_headers = e_xml_get_bool_prop_by_name (node, "no-headers");
- specification->click_to_add = e_xml_get_bool_prop_by_name (node, "click-to-add");
- specification->click_to_add_end = e_xml_get_bool_prop_by_name (node, "click-to-add-end") && specification->click_to_add;
- specification->alternating_row_colors = e_xml_get_bool_prop_by_name_with_default (node, "alternating-row-colors", TRUE);
- specification->horizontal_draw_grid = e_xml_get_bool_prop_by_name (node, "horizontal-draw-grid");
- specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, "vertical-draw-grid");
- if (e_xml_get_bool_prop_by_name_with_default(node, "draw-grid", TRUE) ==
- e_xml_get_bool_prop_by_name_with_default(node, "draw-grid", FALSE)) {
+ specification->no_headers = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"no-headers");
+ specification->click_to_add = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"click-to-add");
+ specification->click_to_add_end = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"click-to-add-end") && specification->click_to_add;
+ specification->alternating_row_colors = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"alternating-row-colors", TRUE);
+ specification->horizontal_draw_grid = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"horizontal-draw-grid");
+ specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"vertical-draw-grid");
+ if (e_xml_get_bool_prop_by_name_with_default(node, (const unsigned char *)"draw-grid", TRUE) ==
+ e_xml_get_bool_prop_by_name_with_default(node, (const unsigned char *)"draw-grid", FALSE)) {
specification->horizontal_draw_grid =
- specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, "draw-grid");
+ specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"draw-grid");
}
- specification->draw_focus = e_xml_get_bool_prop_by_name_with_default (node, "draw-focus", TRUE);
- specification->horizontal_scrolling = e_xml_get_bool_prop_by_name_with_default (node, "horizontal-scrolling", FALSE);
- specification->horizontal_resize = e_xml_get_bool_prop_by_name_with_default (node, "horizontal-resize", FALSE);
- specification->allow_grouping = e_xml_get_bool_prop_by_name_with_default (node, "allow-grouping", TRUE);
+ specification->draw_focus = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"draw-focus", TRUE);
+ specification->horizontal_scrolling = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"horizontal-scrolling", FALSE);
+ specification->horizontal_resize = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"horizontal-resize", FALSE);
+ specification->allow_grouping = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"allow-grouping", TRUE);
specification->selection_mode = GTK_SELECTION_MULTIPLE;
- temp = e_xml_get_string_prop_by_name (node, "selection-mode");
+ temp = e_xml_get_string_prop_by_name (node, (const unsigned char *)"selection-mode");
if (temp && !g_ascii_strcasecmp (temp, "single")) {
specification->selection_mode = GTK_SELECTION_SINGLE;
} else if (temp && !g_ascii_strcasecmp (temp, "browse")) {
@@ -215,7 +215,7 @@ e_table_specification_load_from_node (ETableSpecification *specification,
g_free (temp);
specification->cursor_mode = E_CURSOR_SIMPLE;
- temp = e_xml_get_string_prop_by_name (node, "cursor-mode");
+ temp = e_xml_get_string_prop_by_name (node, (const unsigned char *)"cursor-mode");
if (temp && !g_ascii_strcasecmp (temp, "line")) {
specification->cursor_mode = E_CURSOR_LINE;
} else if (temp && !g_ascii_strcasecmp (temp, "spreadsheet")) {
@@ -226,12 +226,12 @@ e_table_specification_load_from_node (ETableSpecification *specification,
g_free (specification->click_to_add_message);
specification->click_to_add_message =
e_xml_get_string_prop_by_name (
- node, "_click-to-add-message");
+ node, (const unsigned char *)"_click-to-add-message");
g_free (specification->domain);
specification->domain =
e_xml_get_string_prop_by_name (
- node, "gettext-domain");
+ node, (const unsigned char *)"gettext-domain");
if (specification->domain && !*specification->domain) {
g_free (specification->domain);
specification->domain = NULL;
@@ -249,12 +249,12 @@ e_table_specification_load_from_node (ETableSpecification *specification,
specification->columns = NULL;
for (children = node->xmlChildrenNode; children; children = children->next) {
- if (!strcmp (children->name, "ETableColumn")) {
+ if (!strcmp ((char *)children->name, "ETableColumn")) {
ETableColumnSpecification *col_spec = e_table_column_specification_new ();
e_table_column_specification_load_from_node (col_spec, children);
list = g_list_append (list, col_spec);
- } else if (specification->state == NULL && !strcmp (children->name, "ETableState")) {
+ } else if (specification->state == NULL && !strcmp ((char *)children->name, "ETableState")) {
specification->state = e_table_state_new ();
e_table_state_load_from_node (specification->state, children);
e_table_sort_info_set_can_group (specification->state->sort_info, specification->allow_grouping);
@@ -294,7 +294,7 @@ e_table_specification_save_to_file (ETableSpecification *specification,
g_return_val_if_fail (filename != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), -1);
- if ((doc = xmlNewDoc ("1.0")) == NULL)
+ if ((doc = xmlNewDoc ((const unsigned char *)"1.0")) == NULL)
return -1;
xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc));
@@ -327,11 +327,11 @@ e_table_specification_save_to_string (ETableSpecification *specification)
g_return_val_if_fail (specification != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
- doc = xmlNewDoc ("1.0");
+ doc = xmlNewDoc ((const unsigned char *)"1.0");
xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc));
xmlDocDumpMemory (doc, &string, &length);
- ret_val = g_strdup (string);
+ ret_val = g_strdup ((gchar *)string);
xmlFree (string);
return ret_val;
}
@@ -358,17 +358,17 @@ e_table_specification_save_to_node (ETableSpecification *specification,
g_return_val_if_fail (specification != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
- node = xmlNewNode (NULL, "ETableSpecification");
- e_xml_set_bool_prop_by_name (node, "no-headers", specification->no_headers);
- e_xml_set_bool_prop_by_name (node, "click-to-add", specification->click_to_add);
- e_xml_set_bool_prop_by_name (node, "click-to-add-end", specification->click_to_add_end && specification->click_to_add);
- e_xml_set_bool_prop_by_name (node, "alternating-row-colors", specification->alternating_row_colors);
- e_xml_set_bool_prop_by_name (node, "horizontal-draw-grid", specification->horizontal_draw_grid);
- e_xml_set_bool_prop_by_name (node, "vertical-draw-grid", specification->vertical_draw_grid);
- e_xml_set_bool_prop_by_name (node, "draw-focus", specification->draw_focus);
- e_xml_set_bool_prop_by_name (node, "horizontal-scrolling", specification->horizontal_scrolling);
- e_xml_set_bool_prop_by_name (node, "horizontal-resize", specification->horizontal_resize);
- e_xml_set_bool_prop_by_name (node, "allow-grouping", specification->allow_grouping);
+ node = xmlNewNode (NULL, (const unsigned char *)"ETableSpecification");
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"no-headers", specification->no_headers);
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"click-to-add", specification->click_to_add);
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"click-to-add-end", specification->click_to_add_end && specification->click_to_add);
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"alternating-row-colors", specification->alternating_row_colors);
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"horizontal-draw-grid", specification->horizontal_draw_grid);
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"vertical-draw-grid", specification->vertical_draw_grid);
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"draw-focus", specification->draw_focus);
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"horizontal-scrolling", specification->horizontal_scrolling);
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"horizontal-resize", specification->horizontal_resize);
+ e_xml_set_bool_prop_by_name (node, (const unsigned char *)"allow-grouping", specification->allow_grouping);
switch (specification->selection_mode){
case GTK_SELECTION_SINGLE:
@@ -381,15 +381,15 @@ e_table_specification_save_to_node (ETableSpecification *specification,
case GTK_SELECTION_EXTENDED:
s = "extended";
}
- xmlSetProp (node, "selection-mode", s);
+ xmlSetProp (node, (const unsigned char *)"selection-mode", (unsigned char *)s);
if (specification->cursor_mode == E_CURSOR_LINE)
s = "line";
else
s = "cell";
- xmlSetProp (node, "cursor-mode", s);
+ xmlSetProp (node, (const unsigned char *)"cursor-mode", (unsigned char *)s);
- xmlSetProp (node, "_click-to-add-message", specification->click_to_add_message);
- xmlSetProp (node, "gettext-domain", specification->domain);
+ xmlSetProp (node, (const unsigned char *)"_click-to-add-message", (unsigned char *)specification->click_to_add_message);
+ xmlSetProp (node, (const unsigned char *)"gettext-domain", (unsigned char *)specification->domain);
if (specification->columns){
int i;
diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c
index e21db9707c..1b9ecfd16d 100644
--- a/widgets/table/e-table-state.c
+++ b/widgets/table/e-table-state.c
@@ -161,7 +161,7 @@ e_table_state_load_from_node (ETableState *state,
int i;
state_version = e_xml_get_double_prop_by_name_with_default (
- node, "state-version", STATE_VERSION);
+ node, (const unsigned char *)"state-version", STATE_VERSION);
if (state->sort_info)
g_object_unref (state->sort_info);
@@ -169,18 +169,18 @@ e_table_state_load_from_node (ETableState *state,
state->sort_info = NULL;
children = node->xmlChildrenNode;
for (; children; children = children->next) {
- if (!strcmp (children->name, "column")) {
+ if (!strcmp ((char *)children->name, "column")) {
int_and_double *column_info = g_new(int_and_double, 1);
column_info->column = e_xml_get_integer_prop_by_name(
- children, "source");
+ children, (const unsigned char *)"source");
column_info->expansion =
e_xml_get_double_prop_by_name_with_default(
- children, "expansion", 1);
+ children, (const unsigned char *)"expansion", 1);
list = g_list_append (list, column_info);
} else if (state->sort_info == NULL &&
- !strcmp (children->name, "grouping")) {
+ !strcmp ((char *)children->name, "grouping")) {
state->sort_info = e_table_sort_info_new();
e_table_sort_info_load_from_node(
state->sort_info, children, state_version);
@@ -209,7 +209,7 @@ e_table_state_save_to_file (ETableState *state,
{
xmlDoc *doc;
- if ((doc = xmlNewDoc ("1.0")) == NULL)
+ if ((doc = xmlNewDoc ((const unsigned char *)"1.0")) == NULL)
return;
xmlDocSetRootElement (doc, e_table_state_save_to_node (state, NULL));
@@ -227,12 +227,12 @@ e_table_state_save_to_string (ETableState *state)
int length;
xmlDoc *doc;
- doc = xmlNewDoc("1.0");
+ doc = xmlNewDoc((const unsigned char *)"1.0");
xmlDocSetRootElement(doc, e_table_state_save_to_node(state, NULL));
xmlDocDumpMemory(doc, &string, &length);
xmlFreeDoc(doc);
- ret_val = g_strdup(string);
+ ret_val = g_strdup((gchar *)string);
xmlFree(string);
return ret_val;
}
@@ -245,21 +245,21 @@ e_table_state_save_to_node (ETableState *state,
xmlNode *node;
if (parent)
- node = xmlNewChild (parent, NULL, "ETableState", NULL);
+ node = xmlNewChild (parent, NULL, (const unsigned char *)"ETableState", NULL);
else
- node = xmlNewNode (NULL, "ETableState");
+ node = xmlNewNode (NULL, (const unsigned char *)"ETableState");
- e_xml_set_double_prop_by_name(node, "state-version", STATE_VERSION);
+ e_xml_set_double_prop_by_name(node, (const unsigned char *)"state-version", STATE_VERSION);
for (i = 0; i < state->col_count; i++) {
int column = state->columns[i];
double expansion = state->expansions[i];
xmlNode *new_node;
- new_node = xmlNewChild(node, NULL, "column", NULL);
- e_xml_set_integer_prop_by_name (new_node, "source", column);
+ new_node = xmlNewChild(node, NULL, (const unsigned char *)"column", NULL);
+ e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"source", column);
if (expansion >= -1)
- e_xml_set_double_prop_by_name(new_node, "expansion", expansion);
+ e_xml_set_double_prop_by_name(new_node, (const unsigned char *)"expansion", expansion);
}
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c
index 5b015ca164..1adbd648c0 100644
--- a/widgets/table/e-table-subset-variable.c
+++ b/widgets/table/e-table-subset-variable.c
@@ -208,7 +208,7 @@ e_table_subset_variable_clear (ETableSubsetVariable *etssv)
e_table_model_pre_change (etm);
etss->n_map = 0;
g_free (etss->map_table);
- etss->map_table = g_new (unsigned int, 1);
+ etss->map_table = (int *)g_new (unsigned int, 1);
etssv->n_vals_allocated = 1;
e_table_model_changed (etm);
diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c
index 3f5f57bc56..df3d5f6139 100644
--- a/widgets/table/e-table-subset.c
+++ b/widgets/table/e-table-subset.c
@@ -401,7 +401,7 @@ e_table_subset_construct (ETableSubset *etss, ETableModel *source, int nvals)
return NULL;
} else
buffer = NULL;
- etss->map_table = buffer;
+ etss->map_table = (int *)buffer;
etss->n_map = nvals;
etss->source = source;
g_object_ref (source);
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 2d5f72b4e6..5979b37eb8 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -899,8 +899,8 @@ save_expanded_state_func (gpointer keyp, gpointer value, gpointer data)
if (node->expanded != tar->expanded_default) {
gchar *save_id = e_tree_model_get_save_id(tar->model, path);
- xmlnode = xmlNewChild (tar->root, NULL, "node", NULL);
- e_xml_set_string_prop_by_name(xmlnode, "id", save_id);
+ xmlnode = xmlNewChild (tar->root, NULL, (const unsigned char *)"node", NULL);
+ e_xml_set_string_prop_by_name(xmlnode, (const unsigned char *)"id", save_id);
g_free(save_id);
}
}
@@ -914,16 +914,16 @@ e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *f
g_return_if_fail(etta != NULL);
- doc = xmlNewDoc ("1.0");
- root = xmlNewDocNode (doc, NULL, (xmlChar *) "expanded_state", NULL);
+ doc = xmlNewDoc ((const unsigned char *)"1.0");
+ root = xmlNewDocNode (doc, NULL, (const unsigned char *)"expanded_state", NULL);
xmlDocSetRootElement (doc, root);
tar.model = etta->priv->source;
tar.root = root;
tar.expanded_default = e_tree_model_get_expanded_default(etta->priv->source);
- e_xml_set_integer_prop_by_name (root, "vers", 2);
- e_xml_set_bool_prop_by_name (root, "default", tar.expanded_default);
+ e_xml_set_integer_prop_by_name (root, (const unsigned char *)"vers", 2);
+ e_xml_set_bool_prop_by_name (root, (const unsigned char *)"default", tar.expanded_default);
g_hash_table_foreach (etta->priv->nodes, save_expanded_state_func, &tar);
@@ -956,18 +956,18 @@ open_file (ETreeTableAdapter *etta, const char *filename)
return NULL;
root = xmlDocGetRootElement (doc);
- if (root == NULL || strcmp (root->name, "expanded_state")) {
+ if (root == NULL || strcmp ((char *)root->name, "expanded_state")) {
xmlFreeDoc (doc);
return NULL;
}
- vers = e_xml_get_integer_prop_by_name_with_default (root, "vers", 0);
+ vers = e_xml_get_integer_prop_by_name_with_default (root, (const unsigned char *)"vers", 0);
if (vers > 2) {
xmlFreeDoc (doc);
return NULL;
}
model_default = e_tree_model_get_expanded_default (etta->priv->source);
- saved_default = e_xml_get_bool_prop_by_name_with_default (root, "default", !model_default);
+ saved_default = e_xml_get_bool_prop_by_name_with_default (root, (const unsigned char *)"default", !model_default);
if (saved_default != model_default) {
xmlFreeDoc (doc);
return NULL;
@@ -1034,10 +1034,10 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f
model_default = e_tree_model_get_expanded_default(etta->priv->source);
- if (!strcmp (root->name, "expanded_state")) {
+ if (!strcmp ((char *)root->name, "expanded_state")) {
char *state;
- state = e_xml_get_string_prop_by_name_with_default (root, "default", "");
+ state = e_xml_get_string_prop_by_name_with_default (root, (const unsigned char *)"default", "");
if (state[0] == 't')
file_default = TRUE;
@@ -1056,12 +1056,12 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f
char *id;
ETreePath path;
- if (strcmp (child->name, "node")) {
+ if (strcmp ((char *)child->name, "node")) {
d(g_warning ("unknown node '%s' in %s", child->name, filename));
continue;
}
- id = e_xml_get_string_prop_by_name_with_default (child, "id", "");
+ id = e_xml_get_string_prop_by_name_with_default (child, (const unsigned char *)"id", "");
if (!strcmp(id, "")) {
g_free(id);