diff -r dadd62632e4a -r 2a390d401448 pidgin/gtk3compat.h --- a/pidgin/gtk3compat.h Mon Nov 10 16:17:31 2014 -0500 +++ b/pidgin/gtk3compat.h Tue Nov 11 00:54:39 2014 -0500 @@ -77,7 +77,7 @@ gtk_color_button_get_color(GTK_COLOR_BUTTON(widget), color); } -#else +#else /* 3.4.0 */ static inline void pidgin_color_chooser_set_rgb(GtkColorChooser *chooser, const GdkColor *rgb) @@ -106,6 +106,57 @@ #endif /* 3.4.0 and gtk_color_chooser_ */ +#if GTK_CHECK_VERSION(3,0,0) + +static inline GtkWidget * +gtk_grid_table_new(guint rows, guint columns) +{ + return gtk_grid_new(); +} + +static inline void +gtk_grid_attach_defaults(GtkGrid *grid, GtkWidget *child, gint left, gint top, + gint width, gint height) +{ + gtk_grid_attach(grid, child, left, top, width, height); + gtk_widget_set_hexpand(child, TRUE); + gtk_widget_set_vexpand(child, TRUE); +} + +#else /* 3.0.0 and gtk_grid_ */ + +#define GTK_GRID GTK_TABLE +#define GtkGrid GtkTable + +static inline GtkWidget * +gtk_grid_table_new(guint rows, guint columns) +{ + return gtk_table_new(rows, columns, FALSE); +} + +static inline void +gtk_grid_set_row_spacing(GtkGrid *grid, guint spacing) +{ + gtk_table_set_row_spacings(grid, spacing); +} + +static inline void +gtk_grid_set_column_spacing(GtkGrid *grid, guint spacing) +{ + gtk_table_set_col_spacings(grid, spacing); +} + +static inline void +gtk_grid_attach_defaults(GtkGrid *grid, GtkWidget *child, gint left, gint top, + gint width, gint height) +{ + gtk_table_attach_defaults(grid, child, left, left + width, + top, top + height); +} + +#endif /* 3.0.0 and gtk_grid_ */ + + #if !GTK_CHECK_VERSION(3,2,0) #define GTK_FONT_CHOOSER GTK_FONT_SELECTION_DIALOG