Blob Blame History Raw
From 3044935737969685671e82eb36831cccc8a311b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C4=9Bj=20Kudera?= <matejkudera1@seznam.cz>
Date: Tue, 23 May 2017 14:22:35 +0200
Subject: [PATCH] Replacing 'gtk_alignment_new'

Removing if command which handled old versions of dtk-3 because old versions of dtk-3 are now used nowhere.
Replaced with gtk_box_pack_end and gtk_widget_set_valign.
---
 src/gtk-helpers/config_dialog.c |  6 ------
 src/gui-wizard-gtk/wizard.c     | 18 +-----------------
 2 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/src/gtk-helpers/config_dialog.c b/src/gtk-helpers/config_dialog.c
index 834ad95..1ad440b 100644
--- a/src/gtk-helpers/config_dialog.c
+++ b/src/gtk-helpers/config_dialog.c
@@ -368,13 +368,7 @@ GtkWindow *create_config_list_window(GHashTable *configs, GtkWindow *parent)
     g_signal_connect(close_btn, "clicked", (GCallback)on_close_cb, window);
 
     gtk_box_pack_start(GTK_BOX(btn_box), close_btn, 0, 0, 5);
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
-    GtkWidget *align = gtk_alignment_new(0, 0, 0, 0);
-    gtk_box_pack_start(GTK_BOX(btn_box), align, true, true, 5);
-    gtk_box_pack_start(GTK_BOX(btn_box), configure_btn, 0, 0, 5);
-#else
     gtk_box_pack_end(GTK_BOX(btn_box), configure_btn, 0, 0, 5);
-#endif
 
 
     gtk_box_pack_start(GTK_BOX(main_vbox), btn_box, 0, 0, 0);
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 8ca96eb..0845b4c 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -3761,14 +3761,9 @@ void create_assistant(GtkApplication *app, bool expert_mode)
     gtk_box_pack_start(g_box_buttons, g_btn_onfail, false, false, 5);
     gtk_box_pack_start(g_box_buttons, g_btn_repeat, false, false, 5);
     /* Btns above are to the left, the rest are to the right: */
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
-    GtkWidget *w = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
-    gtk_box_pack_start(g_box_buttons, w, true, true, 5);
-    gtk_box_pack_start(g_box_buttons, g_btn_next, false, false, 5);
-#else
+
     gtk_widget_set_valign(GTK_WIDGET(g_btn_next), GTK_ALIGN_END);
     gtk_box_pack_end(g_box_buttons, g_btn_next, false, false, 5);
-#endif
 
     {   /* Warnings area widget definition start */
         g_box_warning_labels = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL, 0));
@@ -3785,23 +3780,12 @@ void create_assistant(GtkApplication *app, bool expert_mode)
         gtk_widget_set_visible(g_widget_warnings_area, FALSE);
         gtk_widget_set_no_show_all(g_widget_warnings_area, TRUE);
 
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
-        GtkWidget *alignment_left = gtk_alignment_new(0.5,0.5,1,1);
-        gtk_widget_set_visible(alignment_left, TRUE);
-        gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), alignment_left, true, false, 0);
-#else
         gtk_widget_set_valign(GTK_WIDGET(image), GTK_ALIGN_CENTER);
         gtk_widget_set_valign(GTK_WIDGET(vbox), GTK_ALIGN_CENTER);
-#endif
 
         gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), image, false, false, 5);
         gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), GTK_WIDGET(vbox), false, false, 0);
 
-#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
-        GtkWidget *alignment_right = gtk_alignment_new(0.5,0.5,1,1);
-        gtk_widget_set_visible(alignment_right, TRUE);
-        gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), alignment_right, true, false, 0);
-#endif
     }   /* Warnings area widget definition end */
 
     g_box_assistant = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL, 0));
-- 
2.21.0