diff options
author | James Bursa <james@netsurf-browser.org> | 2004-06-21 15:09:59 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-06-21 15:09:59 +0000 |
commit | b4723c1d05819d4e47fc59254f5ad8c9d6d62db3 (patch) | |
tree | 4242fc6b5d7c9f3649140f0e86b1b39b338e9459 /riscos/debugwin.c | |
parent | 6e5d77e894d9b76d9bd9ed19b6d506dc8f26d454 (diff) | |
download | netsurf-b4723c1d05819d4e47fc59254f5ad8c9d6d62db3.tar.gz netsurf-b4723c1d05819d4e47fc59254f5ad8c9d6d62db3.tar.bz2 |
[project @ 2004-06-21 15:09:58 by bursa]
Merge memory cache into content module.
svn path=/import/netsurf/; revision=986
Diffstat (limited to 'riscos/debugwin.c')
-rw-r--r-- | riscos/debugwin.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/riscos/debugwin.c b/riscos/debugwin.c index b45eb5217..8f9496150 100644 --- a/riscos/debugwin.c +++ b/riscos/debugwin.c @@ -14,6 +14,8 @@ #include "netsurf/utils/log.h" #include "netsurf/utils/utils.h" +/** Update interval / cs. */ +#define DEBUGWIN_UPDATE 500 static void ro_gui_debugwin_resize(void); static void ro_gui_debugwin_update(void *p); @@ -24,13 +26,13 @@ void ro_gui_debugwin_open(void) { ro_gui_debugwin_resize(); ro_gui_dialog_open(dialog_debug); - schedule(100, ro_gui_debugwin_update, 0); + schedule(DEBUGWIN_UPDATE, ro_gui_debugwin_update, 0); } void ro_gui_debugwin_resize(void) { - unsigned int count = 1; + unsigned int count = 2; struct content *content; os_box box; os_error *error; @@ -61,7 +63,7 @@ void ro_gui_debugwin_update(void *p) error->errnum, error->errmess)); warn_user("WimpError", error->errmess); } - schedule(100, ro_gui_debugwin_update, 0); + schedule(DEBUGWIN_UPDATE, ro_gui_debugwin_update, 0); } @@ -105,17 +107,22 @@ void ro_gui_debugwin_redraw(wimp_draw *redraw) void ro_gui_debugwin_redraw_plot(wimp_draw *redraw) { - char size[20]; + char s[20]; int x0 = redraw->box.x0 - redraw->xscroll; int y0 = redraw->box.y1 - redraw->yscroll; int i = 1; int y; + unsigned int users; + unsigned int size = 0; struct content *content; + struct content_user *user; xwimp_set_font_colours(wimp_COLOUR_BLACK, wimp_COLOUR_LIGHT_GREY); xwimptextop_paint(0, "url", x0 + 4, y0 - 20); xwimptextop_paint(0, "type", x0 + 600, y0 - 20); + xwimptextop_paint(0, "fresh", x0 + 680, y0 - 20); xwimptextop_paint(0, "mime_type", x0 + 750, y0 - 20); + xwimptextop_paint(0, "users", x0 + 880, y0 - 20); xwimptextop_paint(0, "status", x0 + 950, y0 - 20); xwimptextop_paint(0, "size", x0 + 1100, y0 - 20); @@ -126,12 +133,22 @@ void ro_gui_debugwin_redraw_plot(wimp_draw *redraw) x0 + 580, y); xwimptextop_paint(0, content_type_name[content->type], x0 + 600, y); + xwimptextop_paint(0, content->fresh ? "" : "", + x0 + 710, y); if (content->mime_type) xwimptextop_paint(0, content->mime_type, x0 + 750, y); + users = 0; + for (user = content->user_list->next; user; user = user->next) + users++; + snprintf(s, sizeof s, "%u", users); + xwimptextop_paint(wimptextop_RJUSTIFY, s, x0 + 930, y); xwimptextop_paint(0, content_status_name[content->status], x0 + 950, y); - snprintf(size, sizeof size, "%lu", content->size); - xwimptextop_paint(0, size, x0 + 1100, y); + snprintf(s, sizeof s, "%u", content->size); + xwimptextop_paint(wimptextop_RJUSTIFY, s, x0 + 1190, y); + size += content->size; } + snprintf(s, sizeof s, "%u", size); + xwimptextop_paint(wimptextop_RJUSTIFY, s, x0 + 1190, y0 - i * 28 - 20); } |