From 4f468492682212eeff91a4d7e35e868820d05c9b Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 10 Jun 2014 10:39:19 +0200
Subject: [ABRT PATCH 5/5] replace deprecated GTK3 functions
Closes rhbz#1105940
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/configuration-gui/abrt-config-widget.c | 7 +++++++
src/configuration-gui/system-config-abrt.c | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/src/configuration-gui/abrt-config-widget.c b/src/configuration-gui/abrt-config-widget.c
index 45eac95..664180d 100644
--- a/src/configuration-gui/abrt-config-widget.c
+++ b/src/configuration-gui/abrt-config-widget.c
@@ -280,7 +280,14 @@ abrt_config_widget_init(AbrtConfigWidget *self)
connect_switch_with_option(self, ABRT_OPT_SILENT_SHORTENED_REPORTING, "switch_silent_shortened_reporting");
connect_switch_with_option(self, ABRT_OPT_NOTIFY_INCOMPLETE_PROBLEMS, "switch_notify_incomplete_problems");
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION == 1))
+ /* https://developer.gnome.org/gtk3/3.13/GtkWidget.html#gtk-widget-reparent */
+ /* gtk_widget_reparent has been deprecated since version 3.13.2 and should not be used in newly-written code. */
gtk_widget_reparent(WID("grid"), GTK_WIDGET(self));
+#else
+ gtk_container_remove(GTK_CONTAINER(WID("window1")), WID("grid"));
+ gtk_container_add(GTK_CONTAINER(self), WID("grid"));
+#endif
/* Set the initial state of the properties */
gtk_widget_show_all(GTK_WIDGET(self));
diff --git a/src/configuration-gui/system-config-abrt.c b/src/configuration-gui/system-config-abrt.c
index bd9f13f..b3bf1b0 100644
--- a/src/configuration-gui/system-config-abrt.c
+++ b/src/configuration-gui/system-config-abrt.c
@@ -53,9 +53,13 @@ GtkWidget *system_config_abrt_widget_new_with_close_button(system_config_abrt_wi
gtk_widget_set_visible(GTK_WIDGET(config), TRUE);
gtk_box_pack_start(box, GTK_WIDGET(config), /*expand*/TRUE, /*fill*/TRUE, /*padding*/0);
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION == 1))
+ /* https://developer.gnome.org/gtk3/3.13/GtkAlignment.html#gtk-alignment-new */
+ /* GtkAlignment has been deprecated. Use GtkWidget alignment and margin properties */
gtk_box_pack_start(GTK_BOX(box),
gtk_alignment_new(/*xalign*/.5, /*yalign*/.5, /*xscale*/.5, /*yscale*/.5),
/*expand*/TRUE, /*fill*/TRUE, /*padding*/0);
+#endif
GtkWidget *buttons = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, /*spacing*/0);
gtk_box_pack_start(GTK_BOX(box), buttons, /*expand*/TRUE, /*fill*/FALSE, /*padding*/0);
--
1.8.3.1