Fix GtkComboBoxEntry in 'netstatus' plugin.
[lxde/lxpanel.git] / src / gtk-compat.h
CommitLineData
8a4622e5
AG
1/**
2 * Copyright (c) 2014 LxDE Developers, see the file AUTHORS for details.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#ifndef __GTK_COMPAT_H__
20#define __GTK_COMPAT_H__ 1
21
22/* compatibility things */
1b0b42f7
AG
23#if !GTK_CHECK_VERSION(2, 20, 0)
24# define gtk_widget_get_realized GTK_WIDGET_REALIZED
25# define gtk_widget_get_mapped GTK_WIDGET_MAPPED
26#endif
27
8a4622e5 28#if !GTK_CHECK_VERSION(2, 21, 0)
1b0b42f7
AG
29# define GDK_KEY_Tab GDK_Tab
30# define GDK_KEY_space GDK_space
31# define GDK_KEY_Return GDK_Return
32# define GDK_KEY_KP_Enter GDK_KP_Enter
33#endif
34
35#if !GTK_CHECK_VERSION(2, 22, 0)
36# define gtk_button_get_event_window(a) a->event_window
37# define gdk_visual_get_depth(a) a->depth
38#endif
39
40#if !GTK_CHECK_VERSION(2, 24, 0)
41# define gdk_window_get_screen gdk_drawable_get_screen
8a4622e5
AG
42#endif
43
97088cd4
AG
44#if GTK_CHECK_VERSION(3, 0, 0)
45# define GTK_DIALOG_NO_SEPARATOR 0
46#endif
47
8a4622e5 48#endif