[eog/wip/emmanuel/lasem: 3/5] EogPropertiesDialog: fix deprecation warnings
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog/wip/emmanuel/lasem: 3/5] EogPropertiesDialog: fix deprecation warnings
- Date: Wed, 26 Aug 2015 00:20:38 +0000 (UTC)
commit 131d8547aa50ca5973345dec1372f351aebd70a2
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Wed Aug 26 01:12:35 2015 +0200
EogPropertiesDialog: fix deprecation warnings
Implementation as suggested in GTK documentation.
src/eog-properties-dialog.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/eog-properties-dialog.c b/src/eog-properties-dialog.c
index 44af015..2e1c176 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]