Fix utf-8 conversion.

svn path=/trunk/netsurf/; revision=13242
This commit is contained in:
Ole Loots 2011-12-04 17:18:59 +00:00
parent d7067aa873
commit 2ff45272d0
1 changed files with 15 additions and 5 deletions

View File

@ -86,7 +86,8 @@ OBJECT * h_gem_menu;
OBJECT **rsc_trindex;
short vdih;
short rsc_ntree;
long next_poll;
long next_poll;
bool rendering = false;
/* Comandline / Options: */
int cfg_width;
@ -104,10 +105,10 @@ void gui_poll(bool active)
int flags = MU_MESAG | MU_KEYBD | MU_BUTTON ;
short mx, my, dummy;
short aestop;
evnt.timer = schedule_run();
if( active ) {
if( active || rendering ) {
if( clock() >= next_poll ) {
evnt.timer = 0;
flags |= MU_TIMER;
@ -271,7 +272,16 @@ void gui_window_set_status(struct gui_window *w, const char *text)
if (w == NULL || text == NULL )
return;
window_set_stauts( w , (char*)text );
window_set_stauts( w , (char*)text );
if( strncmp("Done", text, 4) == 0 ){
rendering = false;
} else {
if( !rendering
&&
( strncmp("Load", text, 4) == 0 || strncmp("Fetch", text, 5) == 0)){
rendering = true;
}
}
}
void gui_window_redraw_window(struct gui_window *gw)
@ -629,7 +639,7 @@ void gui_paste_from_clipboard(struct gui_window *w, int x, int y)
utf8_convert_ret ret;
/* Clipboard is in local encoding so
* convert to UTF8 */
ret = local_encoding_to_utf8(clip,
ret = utf8_from_local_encoding(clip,
clip_length, &utf8);
if (ret == UTF8_CONVERT_OK) {
browser_window_paste_text(w->browser->bw, utf8,