df5243869d
Resolves: #1133549
49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
From fbd0a76180633c7d50be01ea69ad734749db18a8 Mon Sep 17 00:00:00 2001
|
|
From: Jakub Filak <jfilak@redhat.com>
|
|
Date: Thu, 28 Aug 2014 09:38:16 +0200
|
|
Subject: [PATCH 29/33] gui: fix build with older gtk
|
|
|
|
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
---
|
|
src/gtk-helpers/problem_details_widget.c | 15 ++++++++++++---
|
|
1 file changed, 12 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/gtk-helpers/problem_details_widget.c b/src/gtk-helpers/problem_details_widget.c
|
|
index 2cb3206..c314d4d 100644
|
|
--- a/src/gtk-helpers/problem_details_widget.c
|
|
+++ b/src/gtk-helpers/problem_details_widget.c
|
|
@@ -110,8 +110,6 @@ problem_details_widget_add_single_line(ProblemDetailsWidget *self, const char *n
|
|
GtkWidget *label = gtk_label_new(name);
|
|
gtk_widget_set_halign(label, GTK_ALIGN_START);
|
|
gtk_widget_set_valign(label, GTK_ALIGN_START);
|
|
- gtk_widget_set_margin_start(label, 20);
|
|
- gtk_widget_set_margin_end(label, 20);
|
|
|
|
GtkWidget *value = gtk_label_new(content);
|
|
gtk_label_set_selectable(GTK_LABEL(value), TRUE);
|
|
@@ -119,9 +117,20 @@ problem_details_widget_add_single_line(ProblemDetailsWidget *self, const char *n
|
|
gtk_label_set_line_wrap_mode(GTK_LABEL(value), GTK_WRAP_WORD);
|
|
gtk_widget_set_halign(value, GTK_ALIGN_START);
|
|
gtk_widget_set_hexpand(value, TRUE);
|
|
- gtk_widget_set_margin_start(value, 5);
|
|
gtk_widget_override_font(GTK_WIDGET(value), self->priv->font);
|
|
|
|
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 11) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 11 && GTK_MICRO_VERSION < 2))
|
|
+ gtk_widget_set_margin_left(label, 20);
|
|
+ gtk_widget_set_margin_right(label, 20);
|
|
+
|
|
+ gtk_widget_set_margin_left(value, 5);
|
|
+#else
|
|
+ gtk_widget_set_margin_start(label, 20);
|
|
+ gtk_widget_set_margin_end(label, 20);
|
|
+
|
|
+ gtk_widget_set_margin_start(value, 5);
|
|
+#endif
|
|
+
|
|
const gulong row = problem_details_widget_append_row(self);
|
|
|
|
gtk_grid_attach(GTK_GRID(self), label, 0, row, 1, 1);
|
|
--
|
|
2.1.0
|
|
|