Fixed compilation and slightly improved history handling
This commit is contained in:
parent
1c80bb4942
commit
3093770714
@ -583,14 +583,19 @@ static void _ghtml_set_status(GHtml * ghtml, char const * status)
|
|||||||
static int _ghtml_document_load(GHtml * ghtml, gchar const * url,
|
static int _ghtml_document_load(GHtml * ghtml, gchar const * url,
|
||||||
gchar const * post)
|
gchar const * post)
|
||||||
{
|
{
|
||||||
|
char const * q;
|
||||||
GHtmlConn * gc;
|
GHtmlConn * gc;
|
||||||
History * h;
|
History * h;
|
||||||
|
|
||||||
_ghtml_stop(ghtml);
|
_ghtml_stop(ghtml);
|
||||||
if((h = _history_new(url, post)) == NULL)
|
if((q = _history_get_location(ghtml->current)) == NULL
|
||||||
return 1;
|
|| strcmp(q, url) != 0)
|
||||||
ghtml->history = g_list_append(ghtml->history, h);
|
{
|
||||||
ghtml->current = g_list_last(ghtml->history);
|
if((h = _history_new(url, post)) == NULL)
|
||||||
|
return 1;
|
||||||
|
ghtml->current = _history_append(h, ghtml->current);
|
||||||
|
ghtml->history = g_list_first(ghtml->current);
|
||||||
|
}
|
||||||
surfer_set_location(ghtml->surfer, url);
|
surfer_set_location(ghtml->surfer, url);
|
||||||
surfer_set_title(ghtml->surfer, NULL);
|
surfer_set_title(ghtml->surfer, NULL);
|
||||||
html_document_open_stream(ghtml->html_document, "text/html");
|
html_document_open_stream(ghtml->html_document, "text/html");
|
||||||
|
Loading…
Reference in New Issue
Block a user