summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/gui_factory.c3
-rw-r--r--desktop/gui_misc.h17
2 files changed, 15 insertions, 5 deletions
diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c
index c15603e1c..956c508e6 100644
--- a/desktop/gui_factory.c
+++ b/desktop/gui_factory.c
@@ -719,6 +719,9 @@ static nserror verify_misc_register(struct gui_misc_table *gmt)
if (gmt->schedule == NULL) {
return NSERROR_BAD_PARAMETER;
}
+ if (gmt->warning == NULL) {
+ return NSERROR_BAD_PARAMETER;
+ }
/* fill in the optional entries with defaults */
if (gmt->quit == NULL) {
diff --git a/desktop/gui_misc.h b/desktop/gui_misc.h
index a46c85367..399d93895 100644
--- a/desktop/gui_misc.h
+++ b/desktop/gui_misc.h
@@ -57,6 +57,18 @@ struct gui_misc_table {
*/
nserror (*schedule)(int t, void (*callback)(void *p), void *p);
+ /**
+ * Warn the user of an event.
+ *
+ * \param[in] message A warning looked up in the message
+ * translation table
+ * \param[in] detail Additional text to be displayed or NULL.
+ * \return NSERROR_OK on success or error code if there was a
+ * faliure displaying the message to the user.
+ */
+ nserror (*warning)(const char *message, const char *detail);
+
+
/* Optional entries */
/**
@@ -87,11 +99,6 @@ struct gui_misc_table {
nserror (*cb)(bool proceed, void *pw), void *cbpw);
/**
- * Warn the user of an event.
- */
- void (*warning)(const char *warning, const char *detail);
-
- /**
* Prompt the user for a password for a PDF.
*/
void (*pdf_password)(char **owner_pass, char **user_pass, char *path);