So I now have a callback function registered on that signal which
contains the single line:
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar),webkit_web_view_get_progress(WEBKIT_WEB_VIEW
(gtkwebview)));
But I get periodic crashes when it runs (seg faults). If I disable the
signal handler I dont get them.
Without knowing much about the internals of WebKit I dont really
understand whats going on here.
The only insight I can give is that it seems to always occur immediately
after the signal handler returns but as I say its only once in a blue moon.
If anyone can give me a clue as to whats wrong here Id be very grateful.
Thanks
On 06/09/11 00:36, Diego Escalante Urrelo wrote:
Hi,
El lun, 05-09-2011 a las 18:48 +0100, Andrew Wood escribió:
How can I check the progress of a page loading, so I can update a
progress bar? Ive tried this:
webkit_web_view_load_uri (WEBKIT_WEB_VIEW (gtkwebview), url.c_str());
//this line on its own works
You can connect to the notify::progress signal
http://webkitgtk.org/reference/webkitgtk-webkitwebview.html#WebKitWebView--progress
http://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-notify
Basically it's a signal that works for any property in any GObject, so
when the property changes you get your callback called.
In this case, you'll get one call for every progress update. You can see
how Epiphany does this:
http://git.gnome.org/browse/epiphany/tree/src/ephy-window.c#n2901
Lots of other examples on that file.
Good luck!
_______________________________________________
webkit-gtk mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk
_______________________________________________
webkit-gtk mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk