diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index 4389b592..3b7d9ab5 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -1084,7 +1084,7 @@ static void set_transient_window_pos(GtkWidget *parent, GtkWidget *child) #endif } -static void trivial_post_dialog_fn(void *vctx, int result) +void trivial_post_dialog_fn(void *vctx, int result) { } diff --git a/unix/gtkwin.c b/unix/gtkwin.c index 1b5fc86e..ffb4040d 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -4167,10 +4167,10 @@ static void after_change_settings_dialog(void *vctx, int retval) char *msgboxtext = dupprintf("Could not change fonts in terminal window: %s\n", errmsg); - message_box(inst->window, "Font setup error", msgboxtext, - string_width("Could not change fonts in terminal" - " window:"), - FALSE, &buttons_ok); + create_message_box( + inst->window, "Font setup error", msgboxtext, + string_width("Could not change fonts in terminal window:"), + FALSE, &buttons_ok, trivial_post_dialog_fn, NULL); sfree(msgboxtext); sfree(errmsg); } else { diff --git a/unix/unix.h b/unix/unix.h index 35941ebe..2d9600c4 100644 --- a/unix/unix.h +++ b/unix/unix.h @@ -122,8 +122,9 @@ unsigned long getticks(void); /* The per-session frontend structure managed by gtkwin.c */ struct gui_data; -/* Callback when a dialog box finishes */ +/* Callback when a dialog box finishes, and a no-op implementation of it */ typedef void (*post_dialog_fn_t)(void *ctx, int result); +void trivial_post_dialog_fn(void *vctx, int result); /* Start up a session window, with or without a preliminary config box */ void initial_config_box(Conf *conf, post_dialog_fn_t after, void *afterctx); @@ -189,9 +190,6 @@ GtkWidget *create_message_box( GtkWidget *parentwin, const char *title, const char *msg, int minwid, int selectable, const struct message_box_buttons *buttons, post_dialog_fn_t after, void *afterctx); -int message_box( - GtkWidget *parentwin, const char *title, const char *msg, int minwid, - int selectable, const struct message_box_buttons *buttons); #endif /* Things pterm.c needs from {ptermm,uxputty}.c */