Commit 1a385c50 authored by Benjamin Otte's avatar Benjamin Otte

fix compile warnings

Fallout from running make CFLAGS="-Werror"; mostly missing casts and
constness issues.
parent 272c30bb
......@@ -211,15 +211,15 @@ do_rotated_text (GtkWidget *do_widget)
label = gtk_label_new (text);
gtk_container_add (GTK_CONTAINER (box), label);
gtk_label_set_angle (label, 45);
gtk_label_set_angle (GTK_LABEL (label), 45);
/* Set up fancy stuff on the label */
layout = gtk_label_get_layout (label);
layout = gtk_label_get_layout (GTK_LABEL (label));
pango_cairo_context_set_shape_renderer (pango_layout_get_context (layout),
fancy_shape_renderer,
NULL, NULL);
attrs = create_fancy_attr_list_for_layout (layout);
gtk_label_set_attributes (label, attrs);
gtk_label_set_attributes (GTK_LABEL (label), attrs);
pango_attr_list_unref (attrs);
}
......
......@@ -2452,7 +2452,7 @@ gchar *
gdk_pixbuf_format_get_description (GdkPixbufFormat *format)
{
gchar *domain;
gchar *description;
const gchar *description;
g_return_val_if_fail (format != NULL, NULL);
if (format->domain != NULL)
......
......@@ -449,7 +449,7 @@ gtk_activatable_do_set_related_action (GtkActivatable *activatable,
/* Some apps are using the object data directly...
* so continue to set it for a bit longer
*/
g_object_set_data (activatable, "gtk-action", NULL);
g_object_set_data (G_OBJECT (activatable), "gtk-action", NULL);
/*
* We don't want prev_action to be activated
......@@ -478,7 +478,7 @@ gtk_activatable_do_set_related_action (GtkActivatable *activatable,
_gtk_action_add_to_proxy_list (action, GTK_WIDGET (activatable));
g_object_set_data (activatable, "gtk-action", action);
g_object_set_data (G_OBJECT (activatable), "gtk-action", action);
}
}
}
......
......@@ -483,7 +483,7 @@ grab_dnd_keys (GtkWidget *widget,
gdk_flush ();
gdk_error_trap_pop ();
gdk_window_add_filter (NULL, root_key_filter, GDK_WINDOW_XID (window));
gdk_window_add_filter (NULL, root_key_filter, (gpointer) GDK_WINDOW_XID (window));
}
static void
......@@ -497,7 +497,7 @@ ungrab_dnd_keys (GtkWidget *widget,
window = widget->window;
root = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
gdk_window_remove_filter (NULL, root_key_filter, GDK_WINDOW_XID (window));
gdk_window_remove_filter (NULL, root_key_filter, (gpointer) GDK_WINDOW_XID (window));
gdk_error_trap_push ();
......
......@@ -1079,7 +1079,8 @@ gtk_handle_box_button_press (GtkWidget *widget,
gint root_x, root_y;
gint width, height;
gtk_invisible_set_screen (GTK_INVISIBLE (invisible), gtk_widget_get_screen (hb));
gtk_invisible_set_screen (GTK_INVISIBLE (invisible),
gtk_widget_get_screen (GTK_WIDGET (hb)));
gdk_window_get_deskrelative_origin (hb->bin_window, &desk_x, &desk_y);
gdk_window_get_origin (hb->bin_window, &root_x, &root_y);
gdk_drawable_get_size (hb->bin_window, &width, &height);
......
......@@ -9014,12 +9014,14 @@ gtk_icon_view_accessible_model_row_changed (GtkTreeModel *tree_model,
GtkIconViewItem *item;
GtkIconViewAccessible *a11y_view;
GtkIconViewItemAccessible *a11y_item;
gchar *name, *text;
const gchar *name;
gchar *text;
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
a11y_view = GTK_ICON_VIEW_ACCESSIBLE (atk_obj);
index = gtk_tree_path_get_indices(path)[0];
a11y_item = gtk_icon_view_accessible_find_child (atk_obj, index);
a11y_item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (
gtk_icon_view_accessible_find_child (atk_obj, index));
if (a11y_item)
{
......
......@@ -10331,7 +10331,7 @@ gtk_tree_view_ensure_interactive_directory (GtkTreeView *tree_view)
return;
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (tree_view));
screen = gtk_widget_get_screen (tree_view);
screen = gtk_widget_get_screen (GTK_WIDGET (tree_view));
if (tree_view->priv->search_window != NULL)
{
......
......@@ -2518,17 +2518,17 @@ test_message_area (void)
"</interface>";
error = NULL;
builder = builder_new_from_string (buffer, -1, &error);
builder = builder_new_from_string (buffer, -1, NULL);
g_assert (error == NULL);
obj = gtk_builder_get_object (builder, "infobar1");
g_assert (GTK_IS_INFO_BAR (obj));
obj1 = gtk_builder_get_object (builder, "content");
g_assert (GTK_IS_LABEL (obj1));
g_assert (gtk_widget_get_parent (gtk_widget_get_parent (obj1)) == obj);
g_assert (gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (obj1))) == GTK_WIDGET (obj));
obj1 = gtk_builder_get_object (builder, "button_ok");
g_assert (GTK_IS_BUTTON (obj1));
g_assert (gtk_widget_get_parent (gtk_widget_get_parent (obj1)) == obj);
g_assert (gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (obj1))) == GTK_WIDGET (obj));
g_object_unref (builder);
}
......
......@@ -2127,7 +2127,7 @@ gail_tree_view_get_cell_area (GailCellParent *parent,
GtkCellRenderer *renderer;
cell_index = atk_object_get_index_in_parent (ATK_OBJECT (cell));
renderers = gtk_cel_layout_get_cells (GTK_CELL_LAYOUT (tv_col));
renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (tv_col));
renderer = g_list_nth_data (renderers, cell_index);
found = gtk_tree_view_column_cell_get_position (tv_col, renderer, &cell_start, &cell_width);
......@@ -3177,7 +3177,7 @@ update_cell_value (GailRendererCell *renderer_cell,
gtk_tree_view_column_cell_set_cell_data (cell_info->cell_col_ref,
tree_model, &iter, is_expander, is_expanded);
}
renderers = gtk_cell_layout_get_cells (GKT_CELL_LAYOUT (cell_info->cell_col_ref));
renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (cell_info->cell_col_ref));
gail_return_val_if_fail (renderers, FALSE);
/*
......
......@@ -5297,7 +5297,7 @@ entry_toggle_pulse (GtkWidget *checkbutton,
GtkWidget *entry)
{
g_object_set_data (G_OBJECT (entry), "progress-pulse",
GINT_TO_POINTER (GTK_TOGGLE_BUTTON (checkbutton)->active));
GUINT_TO_POINTER ((guint) GTK_TOGGLE_BUTTON (checkbutton)->active));
}
static void
......
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