summaryrefslogtreecommitdiff
path: root/riscos/dialog.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-05-06 20:37:48 +0000
committerJames Bursa <james@netsurf-browser.org>2004-05-06 20:37:48 +0000
commit7cb9b4d79b078040967e5326615779d7c073b23d (patch)
treedc7d3e9adb473c5f8a9bc1ef87d74b56641d922f /riscos/dialog.c
parentc0a4ab450b9802e618bb1e98b46b4a5dbed49c13 (diff)
downloadnetsurf-7cb9b4d79b078040967e5326615779d7c073b23d.tar.gz
netsurf-7cb9b4d79b078040967e5326615779d7c073b23d.tar.bz2
[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
Diffstat (limited to 'riscos/dialog.c')
-rw-r--r--riscos/dialog.c17
1 files changed, 14 insertions, 3 deletions
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;