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