From 0b29da07000dae5c20a423f340cb3ec7d0b424a2 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 11 Feb 2010 18:49:03 +0000 Subject: Remove status bar checks which are now in the core. svn path=/trunk/netsurf/; revision=9969 --- amiga/gui.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'amiga/gui.c') diff --git a/amiga/gui.c b/amiga/gui.c index 7999041ba..d787f6dcc 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -3200,6 +3200,9 @@ void gui_window_set_status(struct gui_window *g, const char *text) { ULONG cur_tab = 0; char *utf8text; + ULONG size; + UWORD chars; + struct TextExtent textex; if(!g) return; if(!text) return; @@ -3212,28 +3215,21 @@ void gui_window_set_status(struct gui_window *g, const char *text) utf8text = ami_utf8_easy((char *)text); if(utf8text == NULL) return; - if((g->shared->status == NULL) || (strcmp(utf8text,g->shared->status))) - { - ULONG size; - UWORD chars; - struct TextExtent text; - - GetAttr(GA_Width, g->shared->gadgets[GID_STATUS],(ULONG *)&size); - chars = TextFit(&scrn->RastPort, utf8text, strlen(utf8text), - &text, NULL, 1, size - 2, scrn->RastPort.TxHeight); + GetAttr(GA_Width, g->shared->gadgets[GID_STATUS],(ULONG *)&size); + chars = TextFit(&scrn->RastPort, utf8text, strlen(utf8text), + &textex, NULL, 1, size - 2, scrn->RastPort.TxHeight); - utf8text[chars] = 0; + utf8text[chars] = 0; - SetGadgetAttrs(g->shared->gadgets[GID_STATUS], - g->shared->win, NULL, - GA_Text, utf8text, - TAG_DONE); + SetGadgetAttrs(g->shared->gadgets[GID_STATUS], + g->shared->win, NULL, + GA_Text, utf8text, + TAG_DONE); - RefreshGList(g->shared->gadgets[GID_STATUS],g->shared->win,NULL,1); + RefreshGList(g->shared->gadgets[GID_STATUS],g->shared->win,NULL,1); - if(g->shared->status) ami_utf8_free(g->shared->status); - g->shared->status = utf8text; - } + if(g->shared->status) ami_utf8_free(g->shared->status); + g->shared->status = utf8text; } } -- cgit v1.2.3