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/table | |
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/table')
-rw-r--r-- | widgets/table/ChangeLog | 30 | ||||
-rw-r--r-- | widgets/table/e-cell-text.c | 6 | ||||
-rw-r--r-- | widgets/table/e-cell-tree.c | 2 | ||||
-rw-r--r-- | widgets/table/e-table-column-specification.c | 62 | ||||
-rw-r--r-- | widgets/table/e-table-field-chooser-item.c | 2 | ||||
-rw-r--r-- | widgets/table/e-table-group-container.c | 2 | ||||
-rw-r--r-- | widgets/table/e-table-header-item.c | 25 | ||||
-rw-r--r-- | widgets/table/e-table-sort-info.c | 38 | ||||
-rw-r--r-- | widgets/table/e-table-specification.c | 74 | ||||
-rw-r--r-- | widgets/table/e-table-state.c | 28 | ||||
-rw-r--r-- | widgets/table/e-table-subset-variable.c | 2 | ||||
-rw-r--r-- | widgets/table/e-table-subset.c | 2 | ||||
-rw-r--r-- | widgets/table/e-tree-table-adapter.c | 26 |
13 files changed, 168 insertions, 131 deletions
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); |