mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-27 16:59:36 +03:00
[project @ 2006-02-10 18:10:09 by adrianl]
Improved reporting of startup errors svn path=/import/netsurf/; revision=2068
This commit is contained in:
parent
7fe5a989e3
commit
9f0f47cff7
27
riscos/gui.c
27
riscos/gui.c
@ -2176,20 +2176,41 @@ void gui_launch_url(const char *url)
|
|||||||
|
|
||||||
void warn_user(const char *warning, const char *detail)
|
void warn_user(const char *warning, const char *detail)
|
||||||
{
|
{
|
||||||
|
union {
|
||||||
char warn_buffer[300];
|
char warn_buffer[300];
|
||||||
|
os_error error;
|
||||||
|
} d;
|
||||||
|
|
||||||
LOG(("%s %s", warning, detail));
|
LOG(("%s %s", warning, detail));
|
||||||
snprintf(warn_buffer, sizeof warn_buffer, "%s %s",
|
|
||||||
|
if (dialog_warning) {
|
||||||
|
snprintf(d.warn_buffer, sizeof d.warn_buffer, "%s %s",
|
||||||
messages_get(warning),
|
messages_get(warning),
|
||||||
detail ? detail : "");
|
detail ? detail : "");
|
||||||
warn_buffer[sizeof warn_buffer - 1] = 0;
|
d.warn_buffer[sizeof d.warn_buffer - 1] = 0;
|
||||||
ro_gui_set_icon_string(dialog_warning, ICON_WARNING_MESSAGE,
|
ro_gui_set_icon_string(dialog_warning, ICON_WARNING_MESSAGE,
|
||||||
warn_buffer);
|
d.warn_buffer);
|
||||||
xwimp_set_icon_state(dialog_warning, ICON_WARNING_HELP,
|
xwimp_set_icon_state(dialog_warning, ICON_WARNING_HELP,
|
||||||
wimp_ICON_DELETED, wimp_ICON_DELETED);
|
wimp_ICON_DELETED, wimp_ICON_DELETED);
|
||||||
ro_gui_dialog_open(dialog_warning);
|
ro_gui_dialog_open(dialog_warning);
|
||||||
xos_bell();
|
xos_bell();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* probably haven't initialised (properly), use a
|
||||||
|
non-multitasking error box */
|
||||||
|
snprintf(d.error.errmess, sizeof d.error.errmess, "%s %s",
|
||||||
|
messages_get(warning),
|
||||||
|
detail ? detail : "");
|
||||||
|
d.error.errmess[sizeof d.error.errmess - 1] = 0;
|
||||||
|
xwimp_report_error_by_category(&d.error,
|
||||||
|
wimp_ERROR_BOX_OK_ICON |
|
||||||
|
wimp_ERROR_BOX_GIVEN_CATEGORY |
|
||||||
|
wimp_ERROR_BOX_CATEGORY_ERROR <<
|
||||||
|
wimp_ERROR_BOX_CATEGORY_SHIFT,
|
||||||
|
"NetSurf", "!netsurf",
|
||||||
|
(osspriteop_area *) 1, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user