From 290a4853102e645d76318e8e09ef45420a6559bc Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 7 Sep 2010 10:46:12 +0100 Subject: Remove calls to gtk_dialog_set_has_separator() if building against GTK+ 3 gtk_dialog_set_has_separator() has been removed in GTK+ 3, but can't be removed (or the property's default value changed) in GTK+ 2 without breaking API. This adds a wrapper macro to keep the calls when building against GTK+ 2, and remove them when building against GTK+ 3. --- libempathy-gtk/empathy-ui-utils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libempathy-gtk/empathy-ui-utils.h') diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h index 0b76d09a3..43da188db 100644 --- a/libempathy-gtk/empathy-ui-utils.h +++ b/libempathy-gtk/empathy-ui-utils.h @@ -129,6 +129,22 @@ void empathy_window_iconify (GtkWindow *windo GtkStatusIcon *status_icon); GtkWindow * empathy_get_toplevel_window (GtkWidget *widget); +/** + * empathy_dialog_remove_separator: + * @d: a #GtkDialog + * + * Replacement for gtk_dialog_set_has_separator(), which was removed for GTK+ 3. + * This is a no-op for GTK+ 3, and expands to a call to + * gtk_dialog_set_has_separator() with %FALSE for GTK+ 2. + * + * FIXME: Once we depend on GTK+ 3 unconditionally, this macro can be removed. + */ +#ifndef HAVE_GTK3 +#define empathy_dialog_remove_separator(d) gtk_dialog_set_has_separator(d, FALSE); +#else +#define empathy_dialog_remove_separator(d) +#endif + /* URL */ gchar * empathy_make_absolute_url (const gchar *url); -- cgit v1.2.3