mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Fix fallout from g_object_ref change
g_object_ref now returns the type of the object that was passed. Introduce cast as necessary to avoid warnings due to this.
This commit is contained in:
parent
1c9e3af482
commit
072f06abf7
@ -84,7 +84,7 @@ gtk_label_accessible_link_impl_get_hyperlink (AtkHyperlinkImpl *atk_impl)
|
||||
{
|
||||
GtkLabelAccessibleLinkImpl *impl = (GtkLabelAccessibleLinkImpl *)atk_impl;
|
||||
|
||||
return g_object_ref (impl->link);
|
||||
return (AtkHyperlink *)g_object_ref (impl->link);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -469,7 +469,7 @@ gtk_tree_view_accessible_ref_child (AtkObject *obj,
|
||||
if (cell == NULL)
|
||||
cell = create_cell (tree_view, accessible, tree, node, tv_col);
|
||||
|
||||
return g_object_ref (cell);
|
||||
return (AtkObject *) g_object_ref (cell);
|
||||
}
|
||||
|
||||
static AtkStateSet*
|
||||
@ -562,7 +562,7 @@ gtk_tree_view_accessible_ref_accessible_at_point (AtkComponent *component,
|
||||
if (cell == NULL)
|
||||
cell = create_cell (tree_view, GTK_TREE_VIEW_ACCESSIBLE (component), tree, node, column);
|
||||
|
||||
return g_object_ref (cell);
|
||||
return (AtkObject *) g_object_ref (cell);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -227,7 +227,8 @@ gtk_cell_renderer_spin_set_property (GObject *object,
|
||||
}
|
||||
|
||||
if (obj)
|
||||
priv->adjustment = g_object_ref_sink (obj);
|
||||
priv->adjustment = GTK_ADJUSTMENT (g_object_ref_sink (obj));
|
||||
|
||||
break;
|
||||
case PROP_CLIMB_RATE:
|
||||
priv->climb_rate = g_value_get_double (value);
|
||||
|
@ -459,7 +459,7 @@ plane_set_property (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkColorPlane *plane = GTK_COLOR_PLANE (object);
|
||||
GObject *adjustment;
|
||||
GtkAdjustment *adjustment;
|
||||
|
||||
/* Construct only properties can only be set once, these are created
|
||||
* only in order to be properly buildable from gtkcoloreditor.ui
|
||||
|
@ -292,7 +292,7 @@ gtk_combo_box_text_buildable_custom_tag_start (GtkBuildable *buildable,
|
||||
|
||||
data = g_slice_new0 (ItemParserData);
|
||||
data->builder = g_object_ref (builder);
|
||||
data->object = g_object_ref (buildable);
|
||||
data->object = (GObject *) g_object_ref (buildable);
|
||||
data->domain = gtk_builder_get_translation_domain (builder);
|
||||
data->string = g_string_new ("");
|
||||
|
||||
|
@ -176,7 +176,7 @@ gtk_css_image_fallback_compute (GtkCssImage *image,
|
||||
return GTK_CSS_IMAGE (copy);
|
||||
}
|
||||
else
|
||||
return g_object_ref (fallback);
|
||||
return GTK_CSS_IMAGE (g_object_ref (fallback));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -1623,7 +1623,7 @@ gtk_label_buildable_custom_tag_start (GtkBuildable *buildable,
|
||||
|
||||
parser_data = g_slice_new0 (PangoParserData);
|
||||
parser_data->builder = g_object_ref (builder);
|
||||
parser_data->object = g_object_ref (buildable);
|
||||
parser_data->object = (GObject *) g_object_ref (buildable);
|
||||
*parser = pango_parser;
|
||||
*data = parser_data;
|
||||
return TRUE;
|
||||
|
@ -225,7 +225,7 @@ gtk_sidebar_row_set_property (GObject *object,
|
||||
object = g_value_get_object (value);
|
||||
if (object != NULL)
|
||||
{
|
||||
self->start_icon = g_object_ref (object);
|
||||
self->start_icon = G_ICON (g_object_ref (object));
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->start_icon_widget), self->start_icon);
|
||||
}
|
||||
else
|
||||
@ -241,7 +241,7 @@ gtk_sidebar_row_set_property (GObject *object,
|
||||
object = g_value_get_object (value);
|
||||
if (object != NULL)
|
||||
{
|
||||
self->end_icon = g_object_ref (object);
|
||||
self->end_icon = G_ICON (g_object_ref (object));
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->end_icon_widget), self->end_icon);
|
||||
gtk_widget_show (self->end_icon_widget);
|
||||
}
|
||||
|
@ -693,7 +693,7 @@ gtk_tool_palette_add (GtkContainer *container,
|
||||
|
||||
g_ptr_array_add (palette->priv->groups, info);
|
||||
info->pos = palette->priv->groups->len - 1;
|
||||
info->widget = g_object_ref_sink (child);
|
||||
info->widget = (GtkToolItemGroup *)g_object_ref_sink (child);
|
||||
|
||||
gtk_widget_set_parent (child, GTK_WIDGET (palette));
|
||||
}
|
||||
|
@ -14233,7 +14233,7 @@ gtk_tree_view_set_search_entry (GtkTreeView *tree_view,
|
||||
|
||||
if (entry)
|
||||
{
|
||||
tree_view->priv->search_entry = g_object_ref (entry);
|
||||
tree_view->priv->search_entry = GTK_WIDGET (g_object_ref (entry));
|
||||
tree_view->priv->search_custom_entry_set = TRUE;
|
||||
|
||||
if (tree_view->priv->search_entry_changed_id == 0)
|
||||
|
@ -11924,7 +11924,7 @@ gtk_widget_buildable_custom_tag_start (GtkBuildable *buildable,
|
||||
AccelGroupParserData *data;
|
||||
|
||||
data = g_slice_new0 (AccelGroupParserData);
|
||||
data->object = g_object_ref (buildable);
|
||||
data->object = (GObject *)g_object_ref (buildable);
|
||||
data->builder = builder;
|
||||
|
||||
*parser = accel_group_parser;
|
||||
|
@ -3959,7 +3959,7 @@ cups_request_ppd (GtkPrinter *printer)
|
||||
g_io_channel_set_encoding (data->ppd_io, NULL, NULL);
|
||||
g_io_channel_set_close_on_unref (data->ppd_io, TRUE);
|
||||
|
||||
data->printer = g_object_ref (printer);
|
||||
data->printer = (GtkPrinterCups *) g_object_ref (printer);
|
||||
|
||||
resource = g_strdup_printf ("/printers/%s.ppd",
|
||||
gtk_printer_cups_get_ppd_name (GTK_PRINTER_CUPS (printer)));
|
||||
|
@ -233,7 +233,7 @@ animation_timer (GtkEntryCompletion *completion)
|
||||
{
|
||||
g_print ("removing model!\n");
|
||||
|
||||
old_store = g_object_ref (gtk_entry_completion_get_model (completion));
|
||||
old_store = GTK_LIST_STORE (g_object_ref (gtk_entry_completion_get_model (completion)));
|
||||
gtk_entry_completion_set_model (completion, NULL);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user