[balsa] Define constants for margins



commit b90f97271ba86f84d2e3e6e77b2eae6075ef6c2f
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Jan 5 08:41:39 2010 -0500

    Define constants for margins

 ChangeLog                    |    5 +++++
 src/balsa-mime-widget-text.c |   11 ++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5984dcc..cb4eef3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-05  Peter Bloomfield
+
+	* src/balsa-mime-widget-text.c (balsa_mime_widget_new_text),
+	(quote_tag): define constants for margins.
+
 2010-01-04  Peter Bloomfield
 
 	* libbalsa/misc.c (libbalsa_create_entry): use
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index 8ff5729..75e8fd4 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -123,6 +123,9 @@ static gboolean draw_cite_bars(GtkWidget * widget, GdkEventExpose *event, GList
 #define BALSA_MIME_WIDGET_NEW_TEXT_NOTIFIED \
     "balsa-mime-widget-text-new-notified"
 
+#define BALSA_LEFT_MARGIN   2
+#define BALSA_RIGHT_MARGIN 15
+
 BalsaMimeWidget *
 balsa_mime_widget_new_text(BalsaMessage * bm, LibBalsaMessageBody * mime_body,
 			   const gchar * content_type, gpointer data)
@@ -228,8 +231,8 @@ balsa_mime_widget_new_text(BalsaMessage * bm, LibBalsaMessageBody * mime_body,
 	libbalsa_wrap_string(ptr, balsa_app.browse_wrap_length);
 
     gtk_text_view_set_editable(GTK_TEXT_VIEW(mw->widget), FALSE);
-    gtk_text_view_set_left_margin(GTK_TEXT_VIEW(mw->widget), 2);
-    gtk_text_view_set_right_margin(GTK_TEXT_VIEW(mw->widget), 15);
+    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);
     gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(mw->widget), GTK_WRAP_WORD_CHAR);
 
     /* set the message font */
@@ -527,7 +530,9 @@ quote_tag(GtkTextBuffer * buffer, gint level, gint margin)
             tag =
                 gtk_text_buffer_create_tag(buffer, name, "foreground-gdk",
                                            &balsa_app.quoted_color[q_level],
-					   "left-margin", 2 + margin * level,
+					   "left-margin",
+                                           BALSA_LEFT_MARGIN
+                                           + margin * level,
                                            NULL);
             /* Set a low priority, so we can set both quote color and
              * URL color, and URL color will take precedence. */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]