mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 05:22:47 -05:00
Stop using GtkDialog (for most purposes) in GTK 3!
They've now deprecated gtk_dialog_get_action_area, because they really want a dialog box's action area to be filled with nothing but buttons controlled by GTK which end the dialog with a response code. But we're accustomed to putting all sorts of other things in our action area - non-buttons, buttons that don't end the dialog, and sub-widgets that do layout - and so I think it's no longer sensible to be trying to coerce our use cases into GtkDialog. Hence, I'm introducing a set of wrapper functions which equivocate between a GtkDialog for GTK1 and GTK2, and a GtkWindow with a vbox in it for GTK3, and I'll lay out the action area by hand. (Not everything has sensible layout and margins in the new GTK3 system yet, but I can sort that out later.) Because the new functions are needed by gtkask.c, which doesn't link against gtkdlg.c or include putty.h, I've put them in a new source file and header file pair gtkmisc.[ch] which is common to gtkask and the main GTK edifice.
This commit is contained in:
15
unix/gtkmisc.h
Normal file
15
unix/gtkmisc.h
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Miscellaneous helper functions for GTK.
|
||||
*/
|
||||
|
||||
#ifndef PUTTY_GTKMISC_H
|
||||
#define PUTTY_GTKMISC_H
|
||||
|
||||
GtkWidget *our_dialog_new(void);
|
||||
void our_dialog_add_to_content_area(GtkWindow *dlg, GtkWidget *w,
|
||||
gboolean expand, gboolean fill,
|
||||
guint padding);
|
||||
void our_dialog_set_action_area(GtkWindow *dlg, GtkWidget *w);
|
||||
GtkBox *our_dialog_make_action_hbox(GtkWindow *dlg);
|
||||
|
||||
#endif /* PUTTY_GTKMISC_H */
|
Reference in New Issue
Block a user