[eog] EogPropertiesDialog: fix deprecation warnings
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogPropertiesDialog: fix deprecation warnings
- Date: Fri, 28 Aug 2015 20:08:59 +0000 (UTC)
commit a57e788b7ec85cbb9021bbf152c219be2e254ec0
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]