Commit 11ae610d authored by Christian Persch's avatar Christian Persch

Fix compiler warnings. Bug #504701.

svn path=/trunk/; revision=19229
parent 563ee17a
2007-12-22 Christian Persch <chpe@gnome.org>
* modules/other/gail/gailcell.c:
* modules/other/gail/gailcontainercell.c:
* modules/other/gail/gailexpander.c:
* modules/other/gail/gailtextcell.c:
* modules/other/gail/gailtextview.c:
* modules/other/gail/gailwindow.c: Fix compile warnings. Bug #504701.
2007-12-22 Christian Persch <chpe@gnome.org>
* modules/other/gail/*.c: Include config.h. Bug #504720.
......
......@@ -19,6 +19,7 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "gailcontainercell.h"
......@@ -359,7 +360,7 @@ gail_cell_remove_action_by_name (GailCell *cell,
for (list_node = cell->action_list; list_node && !action_found;
list_node = list_node->next)
{
if (!g_strcasecmp (((ActionInfo *)(list_node->data))->name, action_name))
if (!strcmp (((ActionInfo *)(list_node->data))->name, action_name))
{
action_found = TRUE;
break;
......
......@@ -119,7 +119,7 @@ gail_container_cell_remove_child (GailContainerCell *container,
g_return_if_fail (GAIL_IS_CELL(child));
g_return_if_fail (container->NChildren > 0);
g_list_remove (container->children, (gpointer) child);
container->children = g_list_remove (container->children, (gpointer) child);
_gail_container_cell_recompute_child_indices (container);
container->NChildren--;
}
......
......@@ -209,7 +209,7 @@ gail_expander_get_n_children (AtkObject* obj)
/* See if there is a label - if there is, reduce our count by 1
* since we don't want the label included with the children.
*/
if (gtk_expander_get_label_widget (widget))
if (gtk_expander_get_label_widget (GTK_EXPANDER (widget)))
count -= 1;
return count;
......@@ -237,7 +237,7 @@ gail_expander_ref_child (AtkObject *obj,
/* See if there is a label - if there is, we need to skip it
* since we don't want the label included with the children.
*/
label = gtk_expander_get_label_widget (widget);
label = gtk_expander_get_label_widget (GTK_EXPANDER (widget));
if (label) {
count = g_list_length (children);
for (index = 0; index <= i; index++) {
......
......@@ -17,6 +17,8 @@
* Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <string.h>
#include <gtk/gtk.h>
#include "gailtextcell.h"
#include "gailcontainercell.h"
......@@ -221,7 +223,7 @@ gail_text_cell_update_cache (GailRendererCell *cell,
* value has changed.
*/
if (new_cache == NULL ||
g_strcasecmp (text_cell->cell_text, new_cache))
strcmp (text_cell->cell_text, new_cache))
{
g_free (text_cell->cell_text);
temp_length = text_cell->cell_length;
......
......@@ -1016,65 +1016,65 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
name = at->name;
value = at->value;
if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_LEFT_MARGIN)))
if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_LEFT_MARGIN)))
g_object_set (G_OBJECT (tag), "left_margin", atoi (value), NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_RIGHT_MARGIN)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_RIGHT_MARGIN)))
g_object_set (G_OBJECT (tag), "right_margin", atoi (value), NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_INDENT)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_INDENT)))
g_object_set (G_OBJECT (tag), "indent", atoi (value), NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_ABOVE_LINES)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_ABOVE_LINES)))
g_object_set (G_OBJECT (tag), "pixels_above_lines", atoi (value), NULL);
else if (!g_strcasecmp(name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_BELOW_LINES)))
else if (!strcmp(name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_BELOW_LINES)))
g_object_set (G_OBJECT (tag), "pixels_below_lines", atoi (value), NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP)))
g_object_set (G_OBJECT (tag), "pixels_inside_wrap", atoi (value), NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_SIZE)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_SIZE)))
g_object_set (G_OBJECT (tag), "size", atoi (value), NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_RISE)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_RISE)))
g_object_set (G_OBJECT (tag), "rise", atoi (value), NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_WEIGHT)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_WEIGHT)))
g_object_set (G_OBJECT (tag), "weight", atoi (value), NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_BG_FULL_HEIGHT)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_BG_FULL_HEIGHT)))
{
g_object_set (G_OBJECT (tag), "bg_full_height",
(g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_BG_FULL_HEIGHT, 0))),
(strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_BG_FULL_HEIGHT, 0))),
NULL);
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_LANGUAGE)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_LANGUAGE)))
g_object_set (G_OBJECT (tag), "language", value, NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_FAMILY_NAME)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_FAMILY_NAME)))
g_object_set (G_OBJECT (tag), "family", value, NULL);
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_EDITABLE)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_EDITABLE)))
{
g_object_set (G_OBJECT (tag), "editable",
(g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_EDITABLE, 0))),
(strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_EDITABLE, 0))),
NULL);
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_INVISIBLE)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_INVISIBLE)))
{
g_object_set (G_OBJECT (tag), "invisible",
(g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_EDITABLE, 0))),
(strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_EDITABLE, 0))),
NULL);
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_UNDERLINE)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_UNDERLINE)))
{
for (j = 0; j < 3; j++)
{
if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_UNDERLINE, j)))
if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_UNDERLINE, j)))
{
g_object_set (G_OBJECT (tag), "underline", j, NULL);
break;
......@@ -1082,14 +1082,14 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
}
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STRIKETHROUGH)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STRIKETHROUGH)))
{
g_object_set (G_OBJECT (tag), "strikethrough",
(g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STRIKETHROUGH, 0))),
(strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STRIKETHROUGH, 0))),
NULL);
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_BG_COLOR)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_BG_COLOR)))
{
RGB_vals = g_strsplit (value, ",", 3);
color = g_malloc (sizeof (GdkColor));
......@@ -1099,7 +1099,7 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
g_object_set (G_OBJECT (tag), "background_gdk", color, NULL);
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_FG_COLOR)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_FG_COLOR)))
{
RGB_vals = g_strsplit (value, ",", 3);
color = g_malloc (sizeof (GdkColor));
......@@ -1109,11 +1109,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
g_object_set (G_OBJECT (tag), "foreground_gdk", color, NULL);
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STRETCH)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STRETCH)))
{
for (j = 0; j < 9; j++)
{
if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STRETCH, j)))
if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STRETCH, j)))
{
g_object_set (G_OBJECT (tag), "stretch", j, NULL);
break;
......@@ -1121,11 +1121,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
}
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_JUSTIFICATION)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_JUSTIFICATION)))
{
for (j = 0; j < 4; j++)
{
if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_JUSTIFICATION, j)))
if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_JUSTIFICATION, j)))
{
g_object_set (G_OBJECT (tag), "justification", j, NULL);
break;
......@@ -1133,11 +1133,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
}
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_DIRECTION)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_DIRECTION)))
{
for (j = 0; j < 3; j++)
{
if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_DIRECTION, j)))
if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_DIRECTION, j)))
{
g_object_set (G_OBJECT (tag), "direction", j, NULL);
break;
......@@ -1145,11 +1145,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
}
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_VARIANT)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_VARIANT)))
{
for (j = 0; j < 2; j++)
{
if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_VARIANT, j)))
if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_VARIANT, j)))
{
g_object_set (G_OBJECT (tag), "variant", j, NULL);
break;
......@@ -1157,11 +1157,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
}
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_WRAP_MODE)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_WRAP_MODE)))
{
for (j = 0; j < 3; j++)
{
if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_WRAP_MODE, j)))
if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_WRAP_MODE, j)))
{
g_object_set (G_OBJECT (tag), "wrap_mode", j, NULL);
break;
......@@ -1169,11 +1169,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
}
}
else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STYLE)))
else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STYLE)))
{
for (j = 0; j < 3; j++)
{
if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STYLE, j)))
if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STYLE, j)))
{
g_object_set (G_OBJECT (tag), "style", j, NULL);
break;
......@@ -1724,8 +1724,8 @@ static GIOChannel* gail_streamable_content_get_stream (AtkStreamable
gtk_text_buffer_get_iter_at_offset (buffer, &end, -1);
if (!strcmp ("text/plain", mime_type))
{
cbuf = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
len = strlen (cbuf);
cbuf = (guint8*) gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
len = strlen ((const char *) cbuf);
}
else
{
......@@ -1735,7 +1735,7 @@ static GIOChannel* gail_streamable_content_get_stream (AtkStreamable
fd = g_mkstemp (tname);
gio = g_io_channel_unix_new (fd);
g_io_channel_set_encoding (gio, NULL, &err);
if (!err) g_io_channel_write_chars (gio, cbuf, (gssize) len, &written, &err);
if (!err) g_io_channel_write_chars (gio, (const char *) cbuf, (gssize) len, &written, &err);
else g_message (err->message);
if (!err) g_io_channel_seek_position (gio, 0, G_SEEK_SET, &err);
else g_message (err->message);
......
......@@ -317,7 +317,7 @@ gail_window_get_name (AtkObject *accessible)
{
GList *children;
guint count;
children = gtk_container_get_children (child);
children = gtk_container_get_children (GTK_CONTAINER (child));
count = g_list_length (children);
if (count == 2)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment