[project @ 2006-03-04 20:59:39 by rjw]

Only browser toolbars have associated gui windows (whoops!)

svn path=/import/netsurf/; revision=2107
This commit is contained in:
Richard Wilson 2006-03-04 20:59:39 +00:00
parent c57f07a5cd
commit c5ba8b2635
1 changed files with 15 additions and 9 deletions

View File

@ -624,16 +624,22 @@ void ro_gui_theme_redraw(wimp_draw *redraw) {
/* set the content-type icon */ /* set the content-type icon */
g = ro_gui_toolbar_lookup(toolbar->toolbar_handle); g = ro_gui_toolbar_lookup(toolbar->toolbar_handle);
assert(g);
assert(g->bw); /* only set type for browser windows */
if (g->bw->current_content) { if (g) {
sprintf(theme_favicon_sprite, "Ssmall_%.3x", assert(toolbar->type == THEME_BROWSER_TOOLBAR);
ro_content_filetype_from_type( assert(g->bw);
g->bw->current_content->type)); if (g->bw->current_content) {
if (!ro_gui_wimp_sprite_exists(theme_favicon_sprite + 1)) sprintf(theme_favicon_sprite, "Ssmall_%.3x",
sprintf(theme_favicon_sprite, "Ssmall_xxx"); ro_content_filetype_from_type(
g->bw->current_content->type));
if (!ro_gui_wimp_sprite_exists(theme_favicon_sprite + 1))
sprintf(theme_favicon_sprite, "Ssmall_xxx");
} else {
sprintf(theme_favicon_sprite, "Ssmall_xxx");
}
} else { } else {
sprintf(theme_favicon_sprite, "Ssmall_xxx"); assert(toolbar->type != THEME_BROWSER_TOOLBAR);
} }
/* set up the icon */ /* set up the icon */