*/
#include <stdlib.h>
+#include <gtk/gtk.h> /* To define GTK_CHECK_VERSION */
#include "cellrenderericon.h"
#include "intl.h"
if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED)
{
+#if GTK_CHECK_VERSION(2,20,0)
+ if (gtk_widget_has_focus(widget))
+#else
if (GTK_WIDGET_HAS_FOCUS(widget))
+#endif
state = GTK_STATE_SELECTED;
else
state = GTK_STATE_ACTIVE;
}
else
{
+#if GTK_CHECK_VERSION(2,20,0)
+ if (gtk_widget_get_state(widget) == GTK_STATE_INSENSITIVE)
+#else
if (GTK_WIDGET_STATE(widget) == GTK_STATE_INSENSITIVE)
+#endif
state = GTK_STATE_INSENSITIVE;
else
state = GTK_STATE_NORMAL;
}
}
+#if GTK_CHECK_VERSION(2,20,0)
+ if (cellicon->focused && gtk_widget_has_focus(widget))
+#else
if (cellicon->focused && GTK_WIDGET_HAS_FOCUS(widget))
+#endif
{
gtk_paint_focus(widget->style, window,
state,