diff options
author | Emmanuel Pacaud <[email protected]> | 2015-08-26 01:12:35 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-04-26 22:48:01 +0200 |
commit | e1ff4da51bba3ba2f5ccb51782492bf67ee3d005 (patch) | |
tree | 52371cfbf4abf64ba7dddc8aa9094c8090f2af2c /src/eom-properties-dialog.c | |
parent | eea008f2a5c6f86b538d725a02d982ee85c9b5f9 (diff) | |
download | eom-e1ff4da51bba3ba2f5ccb51782492bf67ee3d005.tar.bz2 eom-e1ff4da51bba3ba2f5ccb51782492bf67ee3d005.tar.xz |
EomPropertiesDialog: Fix deprecation warnings
Implementation as suggested in the GTK+ documentation.
taken from:
https://git.gnome.org/browse/eog/commit/?id=a57e788
Diffstat (limited to 'src/eom-properties-dialog.c')
-rw-r--r-- | src/eom-properties-dialog.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/eom-properties-dialog.c b/src/eom-properties-dialog.c index 0214fa8..1c6b958 100644 --- a/src/eom-properties-dialog.c +++ b/src/eom-properties-dialog.c @@ -531,16 +531,22 @@ eom_properties_dialog_set_netbook_mode (EomPropertiesDialog *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->exif_box)) gtk_widget_show_all (priv->metadata_details_box); gtk_widget_hide (priv->exif_details_expander); } else { - gtk_widget_reparent (priv->metadata_details_sw, - priv->exif_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->exif_details_expander), priv->metadata_details_sw); + g_object_unref (priv->metadata_details_sw); gtk_widget_show_all (priv->exif_details_expander); if (gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook)) == EOM_PROPERTIES_DIALOG_PAGE_DETAILS) |