[gtkhtml] Remove trailing whitespace.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtkhtml] Remove trailing whitespace.
- Date: Wed, 27 May 2009 08:22:17 -0400 (EDT)
commit ca6bf596905ba44174593470490404a5f9976849
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed May 27 08:22:00 2009 -0400
Remove trailing whitespace.
---
components/editor/gtkhtml-color-combo.c | 4 +-
components/editor/gtkhtml-editor.c | 2 +-
gtkhtml/gtkhtml.c | 8 ++--
gtkhtml/htmlembedded.c | 2 +-
gtkhtml/htmlengine-edit-cut-and-paste.c | 2 +-
gtkhtml/htmlengine.c | 38 ++++++++++----------
gtkhtml/htmlform.c | 4 +-
gtkhtml/htmlframe.c | 2 +-
gtkhtml/htmliframe.c | 2 +-
gtkhtml/htmltokenizer.c | 60 +++++++++++++++---------------
gtkhtml/htmltokenizer.h | 6 ++--
gtkhtml/testgtkhtml.c | 6 ++--
12 files changed, 68 insertions(+), 68 deletions(-)
diff --git a/components/editor/gtkhtml-color-combo.c b/components/editor/gtkhtml-color-combo.c
index 11d772b..7404633 100644
--- a/components/editor/gtkhtml-color-combo.c
+++ b/components/editor/gtkhtml-color-combo.c
@@ -376,7 +376,7 @@ color_combo_swatch_release_event_cb (GtkhtmlColorCombo *combo,
return FALSE;
}
-
+
static void
color_combo_toggled_cb (GtkhtmlColorCombo *combo)
@@ -892,7 +892,7 @@ color_combo_init (GtkhtmlColorCombo *combo)
/* Build the pop-up window. */
window = gtk_window_new (GTK_WINDOW_POPUP);
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (combo));
+ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (combo));
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
gtk_window_set_type_hint (
GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_COMBO);
diff --git a/components/editor/gtkhtml-editor.c b/components/editor/gtkhtml-editor.c
index e672367..970a4d3 100644
--- a/components/editor/gtkhtml-editor.c
+++ b/components/editor/gtkhtml-editor.c
@@ -1608,7 +1608,7 @@ gtkhtml_editor_insert_image (GtkhtmlEditor *editor,
if (html) {
HTMLObject *image;
-
+
image = html_image_new (
html_engine_get_image_factory (html->engine), filename_uri,
NULL, NULL, 0, 0, 0, 0, 0, NULL, HTML_VALIGN_NONE, FALSE);
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 7df776d..41da855 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -3668,7 +3668,7 @@ gtk_html_begin_full (GtkHTML *html,
/* Enable change content type in engine */
if (flags & GTK_HTML_BEGIN_CHANGECONTENTTYPE)
- gtk_html_set_default_engine(html, TRUE);
+ gtk_html_set_default_engine(html, TRUE);
return handle;
}
@@ -4666,13 +4666,13 @@ gtk_html_get_default_engine(GtkHTML *html)
void
gtk_html_set_default_content_type (GtkHTML *html, const gchar *content_type)
-{
+{
html_engine_set_content_type( html->engine, content_type);
}
const gchar*
gtk_html_get_default_content_type (GtkHTML *html)
-{
+{
return html_engine_get_content_type( html->engine);
}
@@ -6085,7 +6085,7 @@ reparent_embedded (HTMLObject *o, HTMLEngine *e, gpointer data)
GTK_HTML (GTK_HTML (HTML_FRAME (o)->html)->iframe_parent)->iframe_parent == NULL)
gtk_html_set_iframe_parent (GTK_HTML (HTML_FRAME (o)->html), data, o);
- if (HTML_IS_FRAMESET (o) && HTML_FRAMESET (o)->parent &&
+ if (HTML_IS_FRAMESET (o) && HTML_FRAMESET (o)->parent &&
HTML_FRAMESET (o)->parent->iframe_parent == NULL) {
HTML_FRAMESET (o)->parent = data;
}
diff --git a/gtkhtml/htmlembedded.c b/gtkhtml/htmlembedded.c
index f5b57e2..7de03a7 100644
--- a/gtkhtml/htmlembedded.c
+++ b/gtkhtml/htmlembedded.c
@@ -241,7 +241,7 @@ html_embedded_encode_string (const gchar *before, const gchar *codepage)
GString *encoded = g_string_new ("");
gchar buffer[5], *ptr;
guchar c;
-
+
GIConv iconv_cd = generate_iconv_to (codepage);
if( is_valid_g_iconv (iconv_cd))
{
diff --git a/gtkhtml/htmlengine-edit-cut-and-paste.c b/gtkhtml/htmlengine-edit-cut-and-paste.c
index 3cf8318..faf456a 100644
--- a/gtkhtml/htmlengine-edit-cut-and-paste.c
+++ b/gtkhtml/htmlengine-edit-cut-and-paste.c
@@ -1903,7 +1903,7 @@ html_engine_delete (HTMLEngine *e)
} while (prev && prev->parent->next && (cur = html_object_head (prev->parent->next)));
if (prev) {
- /* cluev end is in the selection. Lets handle this case just like simple delete
+ /* cluev end is in the selection. Lets handle this case just like simple delete
since text is the selection itself*/
if (e->mark)
html_cursor_destroy (e->mark);
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index 32f115c..dfbef05 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -418,7 +418,7 @@ push_element (HTMLEngine *e, const char *name, const char *class, HTMLStyle *sty
HTMLElement *element;
g_return_if_fail (HTML_IS_ENGINE (e));
-
+
element = html_element_new (e, name);
element->style = html_style_set_display (style, DISPLAY_INLINE);
html_stack_push (e->span_stack, element);
@@ -430,7 +430,7 @@ static HTMLColor *
current_color (HTMLEngine *e) {
HTMLElement *span;
GList *item;
-
+
g_return_val_if_fail( HTML_IS_ENGINE(e), NULL );
for (item = e->span_stack->list; item; item = item->next) {
@@ -982,7 +982,7 @@ static void
html_element_push (HTMLElement *node, HTMLEngine *e, HTMLObject *clue)
{
HTMLObject *block_clue;
-
+
g_return_if_fail (HTML_IS_ENGINE (e));
switch (node->style->display) {
@@ -1081,7 +1081,7 @@ static void
pop_block (HTMLEngine *e, HTMLElement *elem)
{
GList *l;
-
+
g_return_if_fail (HTML_IS_ENGINE (e));
l = e->span_stack->list;
@@ -1105,7 +1105,7 @@ pop_inline (HTMLEngine *e, HTMLElement *elem)
GList *l;
g_return_if_fail (HTML_IS_ENGINE (e));
-
+
l = e->span_stack->list;
while (l) {
HTMLElement *cur = l->data;
@@ -2796,14 +2796,14 @@ html_engine_get_engine_type( HTMLEngine *e)
return html_tokenizer_get_engine_type(e->ht);
}
-void
+void
html_engine_set_content_type(HTMLEngine *e, const gchar* content_type)
{
g_return_if_fail (HTML_IS_ENGINE (e));
html_tokenizer_change_content_type(e->ht, content_type);
}
-const gchar *
+const gchar *
html_engine_get_content_type(HTMLEngine *e)
{
g_return_val_if_fail (HTML_IS_ENGINE (e), NULL);
@@ -2830,7 +2830,7 @@ element_parse_meta (HTMLEngine *e, HTMLObject *clue, const gchar *str)
contenttype = 1;
} else if (g_ascii_strncasecmp(token, "content=", 8) == 0) {
const gchar *content;
- content = token + 8;
+ content = token + 8;
if(contenttype)
{
contenttype = 0;
@@ -2838,7 +2838,7 @@ element_parse_meta (HTMLEngine *e, HTMLObject *clue, const gchar *str)
}
if (refresh) {
refresh = 0;
-
+
/* The time in seconds until the refresh */
refresh_delay = atoi(content);
@@ -3380,7 +3380,7 @@ block_end_row (HTMLEngine *e, HTMLObject *clue, HTMLElement *elem)
HTMLTable *table;
g_return_if_fail (HTML_IS_ENGINE (e));
-
+
table = html_stack_top (e->table_stack);
if (table) {
html_table_end_row (table);
@@ -6005,7 +6005,7 @@ replace (HTMLEngine *e)
HTMLObject *first;
g_return_if_fail (HTML_IS_ENGINE (e));
-
+
first = HTML_OBJECT (e->search_info->found->data);
html_engine_edit_selection_updater_update_now (e->selection_updater);
@@ -6295,7 +6295,7 @@ html_engine_add_object_with_id (HTMLEngine *e, const gchar *id, HTMLObject *obj)
gpointer old_val;
g_return_if_fail (HTML_IS_ENGINE (e));
-
+
if (e->id_table == NULL)
e->id_table = g_hash_table_new (g_str_hash, g_str_equal);
@@ -6542,12 +6542,12 @@ html_engine_get_focus_object (HTMLEngine *e, gint *offset)
{
HTMLObject *o;
HTMLEngine *object_engine;
-
+
g_return_val_if_fail (HTML_IS_ENGINE (e), NULL);
-
+
o = e->focus_object;
object_engine = e;
-
+
while (html_object_is_frame (o)) {
object_engine = html_object_get_engine (o, e);
o = object_engine->focus_object;
@@ -6927,7 +6927,7 @@ void
html_engine_opened_streams_increment (HTMLEngine *e)
{
g_return_if_fail (HTML_IS_ENGINE (e));
-
+
html_engine_opened_streams_set (e, e->opened_streams + 1);
}
@@ -6935,7 +6935,7 @@ void
html_engine_opened_streams_decrement (HTMLEngine *e)
{
g_return_if_fail (HTML_IS_ENGINE (e));
-
+
html_engine_opened_streams_set (e, e->opened_streams - 1);
}
@@ -6943,7 +6943,7 @@ void
html_engine_opened_streams_set (HTMLEngine *e, int value)
{
g_return_if_fail (HTML_IS_ENGINE (e));
-
+
e->opened_streams = value;
if (value == 0 && e->keep_scroll) {
@@ -6977,7 +6977,7 @@ void
html_engine_refresh_fonts (HTMLEngine *e)
{
g_return_if_fail (HTML_IS_ENGINE (e));
-
+
if (e->clue) {
html_object_forall (e->clue, e, calc_font_size, NULL);
html_object_change_set_down (e->clue, HTML_CHANGE_ALL);
diff --git a/gtkhtml/htmlform.c b/gtkhtml/htmlform.c
index 3c4d61e..19b02dd 100644
--- a/gtkhtml/htmlform.c
+++ b/gtkhtml/htmlform.c
@@ -125,9 +125,9 @@ html_form_submit (HTMLForm *form)
gint first = TRUE;
GList *i = form->elements;
gchar *ptr;
-
+
const gchar * codepage = html_engine_get_content_type(form->engine);
-
+
while (i) {
ptr = html_embedded_encode (HTML_EMBEDDED (i->data), codepage);
if (strlen (ptr)) {
diff --git a/gtkhtml/htmlframe.c b/gtkhtml/htmlframe.c
index 461835e..80469d5 100644
--- a/gtkhtml/htmlframe.c
+++ b/gtkhtml/htmlframe.c
@@ -484,7 +484,7 @@ html_frame_init (HTMLFrame *frame,
gtk_html_set_default_engine (new_html,
gtk_html_get_default_engine(parent_html));
-
+
frame->html = new_widget;
frame->url = g_strdup (src);
frame->width = width;
diff --git a/gtkhtml/htmliframe.c b/gtkhtml/htmliframe.c
index 494ff12..9cd0980 100644
--- a/gtkhtml/htmliframe.c
+++ b/gtkhtml/htmliframe.c
@@ -615,7 +615,7 @@ html_iframe_init (HTMLIFrame *iframe,
gtk_html_set_default_engine (new_html,
gtk_html_get_default_engine(parent_html));
-
+
iframe->html = new_widget;
iframe->url = g_strdup (src);
iframe->width = width;
diff --git a/gtkhtml/htmltokenizer.c b/gtkhtml/htmltokenizer.c
index 9a504dc..d76f638 100644
--- a/gtkhtml/htmltokenizer.c
+++ b/gtkhtml/htmltokenizer.c
@@ -117,9 +117,9 @@ struct _HTMLTokenizerPrivate {
GList *blocking; /* Blocking tokens */
const gchar *searchFor;
-
+
gboolean enableconvert;
-
+
gchar * content_type;
/*convert*/
GIConv iconv_cd;
@@ -289,10 +289,10 @@ html_tokenizer_init (HTMLTokenizer *t)
p->blocking = NULL;
p->searchFor = NULL;
-
+
/* Use old logic and not convert charset */
p->enableconvert = FALSE;
-
+
p->content_type = g_strdup ("html/text; charset=utf-8");
}
@@ -300,15 +300,15 @@ static void
html_tokenizer_finalize (GObject *obj)
{
HTMLTokenizer *t = HTML_TOKENIZER (obj);
-
+
html_tokenizer_reset (t);
-
+
if(is_valid_g_iconv (t->priv->iconv_cd))
g_iconv_close (t->priv->iconv_cd);
-
+
if(t->priv->content_type)
g_free(t->priv->content_type);
-
+
g_free (t->priv);
t->priv = NULL;
@@ -419,7 +419,7 @@ html_tokenizer_real_peek_token (HTMLTokenizer *t)
/* finally get first token */
token = buffer->data;
}
-
+
return html_tokenizer_converted_token (t,token);
}
@@ -487,14 +487,14 @@ html_tokenizer_convert_entity (gchar *token)
} else {
value = html_entity_parse (read_pos, strlen (read_pos));
}
- if(value != INVALID_ENTITY_CHARACTER_MARKER){
+ if(value != INVALID_ENTITY_CHARACTER_MARKER){
write_pos += g_unichar_to_utf8 (value, write_pos);
read_pos += (count_chars + 1);
} else {
/*recovery old value - it's not entity*/
write_pos += g_unichar_to_utf8 ('&', write_pos);
*(read_pos + count_chars) = save_gchar;
- }
+ }
}
else
/*very large string*/
@@ -618,7 +618,7 @@ html_tokenizer_real_next_token (HTMLTokenizer *t)
p->tokens_num--;
g_assert (p->tokens_num >= 0);
-
+
return html_tokenizer_converted_token (t, token);
}
@@ -691,7 +691,7 @@ get_encoding_from_content_type(const gchar * content_type)
charset = g_strrstr (content_type, "encoding=");
if(charset != NULL)
return charset + strlen ("encoding=");
-
+
}
return NULL;
}
@@ -727,32 +727,32 @@ html_tokenizer_real_engine_type (HTMLTokenizer *t, gboolean engine_type)
{
struct _HTMLTokenizerPrivate *p;
p = t->priv;
-
+
p->enableconvert = engine_type;
}
static void
html_tokenizer_real_change (HTMLTokenizer *t, const gchar *content_type)
-{
+{
struct _HTMLTokenizerPrivate *p;
if(!is_text (content_type))
return;
-
+
p = t->priv;
-
+
if (!p->enableconvert)
return;
-
+
if(p->content_type)
g_free(p->content_type);
-
+
p->content_type = g_ascii_strdown ( content_type, -1);
-
+
if(is_valid_g_iconv (p->iconv_cd))
g_iconv_close (p->iconv_cd);
-
+
p->iconv_cd = generate_iconv_from (p->content_type);
-
+
#if 0
if (charset_is_utf8 (p->content_type))
g_warning ("Trying UTF-8");
@@ -1052,13 +1052,13 @@ in_script_or_style (HTMLTokenizer *t, const gchar **src)
while (isspace (**p))
(*p)++;
-
+
if (**p == '>')
*src = *p;
else
put_to_script = TRUE;
}
- else
+ else
put_to_script = TRUE;
if (put_to_script) {
@@ -1424,7 +1424,7 @@ static void
html_tokenizer_real_write (HTMLTokenizer *t, const gchar *string, size_t size)
{
const gchar *src = string;
-
+
while ((src - string) < size)
html_tokenizer_tokenize_one_char (t, &src);
}
@@ -1472,7 +1472,7 @@ html_tokenizer_blocking_pop (HTMLTokenizer *t)
void
html_tokenizer_begin (HTMLTokenizer *t, const gchar *content_type)
{
-
+
g_return_if_fail (t && HTML_IS_TOKENIZER (t));
g_signal_emit (t, html_tokenizer_signals [HTML_TOKENIZER_BEGIN_SIGNAL], 0, content_type);
@@ -1488,7 +1488,7 @@ html_tokenizer_set_engine_type (HTMLTokenizer *t, gboolean engine_type)
void
html_tokenizer_change_content_type (HTMLTokenizer *t,const gchar *content_type)
-{
+{
g_return_if_fail (t && HTML_IS_TOKENIZER (t));
g_signal_emit (t, html_tokenizer_signals [HTML_TOKENIZER_CHANGECONTENT_SIGNAL], 0, content_type);
@@ -1542,7 +1542,7 @@ html_tokenizer_get_content_type(HTMLTokenizer *t)
g_return_val_if_fail (t && HTML_IS_TOKENIZER (t), NULL);
klass = HTML_TOKENIZER_CLASS (G_OBJECT_GET_CLASS (t));
-
+
if(klass->get_content_type)
return klass->get_content_type(t);
@@ -1551,7 +1551,7 @@ html_tokenizer_get_content_type(HTMLTokenizer *t)
}
-gboolean
+gboolean
html_tokenizer_get_engine_type (HTMLTokenizer *t)
{
HTMLTokenizerClass *klass;
@@ -1559,7 +1559,7 @@ html_tokenizer_get_engine_type (HTMLTokenizer *t)
g_return_val_if_fail (t && HTML_IS_TOKENIZER (t),FALSE);
klass = HTML_TOKENIZER_CLASS (G_OBJECT_GET_CLASS (t));
-
+
if(klass->get_engine_type)
return klass->get_engine_type(t);
diff --git a/gtkhtml/htmltokenizer.h b/gtkhtml/htmltokenizer.h
index f02ecfd..f3186cc 100644
--- a/gtkhtml/htmltokenizer.h
+++ b/gtkhtml/htmltokenizer.h
@@ -72,15 +72,15 @@ void html_tokenizer_destroy (HTMLTokenizer *tokenizer);
void html_tokenizer_begin (HTMLTokenizer *t,
const gchar *content_type);
-const gchar * html_tokenizer_get_content_type(HTMLTokenizer *t);
+const gchar * html_tokenizer_get_content_type(HTMLTokenizer *t);
void html_tokenizer_change_content_type
(HTMLTokenizer *t,
const gchar *content_type);
-
+
void html_tokenizer_set_engine_type (HTMLTokenizer *t,
gboolean enginetype);
gboolean html_tokenizer_get_engine_type (HTMLTokenizer *t);
-
+
void html_tokenizer_write (HTMLTokenizer *t,
const gchar *string,
size_t size);
diff --git a/gtkhtml/testgtkhtml.c b/gtkhtml/testgtkhtml.c
index c0de89b..656d742 100644
--- a/gtkhtml/testgtkhtml.c
+++ b/gtkhtml/testgtkhtml.c
@@ -30,7 +30,7 @@
#ifdef G_OS_WIN32
/* Clashes with objidl.h, which gets included through a chain of includes from libsoup/soup.h */
-#undef DATADIR
+#undef DATADIR
#endif
#include <libsoup/soup.h>
@@ -662,7 +662,7 @@ got_data (SoupSession *session, SoupMessage *msg, gpointer user_data)
}
/* Enable change content type in engine */
gtk_html_set_default_engine(html, TRUE);
-
+
ContentType = soup_message_headers_get (msg->response_headers, "Content-type");
if (ContentType != NULL)
@@ -1037,7 +1037,7 @@ main (gint argc, gchar *argv[])
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
-
+
main_table = gtk_table_new (1, 2, FALSE);
gnome_app_set_contents (GNOME_APP (app), main_table);
gtk_table_attach (GTK_TABLE (main_table),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]