[gtkhtml] Use GSourceFunc instead of GtkFunction



commit be95ffabe801e1c273f0bceb32d592e5a53eacb7
Author: Milan Crha <mcrha redhat com>
Date:   Thu Nov 18 12:13:20 2010 +0100

    Use GSourceFunc instead of GtkFunction

 gtkhtml/htmlengine.c  |   10 +++++-----
 gtkhtml/htmlimage.c   |    6 +++---
 gtkhtml/testgtkhtml.c |    6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index 7f15555..37cd422 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -4750,7 +4750,7 @@ html_engine_stream_write (GtkHTMLStream *handle,
 	html_tokenizer_write (e->ht, buffer, size == -1 ? strlen (buffer) : size);
 
 	if (e->parsing && e->timerId == 0) {
-		e->timerId = g_timeout_add (10, (GtkFunction) html_engine_timer_event, e);
+		e->timerId = g_timeout_add (10, (GSourceFunc) html_engine_timer_event, e);
 	}
 }
 
@@ -4868,7 +4868,7 @@ html_engine_schedule_update (HTMLEngine *e)
 		return;
 	DI (printf ("html_engine_schedule_update - timer %d\n", e->updateTimer));
 	if (e->updateTimer == 0)
-		e->updateTimer = g_idle_add ((GtkFunction) html_engine_update_event, e);
+		e->updateTimer = g_idle_add ((GSourceFunc) html_engine_update_event, e);
 }
 
 
@@ -5160,7 +5160,7 @@ html_engine_draw (HTMLEngine *e, gint x, gint y, gint width, gint height)
 		html_engine_draw_real (e, x, y, width, height, FALSE);
 }
 
-static gint
+static gboolean
 redraw_idle (HTMLEngine *e)
 {
 	g_return_val_if_fail (HTML_IS_ENGINE (e), 0);
@@ -5184,7 +5184,7 @@ html_engine_schedule_redraw (HTMLEngine *e)
 	else if (e->redraw_idle_id == 0) {
 		clear_pending_expose (e);
 		html_draw_queue_clear (e->draw_queue);
-		e->redraw_idle_id = g_idle_add ((GtkFunction) redraw_idle, e);
+		e->redraw_idle_id = g_idle_add ((GSourceFunc) redraw_idle, e);
 	}
 }
 
@@ -5398,7 +5398,7 @@ html_engine_parse (HTMLEngine *e)
 
 	e->avoid_para = FALSE;
 
-	e->timerId = g_idle_add ((GtkFunction) html_engine_timer_event, e);
+	e->timerId = g_idle_add ((GSourceFunc) html_engine_timer_event, e);
 }
 
 
diff --git a/gtkhtml/htmlimage.c b/gtkhtml/htmlimage.c
index 87f62bd..11f3152 100644
--- a/gtkhtml/htmlimage.c
+++ b/gtkhtml/htmlimage.c
@@ -1162,13 +1162,13 @@ html_image_pointer_queue_animation (HTMLImagePointer *ip)
 		delay = gdk_pixbuf_animation_iter_get_delay_time (ip->iter);
 
 		ip->animation_timeout = g_timeout_add (delay,
-						       (GtkFunction) html_image_pointer_update,
+						       (GSourceFunc) html_image_pointer_update,
 						       (gpointer) ip);
 	}
 
 }
 
-static gint
+static gboolean
 html_image_pointer_update (HTMLImagePointer *ip)
 {
 	HTMLEngine *engine;
@@ -1319,7 +1319,7 @@ html_image_pointer_new (const gchar *filename, HTMLImageFactory *factory)
 	retval->factory = factory;
 	retval->stall = FALSE;
 	retval->stall_timeout = g_timeout_add (STALL_INTERVAL,
-					       (GtkFunction)html_image_pointer_timeout,
+					       (GSourceFunc)html_image_pointer_timeout,
 					       retval);
 	retval->animation_timeout = 0;
 	return retval;
diff --git a/gtkhtml/testgtkhtml.c b/gtkhtml/testgtkhtml.c
index e44fdf9..4039fe5 100644
--- a/gtkhtml/testgtkhtml.c
+++ b/gtkhtml/testgtkhtml.c
@@ -769,7 +769,7 @@ on_redirect (GtkHTML *html, const gchar *url, gint delay, gpointer data) {
 
 		redirect_url = g_strdup (url);
 
-		redirect_timerId = g_timeout_add (delay * 1000,(GtkFunction) redirect_timer_event, NULL);
+		redirect_timerId = g_timeout_add (delay * 1000,(GSourceFunc) redirect_timer_event, NULL);
 	}
 }
 
@@ -825,7 +825,7 @@ on_link_clicked (GtkHTML *html, const gchar *url, gpointer data)
 }
 
 /* simulate an async object isntantiation */
-static gint
+static gboolean
 object_timeout (GtkHTMLEmbedded *eb)
 {
 	GtkWidget *w;
@@ -850,7 +850,7 @@ object_requested_cmd (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data)
 		return FALSE;
 
 	g_object_ref (eb);
-	g_timeout_add (rand () % 5000 + 1000, (GtkFunction) object_timeout, eb);
+	g_timeout_add (rand () % 5000 + 1000, (GSourceFunc) object_timeout, eb);
 	/* object_timeout (eb); */
 
 	return TRUE;



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