summaryrefslogtreecommitdiff
path: root/settings
diff options
context:
space:
mode:
authorSimon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>2015-03-02 15:12:35 +0100
committerEric Koegel <eric.koegel@gmail.com>2015-03-22 14:52:49 +0300
commit67eb80579fb662e29596611d6428aec43b5876e9 (patch)
treeeb47656a8a903d1ed5f467397e92273c25d2ca6c /settings
parentc4f387f85a099f9572bc332ad2f5e41c821dd6b6 (diff)
downloadixfce4-power-manager-67eb80579fb662e29596611d6428aec43b5876e9.tar.gz
Replace deprecated gtk_widget_reparent
Diffstat (limited to 'settings')
-rw-r--r--settings/xfpm-settings.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index d282d251..f8ffd273 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 ();