[gtkhtml] More whitespace cleanup.



commit e4c615d10c1259f341064f6b14ae4ea581bd4fd8
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Jul 18 12:56:45 2009 -0400

    More whitespace cleanup.

 gtkhtml/gtkhtml.c        |    2 +-
 gtkhtml/htmlbutton.c     |    6 ++--
 gtkhtml/htmlcheckbox.c   |    2 +-
 gtkhtml/htmlembedded.c   |    8 +++---
 gtkhtml/htmlengine.c     |    6 ++--
 gtkhtml/htmlform.c       |    2 +-
 gtkhtml/htmlgdkpainter.c |    6 ++--
 gtkhtml/htmlhidden.c     |    2 +-
 gtkhtml/htmlimage.c      |    7 +++--
 gtkhtml/htmlimageinput.c |    2 +-
 gtkhtml/htmlradio.c      |    2 +-
 gtkhtml/htmltablecell.c  |    2 +-
 gtkhtml/htmltext.c       |    2 +-
 gtkhtml/htmltextarea.c   |    2 +-
 gtkhtml/htmltextinput.c  |    2 +-
 gtkhtml/htmltokenizer.c  |   42 +++++++++++++++++----------------
 gtkhtml/htmlurl.c        |    8 +++---
 gtkhtml/testgtkhtml.c    |   58 +++++++++++++++++++++++-----------------------
 18 files changed, 82 insertions(+), 79 deletions(-)
