tests: Adapt to gtk_widget_reparent deprecations

This commit is contained in:
Matthias Clasen 2014-05-22 08:50:18 -04:00
parent cbb5e27b3e
commit 69cef3c9b4
2 changed files with 10 additions and 0 deletions

View File

@ -2092,7 +2092,9 @@ reparent_label (GtkWidget *widget,
label = g_object_get_data (G_OBJECT (widget), "user_data");
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_reparent (label, new_parent);
G_GNUC_END_IGNORE_DEPRECATIONS
}
static void
@ -3734,7 +3736,9 @@ static gulong sw_destroyed_handler = 0;
static gboolean
scrolled_windows_delete_cb (GtkWidget *widget, GdkEventAny *event, GtkWidget *scrollwin)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_reparent (scrollwin, sw_parent);
G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_handler_disconnect (sw_parent, sw_destroyed_handler);
sw_float_parent = NULL;
@ -3765,7 +3769,9 @@ scrolled_windows_remove (GtkWidget *dialog, gint response, GtkWidget *scrollwin)
if (sw_parent)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_reparent (scrollwin, sw_parent);
G_GNUC_END_IGNORE_DEPRECATIONS
gtk_widget_destroy (sw_float_parent);
g_signal_handler_disconnect (sw_parent, sw_destroyed_handler);
@ -3782,7 +3788,9 @@ scrolled_windows_remove (GtkWidget *dialog, gint response, GtkWidget *scrollwin)
gtk_window_set_default_size (GTK_WINDOW (sw_float_parent), 200, 200);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_reparent (scrollwin, sw_float_parent);
G_GNUC_END_IGNORE_DEPRECATIONS
gtk_widget_show (sw_float_parent);
sw_destroyed_handler =

View File

@ -20,7 +20,9 @@ remove_this_row (GtkButton *button, GtkWidget *child)
revealer = gtk_revealer_new ();
gtk_revealer_set_reveal_child (GTK_REVEALER (revealer), TRUE);
gtk_widget_show (revealer);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_reparent (child, revealer);
G_GNUC_END_IGNORE_DEPRECATIONS
gtk_container_add (GTK_CONTAINER (row), revealer);
g_signal_connect (revealer, "notify::child-revealed",
G_CALLBACK (row_unrevealed), NULL);