[balsa/wip/gmime3] Work around MR gtk!236
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gmime3] Work around MR gtk!236
- Date: Wed, 18 Jul 2018 14:44:26 +0000 (UTC)
commit 651c6212cbb3b6e9d437d20cfc49f3e76c67cc14
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Jul 18 10:36:32 2018 -0400
Work around MR gtk!236
See issues balsa#2, balsa#3, and gtk#628
* src/balsa-mime-widget-text.c (balsa_mime_widget_new_text): use
GtkWidget margins instead of GtkTextView margins, to make the
window shrinkable and to avoid button creep;
* src/sendmsg-window.c (create_text_area): ditto, to make the
window shrinkable (does not fix the problem when GtkSourceView
is used).
ChangeLog | 11 +++++++++++
src/balsa-mime-widget-text.c | 5 +++++
src/sendmsg-window.c | 5 +++++
3 files changed, 21 insertions(+)
---
diff --git a/ChangeLog b/ChangeLog
index f56235f0f..c148fec5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2018-07-18 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Work around MR gtk!236
+
+ * src/balsa-mime-widget-text.c (balsa_mime_widget_new_text): use
+ GtkWidget margins instead of GtkTextView margins, to make the
+ window shrinkable and to avoid button creep;
+ * src/sendmsg-window.c (create_text_area): ditto, to make the
+ window shrinkable (does not fix the problem when GtkSourceView
+ is used).
+
2018-07-07 Albrecht Dreß <albrecht dress arcor de>
Fix HTML rendering with webkit2gtk-4.0 < 2.20
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index a4f6d78ff..dc2140a56 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -179,8 +179,13 @@ balsa_mime_widget_new_text(BalsaMessage * bm, LibBalsaMessageBody * mime_body,
/* configure text or source view */
gtk_text_view_set_editable(GTK_TEXT_VIEW(mw->widget), FALSE);
+#if GTK_MR_236_IS_MERGED
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(mw->widget), BALSA_LEFT_MARGIN);
gtk_text_view_set_right_margin(GTK_TEXT_VIEW(mw->widget), BALSA_RIGHT_MARGIN);
+#else /* GTK_MR_236_IS_MERGED */
+ gtk_widget_set_margin_start(mw->widget, BALSA_LEFT_MARGIN);
+ gtk_widget_set_margin_end(mw->widget, BALSA_RIGHT_MARGIN);
+#endif /* GTK_MR_236_IS_MERGED */
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(mw->widget), GTK_WRAP_WORD_CHAR);
/* set the message font */
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 615195159..2e0858f8e 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -2874,8 +2874,13 @@ create_text_area(BalsaSendmsg * bsmsg)
bsmsg->text = gtk_text_view_new();
#endif /* HAVE_GTKSOURCEVIEW */
text_view = GTK_TEXT_VIEW(bsmsg->text);
+#if GTK_MR_236_IS_MERGED
gtk_text_view_set_left_margin(text_view, 2);
gtk_text_view_set_right_margin(text_view, 2);
+#else /* GTK_MR_236_IS_MERGED */
+ gtk_widget_set_margin_start(bsmsg->text, 2);
+ gtk_widget_set_margin_end(bsmsg->text, 2);
+#endif /* GTK_MR_236_IS_MERGED */
/* set the message font */
if (!balsa_app.use_system_fonts) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]