[gtkhtml] Bug 605335 - Alignment of horizontal rules is not saved
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Bug 605335 - Alignment of horizontal rules is not saved
- Date: Fri, 13 Aug 2010 18:11:41 +0000 (UTC)
commit b4913616477f4b9137620c6bf0670b61aac416a7
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Aug 13 14:10:17 2010 -0400
Bug 605335 - Alignment of horizontal rules is not saved
gtkhtml/htmlrule.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtkhtml/htmlrule.c b/gtkhtml/htmlrule.c
index e86087e..4ccfe5d 100644
--- a/gtkhtml/htmlrule.c
+++ b/gtkhtml/htmlrule.c
@@ -26,6 +26,7 @@
#include "htmlcolor.h"
#include "htmlcolorset.h"
#include "htmlengine-save.h"
+#include "htmlenumutils.h"
#include "htmlrule.h"
#include "htmlpainter.h"
#include "htmlsettings.h"
@@ -208,6 +209,7 @@ save (HTMLObject *self,
{
gchar *size;
const gchar *shade;
+ gchar *align;
gchar *length;
gboolean rv;
@@ -216,13 +218,13 @@ save (HTMLObject *self,
length = HTML_RULE (self)->length
? g_strdup_printf (" LENGTH=\"%d\"", HTML_RULE (self)->length)
: (self->percent > 0 && self->percent != 100 ? g_strdup_printf (" LENGTH=\"%d%%\"", self->percent) : g_strdup (""));
+ align = g_strdup_printf (" ALIGN=\"%s\"", html_halign_name (HTML_RULE (self)->halign));
- rv = html_engine_save_output_string (state, "\n<HR%s%s%s>\n", shade, size, length);
+ rv = html_engine_save_output_string (state, "\n<HR%s%s%s%s>\n", shade, size, length, align);
- if (*size)
- g_free (size);
- if (*length)
- g_free (length);
+ g_free (align);
+ g_free (length);
+ g_free (size);
return rv;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]