#if !GTK_CHECK_VERSION (2, 18, 0)
#define gtk_widget_set_window(wdgt, wndw) wdgt->window = wndw
#define gtk_widget_get_allocation (wdgt, alloc) *alloc = wdgt->allocation
+ #define gtk_widget_is_drawable GTK_WIDGET_DRAWABLE
+#endif
+#if !GTK_CHECK_VERSION (2, 20, 0)
+ #define gtk_widget_set_realized(wdgt, real) \
+ if (real) GTK_WIDGET_SET_FLAGS (wdgt, GTK_REALIZED); \
+ else GTK_WIDGET_UNSET_FLAGS (wdgt, GTK_REALIZED)
#endif
#define DEFAULT_INTERVAL 50
KatzeScrolledPrivate* priv = scrolled->priv;
gboolean ret = FALSE;
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
if (event->window == priv->horizontal_scrollbar_window)
{
color.red = color.green = color.blue = 0x6666;
gdk_gc_set_rgb_fg_color (priv->shadow_gc, &color);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
}
static void
#if !GTK_CHECK_VERSION (2, 18, 0)
#define gtk_widget_get_allocation (wdgt, alloc) *alloc = wdgt->allocation
+ #define gtk_widget_set_has_window(wdgt, wnd) \
+ if (wnd) GTK_WIDGET_UNSET_FLAGS (wdgt, GTK_NO_WINDOW); \
+ else GTK_WIDGET_SET_FLAGS (wdgt, GTK_NO_WINDOW)
#endif
struct _KatzeThrobber
static void
katze_throbber_init (KatzeThrobber *throbber)
{
- GTK_WIDGET_SET_FLAGS (throbber, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (throbber), FALSE);
throbber->timer_id = -1;
}
#include <hildon/hildon.h>
#endif
+#if !GTK_CHECK_VERSION (2, 18, 0)
+ #define gtk_widget_get_has_window(wdgt) !GTK_WIDGET_NO_WINDOW (wdgt)
+#endif
+
static void
proxy_toggle_button_toggled_cb (GtkToggleButton* button,
GObject* object)
gint widget_height;
/* Retrieve size and position of both widget and menu */
- if (GTK_WIDGET_NO_WINDOW (widget))
+ if (!gtk_widget_get_has_window (widget))
{
gdk_window_get_position (widget->window, &wx, &wy);
wx += widget->allocation.x;