tests/testbbox.c use g_object_ref/unref instead of deprecated functions.

2007-11-14  Michael Natterer  <mitch@imendio.com>

	* tests/testbbox.c
	* tests/testframe.c: use g_object_ref/unref instead of deprecated
	functions.


svn path=/trunk/; revision=18990
This commit is contained in:
Michael Natterer
2007-11-14 10:00:37 +00:00
committed by Michael Natterer
parent b4327f13ed
commit b5f204ac3c
3 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2007-11-14 Michael Natterer <mitch@imendio.com>
* tests/testbbox.c
* tests/testframe.c: use g_object_ref/unref instead of deprecated
functions.
2007-11-14 Michael Natterer <mitch@imendio.com> 2007-11-14 Michael Natterer <mitch@imendio.com>
* gtk/gtkstyle.c (gtk_default_draw_focus): cast pointers to fix * gtk/gtkstyle.c (gtk_default_draw_focus): cast pointers to fix

View File

@ -70,10 +70,10 @@ reparent_widget (GtkWidget *widget,
GtkWidget *old_parent, GtkWidget *old_parent,
GtkWidget *new_parent) GtkWidget *new_parent)
{ {
gtk_widget_ref (widget); g_object_ref (widget);
gtk_container_remove (GTK_CONTAINER (old_parent), widget); gtk_container_remove (GTK_CONTAINER (old_parent), widget);
gtk_container_add (GTK_CONTAINER (new_parent), widget); gtk_container_add (GTK_CONTAINER (new_parent), widget);
gtk_widget_unref (widget); g_object_unref (widget);
} }
static void static void

View File

@ -30,7 +30,8 @@ spin_ythickness_cb (GtkSpinButton *spin, gpointer user_data)
rcstyle->xthickness = GTK_WIDGET (frame)->style->xthickness; rcstyle->xthickness = GTK_WIDGET (frame)->style->xthickness;
rcstyle->ythickness = gtk_spin_button_get_value (spin); rcstyle->ythickness = gtk_spin_button_get_value (spin);
gtk_widget_modify_style (frame, rcstyle); gtk_widget_modify_style (frame, rcstyle);
gtk_rc_style_unref (rcstyle);
g_object_unref (rcstyle);
} }
static void static void
@ -44,7 +45,7 @@ spin_xthickness_cb (GtkSpinButton *spin, gpointer user_data)
rcstyle->ythickness = GTK_WIDGET (frame)->style->ythickness; rcstyle->ythickness = GTK_WIDGET (frame)->style->ythickness;
gtk_widget_modify_style (frame, rcstyle); gtk_widget_modify_style (frame, rcstyle);
gtk_rc_style_unref (rcstyle); g_object_unref (rcstyle);
} }
/* Function to normalize rounding errors in FP arithmetic to /* Function to normalize rounding errors in FP arithmetic to