mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 06:38:37 -05:00
Make the GTK font setup error box non-modal.
That was the last (in fact, the only) call to the modal version of message_box() outside gtkdlg.c, so I can remove it from the header file.
This commit is contained in:
parent
8b0d460578
commit
71ed04dbc3
@ -1084,7 +1084,7 @@ static void set_transient_window_pos(GtkWidget *parent, GtkWidget *child)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void trivial_post_dialog_fn(void *vctx, int result)
|
void trivial_post_dialog_fn(void *vctx, int result)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4167,10 +4167,10 @@ static void after_change_settings_dialog(void *vctx, int retval)
|
|||||||
char *msgboxtext =
|
char *msgboxtext =
|
||||||
dupprintf("Could not change fonts in terminal window: %s\n",
|
dupprintf("Could not change fonts in terminal window: %s\n",
|
||||||
errmsg);
|
errmsg);
|
||||||
message_box(inst->window, "Font setup error", msgboxtext,
|
create_message_box(
|
||||||
string_width("Could not change fonts in terminal"
|
inst->window, "Font setup error", msgboxtext,
|
||||||
" window:"),
|
string_width("Could not change fonts in terminal window:"),
|
||||||
FALSE, &buttons_ok);
|
FALSE, &buttons_ok, trivial_post_dialog_fn, NULL);
|
||||||
sfree(msgboxtext);
|
sfree(msgboxtext);
|
||||||
sfree(errmsg);
|
sfree(errmsg);
|
||||||
} else {
|
} else {
|
||||||
|
@ -122,8 +122,9 @@ unsigned long getticks(void);
|
|||||||
/* The per-session frontend structure managed by gtkwin.c */
|
/* The per-session frontend structure managed by gtkwin.c */
|
||||||
struct gui_data;
|
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);
|
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 */
|
/* 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);
|
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,
|
GtkWidget *parentwin, const char *title, const char *msg, int minwid,
|
||||||
int selectable, const struct message_box_buttons *buttons,
|
int selectable, const struct message_box_buttons *buttons,
|
||||||
post_dialog_fn_t after, void *afterctx);
|
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
|
#endif
|
||||||
|
|
||||||
/* Things pterm.c needs from {ptermm,uxputty}.c */
|
/* Things pterm.c needs from {ptermm,uxputty}.c */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user