summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Pacaud <emmanuel@gnome.org>2015-08-26 01:12:35 +0200
committerFelix Riemann <friemann@gnome.org>2015-08-28 22:08:29 +0200
commita57e788b7ec85cbb9021bbf152c219be2e254ec0 (patch)
tree6d13ec1ad0ee8892b9d612c0697ea827c1f9f058
parenta48af02cb389d6064947fee7421ba820213429b1 (diff)
downloadeog-a57e788b7ec85cbb9021bbf152c219be2e254ec0.tar.gz
EogPropertiesDialog: fix deprecation warnings
Implementation as suggested in GTK documentation.
-rw-r--r--src/eog-properties-dialog.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/eog-properties-dialog.c b/src/eog-properties-dialog.c
index 44af0158..2e1c176d 100644
--- a/src/eog-properties-dialog.c
+++ b/src/eog-properties-dialog.c
@@ -447,16 +447,22 @@ eog_properties_dialog_set_netbook_mode (EogPropertiesDialog *dlg,
#ifdef HAVE_METADATA
if (enable) {
- gtk_widget_reparent (priv->metadata_details_sw,
- priv->metadata_details_box);
+ g_object_ref (priv->metadata_details_sw);
+ gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (priv->metadata_details_sw)),
+ priv->metadata_details_sw);
+ gtk_container_add (GTK_CONTAINER (priv->metadata_details_box), priv->metadata_details_sw);
+ g_object_unref (priv->metadata_details_sw);
// Only show details box if metadata is being displayed
if (gtk_widget_get_visible (priv->metadata_box))
gtk_widget_show_all (priv->metadata_details_box);
gtk_widget_hide (priv->metadata_details_expander);
} else {
- gtk_widget_reparent (priv->metadata_details_sw,
- priv->metadata_details_expander);
+ g_object_ref (priv->metadata_details_sw);
+ gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (priv->metadata_details_sw)),
+ priv->metadata_details_sw);
+ gtk_container_add (GTK_CONTAINER (priv->metadata_details_expander), priv->metadata_details_sw);
+ g_object_unref (priv->metadata_details_sw);
gtk_widget_show_all (priv->metadata_details_expander);
if (gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook)) == EOG_PROPERTIES_DIALOG_PAGE_DETAILS)