mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-04 21:12:47 -05:00
Make gtkask.c compile under GTK 1.
This is less than ideal - passphrase input now happens in ISO 8859-1, and the passphrase prompt window is neither centred nor always-on-top. But it basically works, and restores bare-minimum GTK 1 support to the codebase as a whole.
This commit is contained in:
22
unix/gtkcompat.h
Normal file
22
unix/gtkcompat.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Header file to make compatibility with older GTK versions less
|
||||
* painful, by #defining various things that are pure spelling changes
|
||||
* between GTK1 and GTK2.
|
||||
*/
|
||||
|
||||
#if !GTK_CHECK_VERSION(2,0,0)
|
||||
|
||||
#include <ctype.h>
|
||||
#include <X11/X.h>
|
||||
|
||||
#define G_CALLBACK(x) GTK_SIGNAL_FUNC(x)
|
||||
#define G_OBJECT(x) GTK_OBJECT(x)
|
||||
#define g_ascii_isspace(x) (isspace((unsigned char)(x)))
|
||||
#define g_signal_connect gtk_signal_connect
|
||||
#define GDK_GRAB_SUCCESS GrabSuccess
|
||||
#define gtk_dialog_get_content_area(dlg) ((dlg)->vbox)
|
||||
#define gtk_dialog_get_action_area(dlg) ((dlg)->action_area)
|
||||
#define gtk_widget_set_size_request gtk_widget_set_usize
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user