Blame SOURCES/0253-Replacing-gtk_alignment_new.patch

b12e4c
From 3044935737969685671e82eb36831cccc8a311b0 Mon Sep 17 00:00:00 2001
b12e4c
From: =?UTF-8?q?Mat=C4=9Bj=20Kudera?= <matejkudera1@seznam.cz>
b12e4c
Date: Tue, 23 May 2017 14:22:35 +0200
b12e4c
Subject: [PATCH] Replacing 'gtk_alignment_new'
b12e4c
b12e4c
Removing if command which handled old versions of dtk-3 because old versions of dtk-3 are now used nowhere.
b12e4c
Replaced with gtk_box_pack_end and gtk_widget_set_valign.
b12e4c
---
b12e4c
 src/gtk-helpers/config_dialog.c |  6 ------
b12e4c
 src/gui-wizard-gtk/wizard.c     | 18 +-----------------
b12e4c
 2 files changed, 1 insertion(+), 23 deletions(-)
b12e4c
b12e4c
diff --git a/src/gtk-helpers/config_dialog.c b/src/gtk-helpers/config_dialog.c
b12e4c
index 834ad95..1ad440b 100644
b12e4c
--- a/src/gtk-helpers/config_dialog.c
b12e4c
+++ b/src/gtk-helpers/config_dialog.c
b12e4c
@@ -368,13 +368,7 @@ GtkWindow *create_config_list_window(GHashTable *configs, GtkWindow *parent)
b12e4c
     g_signal_connect(close_btn, "clicked", (GCallback)on_close_cb, window);
b12e4c
 
b12e4c
     gtk_box_pack_start(GTK_BOX(btn_box), close_btn, 0, 0, 5);
b12e4c
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
b12e4c
-    GtkWidget *align = gtk_alignment_new(0, 0, 0, 0);
b12e4c
-    gtk_box_pack_start(GTK_BOX(btn_box), align, true, true, 5);
b12e4c
-    gtk_box_pack_start(GTK_BOX(btn_box), configure_btn, 0, 0, 5);
b12e4c
-#else
b12e4c
     gtk_box_pack_end(GTK_BOX(btn_box), configure_btn, 0, 0, 5);
b12e4c
-#endif
b12e4c
 
b12e4c
 
b12e4c
     gtk_box_pack_start(GTK_BOX(main_vbox), btn_box, 0, 0, 0);
b12e4c
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
b12e4c
index 8ca96eb..0845b4c 100644
b12e4c
--- a/src/gui-wizard-gtk/wizard.c
b12e4c
+++ b/src/gui-wizard-gtk/wizard.c
b12e4c
@@ -3761,14 +3761,9 @@ void create_assistant(GtkApplication *app, bool expert_mode)
b12e4c
     gtk_box_pack_start(g_box_buttons, g_btn_onfail, false, false, 5);
b12e4c
     gtk_box_pack_start(g_box_buttons, g_btn_repeat, false, false, 5);
b12e4c
     /* Btns above are to the left, the rest are to the right: */
b12e4c
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
b12e4c
-    GtkWidget *w = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
b12e4c
-    gtk_box_pack_start(g_box_buttons, w, true, true, 5);
b12e4c
-    gtk_box_pack_start(g_box_buttons, g_btn_next, false, false, 5);
b12e4c
-#else
b12e4c
+
b12e4c
     gtk_widget_set_valign(GTK_WIDGET(g_btn_next), GTK_ALIGN_END);
b12e4c
     gtk_box_pack_end(g_box_buttons, g_btn_next, false, false, 5);
b12e4c
-#endif
b12e4c
 
b12e4c
     {   /* Warnings area widget definition start */
b12e4c
         g_box_warning_labels = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL, 0));
b12e4c
@@ -3785,23 +3780,12 @@ void create_assistant(GtkApplication *app, bool expert_mode)
b12e4c
         gtk_widget_set_visible(g_widget_warnings_area, FALSE);
b12e4c
         gtk_widget_set_no_show_all(g_widget_warnings_area, TRUE);
b12e4c
 
b12e4c
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
b12e4c
-        GtkWidget *alignment_left = gtk_alignment_new(0.5,0.5,1,1);
b12e4c
-        gtk_widget_set_visible(alignment_left, TRUE);
b12e4c
-        gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), alignment_left, true, false, 0);
b12e4c
-#else
b12e4c
         gtk_widget_set_valign(GTK_WIDGET(image), GTK_ALIGN_CENTER);
b12e4c
         gtk_widget_set_valign(GTK_WIDGET(vbox), GTK_ALIGN_CENTER);
b12e4c
-#endif
b12e4c
 
b12e4c
         gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), image, false, false, 5);
b12e4c
         gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), GTK_WIDGET(vbox), false, false, 0);
b12e4c
 
b12e4c
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
b12e4c
-        GtkWidget *alignment_right = gtk_alignment_new(0.5,0.5,1,1);
b12e4c
-        gtk_widget_set_visible(alignment_right, TRUE);
b12e4c
-        gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), alignment_right, true, false, 0);
b12e4c
-#endif
b12e4c
     }   /* Warnings area widget definition end */
b12e4c
 
b12e4c
     g_box_assistant = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL, 0));
b12e4c
-- 
b12e4c
2.21.0
b12e4c