r1375@localhost: muntyan | 2005-12-13 01:12:39 -0600

Disable need_last_tag check in compile time for gtk >= 2.8.0
master
Yevgen Muntyan 2005-12-14 07:01:40 +00:00
parent 38816217a4
commit 051df24aa6
1 changed files with 18 additions and 14 deletions

View File

@ -208,6 +208,24 @@ apply_tag (MooHighlighter *hl,
}
#if !GTK_CHECK_VERSION(2,8,0)
static void
check_last_tag (MooHighlighter *hl)
{
if (hl->last_tag && hl->need_last_tag)
{
gboolean fg_set;
g_object_get (hl->last_tag, "foreground-set", &fg_set, NULL);
g_object_set (hl->last_tag, "foreground-set", fg_set, NULL);
}
hl->last_tag = NULL;
}
#else
#define check_last_tag(hl)
#endif
MooHighlighter*
moo_highlighter_new (GtkTextBuffer *buffer,
LineBuffer *line_buf,
@ -531,20 +549,6 @@ hl_compute_line (MooHighlighter *hl,
}
static void
check_last_tag (MooHighlighter *hl)
{
if (hl->last_tag && hl->need_last_tag)
{
gboolean fg_set;
g_object_get (hl->last_tag, "foreground-set", &fg_set, NULL);
g_object_set (hl->last_tag, "foreground-set", fg_set, NULL);
}
hl->last_tag = NULL;
}
static gboolean
hl_compute_range (MooHighlighter *hl,
Interval *lines,