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

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