mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
GTK 3 prep: write a replacement for gtk_quit_add().
GTK 2 has deprecated it and provided no replacement; a bug tracker entry I found on the subject suggested that it was functionality that didn't really belong in GTK, and glib ought to provide a replacement instead, which would be a perfectly fine thing to suggest if they had waited for glib to get round to doing so *before* throwing out a function people were actually using. Sigh. Anyway, it turns out that subsidiary invocations of gtk_main() don't happen inside GTK as far as I can see, so all I need to do is to make sure my own invocations of gtk_main() are followed by a cleanup function which runs any quit functions that I've registered. That was the last deprecated GTK function, so we now build cleanly with -DGTK_DISABLE_DEPRECATED. (But, as mentioned a couple of commits ago, we still don't build with -DGDK_DISABLE_DEPRECATED, because that has migrating to Cairo drawing as a prerequisite.)
This commit is contained in:
@ -1094,6 +1094,7 @@ void dlg_error_msg(void *dlg, const char *msg)
|
||||
set_transient_window_pos(dp->window, window);
|
||||
gtk_widget_show(window);
|
||||
gtk_main();
|
||||
post_main();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3209,6 +3210,7 @@ int do_config_box(const char *title, Conf *conf, int midsession,
|
||||
G_CALLBACK(win_key_press), &dp);
|
||||
|
||||
gtk_main();
|
||||
post_main();
|
||||
|
||||
dlg_cleanup(&dp);
|
||||
sfree(selparams);
|
||||
@ -3314,6 +3316,7 @@ int messagebox(GtkWidget *parentwin, const char *title, const char *msg,
|
||||
G_CALLBACK(win_key_press), &dp);
|
||||
|
||||
gtk_main();
|
||||
post_main();
|
||||
|
||||
dlg_cleanup(&dp);
|
||||
ctrl_free_box(ctrlbox);
|
||||
|
Reference in New Issue
Block a user