Implemented get_location and get_title

This commit is contained in:
Pierre Pronchery 2009-04-05 00:36:54 +00:00
parent 7066d63733
commit 24de22e685

View File

@ -113,15 +113,23 @@ char const * ghtml_get_link_message(GtkWidget * ghtml)
char const * ghtml_get_location(GtkWidget * ghtml)
{
/* FIXME implement */
return NULL;
GtkWidget * view;
WebKitWebFrame * frame;
view = g_object_get_data(G_OBJECT(ghtml), "view");
frame = webkit_web_view_get_main_frame(WEBKIT_WEB_VIEW(view));
return webkit_web_frame_get_uri(frame);
}
char const * ghtml_get_title(GtkWidget * ghtml)
{
/* FIXME implement */
return NULL;
GtkWidget * view;
WebKitWebFrame * frame;
view = g_object_get_data(G_OBJECT(ghtml), "view");
frame = webkit_web_view_get_main_frame(WEBKIT_WEB_VIEW(view));
return webkit_web_frame_get_title(frame);
}