Blame SOURCES/0257-wizard-remove-old-gtk-conditionals.patch

b12e4c
From 3b44933af0a94bbef90d4a980011bfd624d6ebd9 Mon Sep 17 00:00:00 2001
b12e4c
From: Martin Kutlak <mkutlak@redhat.com>
b12e4c
Date: Thu, 8 Jun 2017 12:46:43 +0200
b12e4c
Subject: [PATCH] wizard: remove old gtk conditionals
b12e4c
b12e4c
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
b12e4c
---
b12e4c
 src/gui-wizard-gtk/wizard.c | 22 +++-------------------
b12e4c
 1 file changed, 3 insertions(+), 19 deletions(-)
b12e4c
b12e4c
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
b12e4c
index e19f790..c5b0b7f 100644
b12e4c
--- a/src/gui-wizard-gtk/wizard.c
b12e4c
+++ b/src/gui-wizard-gtk/wizard.c
b12e4c
@@ -341,25 +341,15 @@ static void wrap_fixer(GtkWidget *widget, gpointer data_unused)
b12e4c
     {
b12e4c
         GtkLabel *label = (GtkLabel*)widget;
b12e4c
         //const char *txt = gtk_label_get_label(label);
b12e4c
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
b12e4c
-        GtkMisc *misc = (GtkMisc*)widget;
b12e4c
-        gfloat yalign; // = 111;
b12e4c
-        gint ypad; // = 111;
b12e4c
         if (gtk_label_get_line_wrap(label)
b12e4c
-         && (gtk_misc_get_alignment(misc, NULL, &yalign), yalign == 0)
b12e4c
-         && (gtk_misc_get_padding(misc, NULL, &ypad), ypad == 0)
b12e4c
-#else
b12e4c
-        if (gtk_label_get_line_wrap(label)
b12e4c
-         && (gtk_widget_get_halign(widget) == GTK_ALIGN_START)
b12e4c
-         && (gtk_widget_get_margin_top(widget) == 0)
b12e4c
-         && (gtk_widget_get_margin_bottom(widget) == 0)
b12e4c
-#endif
b12e4c
+          && (gtk_widget_get_halign(widget) == GTK_ALIGN_START)
b12e4c
+          && (gtk_widget_get_margin_top(widget) == 0)
b12e4c
+          && (gtk_widget_get_margin_bottom(widget) == 0)
b12e4c
         ) {
b12e4c
             //log("label '%s' set to autowrap", txt);
b12e4c
             make_label_autowrap_on_resize(label);
b12e4c
             return;
b12e4c
         }
b12e4c
-        //log("label '%s' not set to autowrap %g %d", txt, yalign, ypad);
b12e4c
     }
b12e4c
 }
b12e4c
 
b12e4c
@@ -869,14 +859,8 @@ static void tv_details_row_activated(
b12e4c
         gtk_widget_set_size_request(scrolled, 640, 480);
b12e4c
         gtk_widget_show(scrolled);
b12e4c
 
b12e4c
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 7) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 7 && GTK_MICRO_VERSION < 8))
b12e4c
-        /* http://developer.gnome.org/gtk3/unstable/GtkScrolledWindow.html#gtk-scrolled-window-add-with-viewport */
b12e4c
-        /* gtk_scrolled_window_add_with_viewport has been deprecated since version 3.8 and should not be used in newly-written code. */
b12e4c
-        gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), textview);
b12e4c
-#else
b12e4c
         /* gtk_container_add() will now automatically add a GtkViewport if the child doesn't implement GtkScrollable. */
b12e4c
         gtk_container_add(GTK_CONTAINER(scrolled), textview);
b12e4c
-#endif
b12e4c
 
b12e4c
         gtk_widget_show(textview);
b12e4c
 
b12e4c
-- 
b12e4c
2.21.0
b12e4c