diff --git a/src/post_modules/GTK/source/global.pre b/src/post_modules/GTK/source/global.pre index 9d6e3d9eb5b76033fecccb655613da1f24f8b9c6..ba1b3b150ea5e170de94a0c5880017713bde967c 100644 --- a/src/post_modules/GTK/source/global.pre +++ b/src/post_modules/GTK/source/global.pre @@ -10,6 +10,28 @@ static void socket_ready_callback(int fd, void *f) g_main_iteration(1); } +/* Not used in this file, really, but we need the require + * 'preprocessor' stuff.. + */ + +int IS_OBJECT_PROGRAM(struct program *X) +{ + return !(((X) == pgtk_style_program) + || ((X) == pgtk_CTreeNode_program) + || ((X) == pgtk_CTreeRow_program) + || ((X) == pgtk_selection_data_program) +require gtkextra; + /* Only when we have GTK+Extra (a lot of stuff in there that + * is not really objects... I don't really like it... + */ + || ((X) == pgtk_icon_list_item_program) + || ((X) == pgtk_plot_dataset_program) + || ((X) == pgtk_psfont_program) + || ((X) == pgtk_sheet_child_program) +endrequire; + ); +} + static void backend_callback() { next_timeout = current_time; diff --git a/src/post_modules/GTK/source/support.c b/src/post_modules/GTK/source/support.c index 216798b3a46b9f57166bb936db458c2c4323ef77..707b4b71e0e6a7afb6fc433588554e8f8d60bf44 100644 --- a/src/post_modules/GTK/source/support.c +++ b/src/post_modules/GTK/source/support.c @@ -307,15 +307,7 @@ GdkImage *gdkimage_from_pikeimage( struct object *img, int fast, GdkImage *i ) return i; } -#define IS_OBJECT_PROGRAM(X) \ -!( ((X) == pgtk_style_program) \ -|| ((X) == pgtk_CTreeNode_program) \ -|| ((X) == pgtk_CTreeRow_program) \ -|| ((X) == pgtk_icon_list_item_program) \ -|| ((X) == pgtk_plot_dataset_program) \ -|| ((X) == pgtk_psfont_program) \ -|| ((X) == pgtk_selection_data_program) \ -|| ((X) == pgtk_sheet_child_program)) +int IS_OBJECT_PROGRAM(struct program *X); void push_gtkobjectclass(void *obj, struct program *def) {