From 05f938e7c17887cae29f9cb1a6a79fa9cf4eb5b2 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Wed, 21 Jul 2010 21:03:06 +0000 Subject: [PATCH] Converting the last screen line from ASCII to PETSCII as it was done up to now almost never makes sense. Either the conent to be converted is not the last screen line or the last screen line was already converted (and is incorrectly converted back). Therefore now only a partial line not already converted before gets converted. --- apps/webbrowser/www.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/webbrowser/www.c b/apps/webbrowser/www.c index b7fe502f1..ed28e145e 100644 --- a/apps/webbrowser/www.c +++ b/apps/webbrowser/www.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment * - * $Id: www.c,v 1.13 2010/05/31 15:22:08 nifi Exp $ + * $Id: www.c,v 1.14 2010/07/21 21:03:06 oliverschmidt Exp $ * */ @@ -598,19 +598,18 @@ webclient_timedout(void) * * Callback function. Called from the webclient when the HTTP * connection was closed after a request from the "webclient_close()" - * function. . + * function. */ void webclient_closed(void) { show_statustext("Stopped."); - petsciiconv_topetscii(&webpage[(WWW_CONF_WEBPAGE_HEIGHT - 1) * - WWW_CONF_WEBPAGE_WIDTH], WWW_CONF_WEBPAGE_WIDTH); + petsciiconv_topetscii(webpageptr - x, x); CTK_WIDGET_FOCUS(&mainwindow, &downbutton); redraw_window(); } /*-----------------------------------------------------------------------------------*/ -/* webclient_closed(): +/* webclient_connected(): * * Callback function. Called from the webclient when the HTTP * connection is connected. @@ -659,8 +658,7 @@ webclient_datahandler(char *data, u16_t len) if(data == NULL) { loading = 0; show_statustext("Done."); - petsciiconv_topetscii(&webpage[(WWW_CONF_WEBPAGE_HEIGHT - 1) * - WWW_CONF_WEBPAGE_WIDTH], WWW_CONF_WEBPAGE_WIDTH); + petsciiconv_topetscii(webpageptr - x, x); CTK_WIDGET_FOCUS(&mainwindow, &urlentry); redraw_window(); }