[Xfce4-commits] [xfce/xfce4-power-manager] 06/63: Replace deprecated gtk_widget_reparent

noreply at xfce.org noreply at xfce.org
Sun Mar 22 13:02:01 CET 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 67eb80579fb662e29596611d6428aec43b5876e9
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Mon Mar 2 15:12:35 2015 +0100

    Replace deprecated gtk_widget_reparent
---
 settings/xfpm-settings.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index d282d25..f8ffd27 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -2277,6 +2277,7 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean auth_suspend,
                           Window id, gchar *device_id)
 {
     GtkWidget *plug;
+    GtkWidget *parent;
     GtkWidget *dialog;
     GtkWidget *plugged_box;
     GtkWidget *viewport;
@@ -2441,7 +2442,16 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean auth_suspend,
 	plugged_box = GTK_WIDGET (gtk_builder_get_object (xml, "plug-child"));
 	plug = gtk_plug_new (id);
 	gtk_widget_show (plug);
-	gtk_widget_reparent (plugged_box, plug);
+
+    parent = gtk_widget_get_parent (plugged_box);
+    if (parent)
+    {
+        g_object_ref (plugged_box);
+        gtk_container_remove (GTK_CONTAINER (parent), plugged_box);
+        gtk_container_add (GTK_CONTAINER (plug), plugged_box);
+        g_object_unref (plugged_box);
+    }
+
 	g_signal_connect (plug, "delete-event", 
 			  G_CALLBACK (delete_event_cb), channel);
 	gdk_notify_startup_complete ();

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list