[evolution-patches] gtkhtml: save body margins
- From: Radek Doulík <rodo ximian com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>
- Subject: [evolution-patches] gtkhtml: save body margins
- Date: Thu, 31 Jul 2003 22:25:37 +0200
we don't have editor UI to change margins, but perforated paper template
changes them so we have to save them. otherwise I kept it only in trunk
CVS
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.1849
diff -u -p -r1.1849 ChangeLog
--- ChangeLog 31 Jul 2003 17:55:45 -0000 1.1849
+++ ChangeLog 31 Jul 2003 20:21:22 -0000
@@ -1,5 +1,7 @@
2003-07-31 Radek Doulik <rodo ximian com>
+ * htmlengine-save.c (get_body): save margins
+
* gtkhtml.c (new_obj_from_uri): use strcasecmp instead of strcmp
for image extensions
added .svg[z] for Jakub
Index: htmlengine-save.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine-save.c,v
retrieving revision 1.47
diff -u -p -r1.47 htmlengine-save.c
--- htmlengine-save.c 8 Apr 2003 13:35:48 -0000 1.47
+++ htmlengine-save.c 31 Jul 2003 20:21:22 -0000
@@ -214,6 +214,7 @@ get_body (HTMLEngine *e)
gchar *bg;
gchar *bg_image;
gchar *link;
+ gchar *margins, *lm, *rm, *tm, *bm;
gchar *url = NULL;
cset = e->settings->color_set;
@@ -226,8 +227,17 @@ get_body (HTMLEngine *e)
: g_strdup ("");
g_free (url);
- body = g_strconcat ("<BODY", text, link, bg, bg_image, ">\n", NULL);
+ lm = e->leftBorder != LEFT_BORDER ? g_strdup_printf (" LEFTMARGIN=\"%d\"", e->leftBorder) : g_strdup ("");
+ rm = e->rightBorder != RIGHT_BORDER ? g_strdup_printf (" RIGHTMARGIN=\"%d\"", e->rightBorder) : g_strdup ("");
+ tm = e->topBorder != TOP_BORDER ? g_strdup_printf (" TOPMARGIN=\"%d\"", e->topBorder) : g_strdup ("");
+ bm = e->bottomBorder != BOTTOM_BORDER ? g_strdup_printf (" BOTTOMMARGIN=\"%d\"", e->bottomBorder) : g_strdup ("");
+ body = g_strconcat ("<BODY", text, link, bg, bg_image, lm, rm, tm, bm, ">\n", NULL);
+
+ g_free (lm);
+ g_free (rm);
+ g_free (tm);
+ g_free (bm);
g_free (text);
g_free (link);
g_free (bg);
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]