---
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 8a254c2..edf621e 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -2703,7 +2703,7 @@ drag_data_received (GtkWidget *widget, GdkDragContext *context,
         case DND_TARGET_TYPE_MOZILLA_URL  :
 		break;
         case DND_TARGET_TYPE_TEXT_URI_LIST:
-		if(!HTML_IS_PLAIN_PAINTER (engine->painter)) {
+		if (!HTML_IS_PLAIN_PAINTER (engine->painter)) {
                  HTMLObject *obj;
                  gint list_len, len;
                  gchar *uri;
diff --git a/gtkhtml/htmlbutton.c b/gtkhtml/htmlbutton.c
index c241e41..0089371 100644
--- a/gtkhtml/htmlbutton.c
+++ b/gtkhtml/htmlbutton.c
@@ -69,7 +69,7 @@ encode (HTMLEmbedded *e,const gchar *codepage)
 	GString *encoding = g_string_new ("");
 	gchar *ptr;
 
-	if(strlen (e->name) && (HTML_BUTTON(e)->successful)) {
+	if (strlen (e->name) && (HTML_BUTTON(e)->successful)) {
 		ptr = html_embedded_encode_string (e->name, codepage);
 		encoding = g_string_append (encoding, ptr);
 		g_free (ptr);
@@ -127,10 +127,10 @@ html_button_init (HTMLButton *button,
 
 	html_embedded_init (element, HTML_EMBEDDED_CLASS (klass), parent, name, value);
 
-	if( strlen (element->value)) {
+	if ( strlen (element->value)) {
 		widget = gtk_button_new_with_label (element->value);
 	} else {
-		switch(type) {
+		switch (type) {
 		case BUTTON_NORMAL:
 			widget = gtk_button_new ();
 			break;
diff --git a/gtkhtml/htmlcheckbox.c b/gtkhtml/htmlcheckbox.c
index aacf1ef..524b613 100644
--- a/gtkhtml/htmlcheckbox.c
+++ b/gtkhtml/htmlcheckbox.c
@@ -43,7 +43,7 @@ encode (HTMLEmbedded *e, const gchar *codepage)
 	GString *encoding = g_string_new ("");
 	gchar *ptr;
 
-	if(strlen (e->name) && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (e->widget))) {
+	if (strlen (e->name) && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (e->widget))) {
 
 		ptr = html_embedded_encode_string (e->name, codepage);
 		encoding = g_string_append (encoding, ptr);
diff --git a/gtkhtml/htmlembedded.c b/gtkhtml/htmlembedded.c
index b585ea2..eed113c 100644
--- a/gtkhtml/htmlembedded.c
+++ b/gtkhtml/htmlembedded.c
@@ -107,11 +107,11 @@ destroy (HTMLObject *o)
 	d (printf ("destroy embedded %p\n", o));
 	element = HTML_EMBEDDED (o);
 
-	if(element->name)
+	if (element->name)
 		g_free(element->name);
-	if(element->value)
+	if (element->value)
 		g_free(element->value);
-	if(element->widget) {
+	if (element->widget) {
 		GtkWidget *parent;
 
 		gtk_widget_hide (element->widget);
@@ -243,7 +243,7 @@ html_embedded_encode_string (const gchar *before, const gchar *codepage)
 		guchar c;
 
 	    GIConv iconv_cd = generate_iconv_to (codepage);
-	    if( is_valid_g_iconv (iconv_cd))
+	    if ( is_valid_g_iconv (iconv_cd))
 	    {
 		str= convert_text_encoding(iconv_cd, before);
 		g_iconv_close(iconv_cd);
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index 9f34b7e..954a6cc 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -2813,7 +2813,7 @@ element_parse_meta (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 		} else if (g_ascii_strncasecmp(token, "content=", 8) == 0) {
 			const gchar *content;
 			content = token + 8;
-			if(contenttype)
+			if (contenttype)
 			{
 				contenttype = 0;
 				html_engine_set_content_type(e, content);
@@ -2832,7 +2832,7 @@ element_parse_meta (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 				}
 
 				g_signal_emit (e, signals [REDIRECT], 0, refresh_url, refresh_delay);
-				if(refresh_url)
+				if (refresh_url)
 					g_free(refresh_url);
 			}
 		}
@@ -4923,7 +4923,7 @@ html_engine_timer_event (HTMLEngine *e)
 
  out:
 	if (!retval) {
-		if(e->updateTimer != 0) {
+		if (e->updateTimer != 0) {
 			g_source_remove (e->updateTimer);
 			html_engine_update_event (e);
 		}
diff --git a/gtkhtml/htmlform.c b/gtkhtml/htmlform.c
index fcb9671..2b339d6 100644
--- a/gtkhtml/htmlform.c
+++ b/gtkhtml/htmlform.c
@@ -131,7 +131,7 @@ html_form_submit (HTMLForm *form)
 	while (i) {
 		ptr = html_embedded_encode (HTML_EMBEDDED (i->data), codepage);
 		if (strlen (ptr)) {
-			if(!first)
+			if (!first)
 				encoding = g_string_append_c (encoding, '&');
 			else
 				first = FALSE;
diff --git a/gtkhtml/htmlgdkpainter.c b/gtkhtml/htmlgdkpainter.c
index 65cfa76..803b755 100644
--- a/gtkhtml/htmlgdkpainter.c
+++ b/gtkhtml/htmlgdkpainter.c
@@ -99,7 +99,7 @@ begin (HTMLPainter *painter, gint x1, gint y1, gint x2, gint y2)
 
 	set_clip_rectangle (painter, 0, 0, 0, 0);
 
-	if (gdk_painter->double_buffer){
+	if (gdk_painter->double_buffer) {
 		const gint width = x2 - x1 + 1;
 		const gint height = y2 - y1 + 1;
 
@@ -113,7 +113,7 @@ begin (HTMLPainter *painter, gint x1, gint y1, gint x2, gint y2)
 		gdk_painter->x2 = x2;
 		gdk_painter->y2 = y2;
 
-		if (gdk_painter->set_background){
+		if (gdk_painter->set_background) {
 			gdk_gc_set_background (gdk_painter->gc, &gdk_painter->background);
 			gdk_painter->set_background = FALSE;
 		}
@@ -162,7 +162,7 @@ clear (HTMLPainter *painter)
 
 	gdk_painter = HTML_GDK_PAINTER (painter);
 
-	if (! gdk_painter->double_buffer){
+	if (! gdk_painter->double_buffer) {
 		gdk_window_clear (gdk_painter->window);
 	} else {
 		if (gdk_painter->pixmap != NULL)
diff --git a/gtkhtml/htmlhidden.c b/gtkhtml/htmlhidden.c
index a15f23b..7847f09 100644
--- a/gtkhtml/htmlhidden.c
+++ b/gtkhtml/htmlhidden.c
@@ -33,7 +33,7 @@ encode (HTMLEmbedded *e, const gchar *codepage)
 	GString *encoding = g_string_new ("");
 	gchar *ptr;
 
-	if(strlen (e->name)) {
+	if (strlen (e->name)) {
 		ptr = html_embedded_encode_string (e->name, codepage);
 		encoding = g_string_append (encoding, ptr);
 		g_free (ptr);
diff --git a/gtkhtml/htmlimage.c b/gtkhtml/htmlimage.c
index 68f2030..c87dde0 100644
--- a/gtkhtml/htmlimage.c
+++ b/gtkhtml/htmlimage.c
@@ -1057,7 +1057,8 @@ html_image_factory_types (GtkHTMLStream *stream,
 }
 
 static void
-update_or_redraw (HTMLImagePointer *ip){
+update_or_redraw (HTMLImagePointer *ip)
+{
 	GSList *list;
 	gboolean update = FALSE;
 
@@ -1262,7 +1263,7 @@ cleanup_images (gpointer key, gpointer value, gpointer free_everything)
 	HTMLImagePointer *ip = value;
 
 	/* free_everything means: NULL only clean, non-NULL free */
-	if (free_everything){
+	if (free_everything) {
 		if (ip->interests != NULL) {
 			g_slist_free (ip->interests);
 			ip->interests = NULL;
@@ -1270,7 +1271,7 @@ cleanup_images (gpointer key, gpointer value, gpointer free_everything)
 	}
 
 	/* clean only if this image is not used anymore */
-	if (!ip->interests){
+	if (!ip->interests) {
 		html_image_pointer_unref (ip);
 		ip->factory = NULL;
 		return TRUE;
diff --git a/gtkhtml/htmlimageinput.c b/gtkhtml/htmlimageinput.c
index a6ffad2..d2e18a0 100644
--- a/gtkhtml/htmlimageinput.c
+++ b/gtkhtml/htmlimageinput.c
@@ -112,7 +112,7 @@ encode (HTMLEmbedded *e, const gchar *codepage)
 	GString *encoding = g_string_new ("");
 	gchar *ptr;
 
-	if(strlen (e->name)) {
+	if (strlen (e->name)) {
 		ptr = html_embedded_encode_string (e->name, codepage);
 		encoding = g_string_assign (encoding, ptr);
 		g_free (ptr);
diff --git a/gtkhtml/htmlradio.c b/gtkhtml/htmlradio.c
index 0255577..5574c5a 100644
--- a/gtkhtml/htmlradio.c
+++ b/gtkhtml/htmlradio.c
@@ -54,7 +54,7 @@ encode (HTMLEmbedded *e, const gchar *codepage)
 	GString *encoding = g_string_new ("");
 	gchar *ptr;
 
-	if(strlen (e->name) && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (e->widget))) {
+	if (strlen (e->name) && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (e->widget))) {
 
 		ptr = html_embedded_encode_string (e->name, codepage);
 		encoding = g_string_append (encoding, ptr);
diff --git a/gtkhtml/htmltablecell.c b/gtkhtml/htmltablecell.c
index 76e1924..53b6af2 100644
--- a/gtkhtml/htmltablecell.c
+++ b/gtkhtml/htmltablecell.c
@@ -450,7 +450,7 @@ void
 html_table_cell_set_bg_pixmap (HTMLTableCell *cell,
 				    HTMLImagePointer *imagePtr)
 {
-	if(imagePtr) {
+	if (imagePtr) {
 		cell->have_bgPixmap = TRUE;
 		cell->bgPixmap = imagePtr;
 	}
diff --git a/gtkhtml/htmltext.c b/gtkhtml/htmltext.c
index 7892861..e48bfff 100644
--- a/gtkhtml/htmltext.c
+++ b/gtkhtml/htmltext.c
@@ -1245,7 +1245,7 @@ html_text_prepare_attrs (HTMLText *text, HTMLPainter *painter)
 
 			link = (Link *) l->data;
 
-			if(link->is_visited == FALSE)
+			if (link->is_visited == FALSE)
 				link_color = html_colorset_get_color (e->settings->color_set, HTMLLinkColor);
 			else
 				link_color = html_colorset_get_color (e->settings->color_set, HTMLVLinkColor);
diff --git a/gtkhtml/htmltextarea.c b/gtkhtml/htmltextarea.c
index fd47bd7..4183e3d 100644
--- a/gtkhtml/htmltextarea.c
+++ b/gtkhtml/htmltextarea.c
@@ -68,7 +68,7 @@ encode (HTMLEmbedded *e, const gchar *codepage)
 	GString *encoding = g_string_new ("");
 	gchar *encoded_str, *utf8_str, *gtk_text;
 
-	if(strlen (e->name)) {
+	if (strlen (e->name)) {
 		GtkTextIter first, last;
 
 		utf8_str = html_embedded_encode_string (e->name, codepage);
diff --git a/gtkhtml/htmltextinput.c b/gtkhtml/htmltextinput.c
index 4347075..b7a86cf 100644
--- a/gtkhtml/htmltextinput.c
+++ b/gtkhtml/htmltextinput.c
@@ -113,7 +113,7 @@ encode (HTMLEmbedded *e, const gchar * codepage)
 	GString *encoding = g_string_new ("");
 	gchar *ptr;
 
-	if(strlen (e->name)) {
+	if (strlen (e->name)) {
 		ptr = html_embedded_encode_string (e->name, codepage);
 		encoding = g_string_append (encoding, ptr);
 		g_free (ptr);
diff --git a/gtkhtml/htmltokenizer.c b/gtkhtml/htmltokenizer.c
index 77682fd..c033454 100644
--- a/gtkhtml/htmltokenizer.c
+++ b/gtkhtml/htmltokenizer.c
@@ -299,10 +299,10 @@ html_tokenizer_finalize (GObject *obj)
 
 	html_tokenizer_reset (t);
 
-	if(is_valid_g_iconv (t->priv->iconv_cd))
+	if (is_valid_g_iconv (t->priv->iconv_cd))
 		g_iconv_close (t->priv->iconv_cd);
 
-	if(t->priv->content_type)
+	if (t->priv->content_type)
 		g_free(t->priv->content_type);
 
 	g_free (t->priv);
@@ -483,7 +483,7 @@ 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 {
@@ -679,13 +679,13 @@ static const gchar *
 get_encoding_from_content_type(const gchar * content_type)
 {
 	gchar * charset;
-	if(content_type)
+	if (content_type)
 	{
 		charset =  g_strrstr (content_type, "charset=");
-		if(charset != NULL)
+		if (charset != NULL)
 			return charset + strlen ("charset=");
 		charset =  g_strrstr (content_type, "encoding=");
-		if(charset != NULL)
+		if (charset != NULL)
 			return charset + strlen ("encoding=");
 
 	}
@@ -695,11 +695,11 @@ get_encoding_from_content_type(const gchar * content_type)
 GIConv
 generate_iconv_from(const gchar * content_type)
 {
-	if(content_type)
-		if(!charset_is_utf8(content_type))
+	if (content_type)
+		if (!charset_is_utf8(content_type))
 		{
 			const gchar * encoding = get_encoding_from_content_type (content_type);
-			if(encoding)
+			if (encoding)
 				return g_iconv_open ("utf-8", encoding);
 		}
 	return NULL;
@@ -708,11 +708,11 @@ generate_iconv_from(const gchar * content_type)
 GIConv
 generate_iconv_to(const gchar * content_type)
 {
-	if(content_type)
-		if(!charset_is_utf8 (content_type))
+	if (content_type)
+		if (!charset_is_utf8 (content_type))
 		{
 			const gchar * encoding = get_encoding_from_content_type (content_type);
-			if(encoding)
+			if (encoding)
 				return g_iconv_open (encoding, "utf-8");
 		}
 	return NULL;
@@ -731,7 +731,7 @@ static void
 html_tokenizer_real_change (HTMLTokenizer *t, const gchar *content_type)
 {
 	struct _HTMLTokenizerPrivate *p;
-	if(!is_text (content_type))
+	if (!is_text (content_type))
 		return;
 
 	p = t->priv;
@@ -739,12 +739,12 @@ html_tokenizer_real_change (HTMLTokenizer *t, const gchar *content_type)
 	if (!p->enableconvert)
 		return;
 
-	if(p->content_type)
+	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))
+	if (is_valid_g_iconv (p->iconv_cd))
 		g_iconv_close (p->iconv_cd);
 
 	p->iconv_cd = generate_iconv_from (p->content_type);
@@ -843,16 +843,18 @@ html_tokenizer_append_token (HTMLTokenizer *t, const gchar *string, gint len)
 	}
 }
 
-static void add_byte (HTMLTokenizer *t, const gchar **c)
+static void
+add_byte (HTMLTokenizer *t, const gchar **c)
 {
 	add_char (t,**c);
 	(*c) ++;
 }
 
 static void
-add_char(HTMLTokenizer *t, gchar c){
+add_char (HTMLTokenizer *t, gchar c)
+{
 	struct _HTMLTokenizerPrivate *p = t->priv;
-	if(c!='\0')
+	if (c!='\0')
 	{
 		*(p->dest) = c;
 		p->dest ++;
@@ -1536,7 +1538,7 @@ html_tokenizer_get_content_type(HTMLTokenizer *t)
 
 	klass = HTML_TOKENIZER_CLASS (G_OBJECT_GET_CLASS (t));
 
-	if(klass->get_content_type)
+	if (klass->get_content_type)
 		return  klass->get_content_type(t);
 
 	g_warning ("No get_content_type method defined.");
@@ -1553,7 +1555,7 @@ html_tokenizer_get_engine_type (HTMLTokenizer *t)
 
 	klass = HTML_TOKENIZER_CLASS (G_OBJECT_GET_CLASS (t));
 
-	if(klass->get_engine_type)
+	if (klass->get_engine_type)
 		return  klass->get_engine_type(t);
 
 	g_warning ("No get_engine_type method defined.");
diff --git a/gtkhtml/htmlurl.c b/gtkhtml/htmlurl.c
index 5c8cbaf..23a5d89 100644
--- a/gtkhtml/htmlurl.c
+++ b/gtkhtml/htmlurl.c
@@ -498,18 +498,18 @@ html_url_append_path (const HTMLURL *url,
 	tmppath = g_strdup(url->path);
 
 	/* Cut the path at the first '?' */
-	if((ptr = strchr(tmppath, '?')))
+	if ((ptr = strchr(tmppath, '?')))
 		*ptr = 0;
 
 	i = strlen(tmppath);
 
 	/* Remove first '/' from the right */
-	while(i && tmppath[i-1] != '/')
+	while (i && tmppath[i-1] != '/')
 		i--;
 
-	if(i)
+	if (i)
 		tmppath[i] = 0;
-	else if(strlen(tmppath) > 1)
+	else if (strlen(tmppath) > 1)
 		tmppath[i] = 0;
 
 	new_path = concat_dir_and_file (tmppath, path);
diff --git a/gtkhtml/testgtkhtml.c b/gtkhtml/testgtkhtml.c
index c8a0aaf..0b70085 100644
--- a/gtkhtml/testgtkhtml.c
+++ b/gtkhtml/testgtkhtml.c
@@ -618,7 +618,7 @@ entry_goto_url(GtkWidget *widget, gpointer data)
 	tmpurl = g_strdup (gtk_entry_get_text (GTK_ENTRY (widget)));
 
 	/* Add "http://"; if no protocol is specified */
-	if(strchr(tmpurl, ':')) {
+	if (strchr(tmpurl, ':')) {
 		on_set_base (NULL, tmpurl, NULL);
 		goto_url (tmpurl, 0);
 	} else {
@@ -645,13 +645,13 @@ back_cb (GtkWidget *widget, gpointer data)
 
 	go_position++;
 
-	if((item = g_list_nth_data(go_list, go_position))) {
+	if ((item = g_list_nth_data(go_list, go_position))) {
 
 		goto_url(item->url, 1);
 		gtk_widget_set_sensitive(popup_menu_forward, TRUE);
 		gtk_widget_set_sensitive(toolbar_forward, TRUE);
 
-		if(go_position == (g_list_length(go_list) - 1)) {
+		if (go_position == (g_list_length(go_list) - 1)) {
 
 			gtk_widget_set_sensitive(popup_menu_back, FALSE);
 			gtk_widget_set_sensitive(toolbar_back, FALSE);
@@ -668,14 +668,14 @@ forward_cb (GtkWidget *widget, gpointer data)
 
 	go_position--;
 
-	if((go_position >= 0) && (item = g_list_nth_data(go_list, go_position))) {
+	if ((go_position >= 0) && (item = g_list_nth_data(go_list, go_position))) {
 
 		goto_url(item->url, 1);
 
 		gtk_widget_set_sensitive(popup_menu_back, TRUE);
 		gtk_widget_set_sensitive(toolbar_back, TRUE);
 
-		if(go_position == 0) {
+		if (go_position == 0) {
 			gtk_widget_set_sensitive(popup_menu_forward, FALSE);
 			gtk_widget_set_sensitive(toolbar_forward, FALSE);
 		}
@@ -688,7 +688,7 @@ reload_cb (GtkWidget *widget, gpointer data)
 {
 	go_item *item;
 
-	if((item = g_list_nth_data(go_list, go_position))) {
+	if ((item = g_list_nth_data(go_list, go_position))) {
 
 		goto_url(item->url, 1);
 	}
@@ -762,7 +762,7 @@ static void
 on_redirect (GtkHTML *html, const gchar *url, gint delay, gpointer data) {
 	g_print("Redirecting to '%s' in %d seconds\n", url, delay);
 
-	if(redirect_timerId == 0) {
+	if (redirect_timerId == 0) {
 
 		redirect_url = g_strdup(url);
 
@@ -776,7 +776,7 @@ on_submit (GtkHTML *html, const gchar *method, const gchar *action, const gchar
 
 	g_print("submitting '%s' to '%s' using method '%s'\n", encoding, action, method);
 
-	if(g_ascii_strcasecmp(method, "GET") == 0) {
+	if (g_ascii_strcasecmp(method, "GET") == 0) {
 
 		tmpstr = g_string_append_c (tmpstr, '?');
 		tmpstr = g_string_append (tmpstr, encoding);
@@ -929,7 +929,7 @@ parse_href (const gchar *s)
 	gchar *tmp;
 	HTMLURL *tmpurl;
 
-	if(s == NULL || *s == 0)
+	if (s == NULL || *s == 0)
 		return g_strdup ("");
 
 	if (s[0] == '#') {
@@ -970,7 +970,7 @@ parse_href (const gchar *s)
 			}
 		} else {
 			html_url_destroy (tmpurl);
-			if(baseURL) {
+			if (baseURL) {
 				tmpurl = html_url_append_path (baseURL, s);
 				retval = html_url_to_string (tmpurl);
 				html_url_destroy (tmpurl);
@@ -995,19 +995,19 @@ go_list_cb (GtkWidget *widget, gpointer data)
 
 		go_position = GPOINTER_TO_INT(data);
 
-		if((item = g_list_nth_data(go_list, go_position))) {
+		if ((item = g_list_nth_data(go_list, go_position))) {
 
 			goto_url(item->url, 1);
 			num = g_list_length(go_list);
 
-			if(go_position == 0 || num < 2) {
+			if (go_position == 0 || num < 2) {
 				gtk_widget_set_sensitive(popup_menu_forward, FALSE);
 				gtk_widget_set_sensitive(toolbar_forward, FALSE);
 			} else {
 				gtk_widget_set_sensitive(popup_menu_forward, TRUE);
 				gtk_widget_set_sensitive(toolbar_forward, TRUE);
 			}
-			if(go_position == (num - 1) || num < 2) {
+			if (go_position == (num - 1) || num < 2) {
 				gtk_widget_set_sensitive(popup_menu_back, FALSE);
 				gtk_widget_set_sensitive(toolbar_back, FALSE);
 			} else {
@@ -1021,7 +1021,7 @@ go_list_cb (GtkWidget *widget, gpointer data)
 static void remove_go_list(gpointer data, gpointer user_data) {
 	go_item *item = (go_item *)data;
 
-	if(item->widget)
+	if (item->widget)
 		gtk_widget_destroy(item->widget);
 
 	item->widget = NULL;
@@ -1039,7 +1039,7 @@ goto_url(const gchar *url, gint back_or_forward)
 	soup_session_abort (session);
 
 	/* Remove any pending redirection */
-	if(redirect_timerId) {
+	if (redirect_timerId) {
 		g_source_remove(redirect_timerId);
 
 		redirect_timerId = 0;
@@ -1055,18 +1055,18 @@ goto_url(const gchar *url, gint back_or_forward)
 	on_set_base (NULL, full_url, NULL);
 	url_requested (html, url, html_stream_handle, NULL);
 
-	if(!back_or_forward) {
-		if(go_position) {
+	if (!back_or_forward) {
+		if (go_position) {
 			/* Removes "Forward entries"*/
 			tmp = go_position;
-			while(tmp) {
+			while (tmp) {
 				item = g_list_nth_data(go_list, --tmp);
 				go_list = g_list_remove(go_list, item);
-				if(item->url)
+				if (item->url)
 					g_free(item->url);
-				if(item->title)
+				if (item->title)
 					g_free(item->title);
-				if(item->url)
+				if (item->url)
 					gtk_widget_destroy(item->widget);
 				g_free(item);
 			}
@@ -1075,14 +1075,14 @@ goto_url(const gchar *url, gint back_or_forward)
 
 		/* Removes old entries if the list is to big */
 		tmp = g_list_length(go_list);
-		while(tmp > MAX_GO_ENTRIES) {
+		while (tmp > MAX_GO_ENTRIES) {
 			item = g_list_nth_data(go_list, MAX_GO_ENTRIES);
 
-			if(item->url)
+			if (item->url)
 				g_free(item->url);
-			if(item->title)
+			if (item->title)
 				g_free(item->title);
-			if(item->url)
+			if (item->url)
 				gtk_widget_destroy(item->widget);
 			g_free(item);
 
@@ -1105,7 +1105,7 @@ goto_url(const gchar *url, gint back_or_forward)
 		tmp = g_list_length(go_list);
 		group = NULL;
 
-		for(i=0;i<tmp;i++) {
+		for (i=0;i<tmp;i++) {
 
 			item = g_list_nth_data(go_list, i);
 			item->widget = gtk_radio_menu_item_new_with_label(group, item->url);
@@ -1115,14 +1115,14 @@ goto_url(const gchar *url, gint back_or_forward)
 
 			group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item->widget));
 
-			if(i == 0)
+			if (i == 0)
 				gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item->widget), TRUE);
 
 			gtk_widget_show(item->widget);
 
 		}
 		/* Enable the "Back" button if there are more then one url in the list */
-		if(g_list_length(go_list) > 1) {
+		if (g_list_length(go_list) > 1) {
 
 			gtk_widget_set_sensitive(popup_menu_back, TRUE);
 			gtk_widget_set_sensitive(toolbar_back, TRUE);
@@ -1133,7 +1133,7 @@ goto_url(const gchar *url, gint back_or_forward)
 		gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item->widget), TRUE);
 	}
 
-	if(redirect_url) {
+	if (redirect_url) {
 
 		g_free(redirect_url);
 		redirect_url = NULL;



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