From 7cb9b4d79b078040967e5326615779d7c073b23d Mon Sep 17 00:00:00 2001 From: James Bursa Date: Thu, 6 May 2004 20:37:48 +0000 Subject: [project @ 2004-05-06 20:37:48 by bursa] Remove obsolete theme files. Hide some unimplemented toolbar icons. F2 moves caret to URL bar and clears it to "www.". Simplify some of the toolbar code. Fix menu-related crash (reported by Jerome Mathevet). svn path=/import/netsurf/; revision=836 --- riscos/dialog.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'riscos/dialog.c') diff --git a/riscos/dialog.c b/riscos/dialog.c index ca7dd2763..3e530bdf2 100644 --- a/riscos/dialog.c +++ b/riscos/dialog.c @@ -632,8 +632,7 @@ void ro_gui_build_theme_menu(void) continue; if (info.obj_type != fileswitch_IS_DIR) continue; - if (!(file_exists(THEMES_DIR, info.name, "Templates", 0xfec) && - file_exists(THEMES_DIR, info.name, "Sprites", 0xff9))) + if (!file_exists(THEMES_DIR, info.name, "Sprites", 0xff9)) continue; theme_menu = xrealloc(theme_menu, wimp_SIZEOF_MENU(i + 1)); @@ -654,7 +653,19 @@ void ro_gui_build_theme_menu(void) i++; } - assert(i != 0); + if (i == 0) { + theme_menu->entries[0].menu_flags = 0; + theme_menu->entries[0].sub_menu = wimp_NO_SUB_MENU; + theme_menu->entries[0].icon_flags = wimp_ICON_TEXT | + wimp_ICON_FILLED | wimp_ICON_INDIRECTED | + (wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT) | + (wimp_COLOUR_WHITE << wimp_ICON_BG_COLOUR_SHIFT) | + wimp_ICON_SHADED; + theme_menu->entries[0].data.indirected_text.text = xstrdup("-"); + theme_menu->entries[0].data.indirected_text.validation = (char*)-1; + theme_menu->entries[0].data.indirected_text.size = 2; + i = 1; + } entries = i; theme_menu->entries[0].menu_flags |= wimp_MENU_TITLE_INDIRECTED; -- cgit v1.2.3