Commit 5dc9fce1 authored by Andreas J. Guelzow 's avatar Andreas J. Guelzow

Work around non-exisiting GTL_STATE_FLAG_LINK for old GTK.

parent 53beef13
2018-10-23 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* src/gui-util.c (gnm_get_link_color): make conditional on definition
of GTK_STATE_FLAG_LINK
2018-10-13 Morten Welinder <terra@gnome.org>
* src/dependent.c (workbook_recalc): Evaluate cells before other
......
......@@ -1377,11 +1377,20 @@ gnm_style_context_get_color (GtkStyleContext *context,
gtk_style_context_restore (context);
}
#ifdef GTK_STATE_FLAG_LINK
void
gnm_get_link_color (GtkWidget *widget, GdkRGBA *res)
{
GtkStyleContext *ctxt = gtk_widget_get_style_context (widget);
gnm_style_context_get_color (ctxt, GTK_STATE_FLAG_LINK, res);
}
#else
void
gnm_get_link_color (G_GNUC_UNUSED GtkWidget *widget, GdkRGBA *res)
{
gdk_rgba_parse (res, "blue");
#warning GTK_STATE_FLAG_LINK is undefined, using color blue
}
#endif /* GTK_STATE_FLAG_LINK */
// ----------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment