[gtksourceview/wip/new-space-drawing-api] view: queue draw when the SpaceDrawer:matrix property changes
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/new-space-drawing-api] view: queue draw when the SpaceDrawer:matrix property changes
- Date: Sun, 25 Sep 2016 14:26:59 +0000 (UTC)
commit 078e5abd8a292c5f5dac33b6b47f5f94bb64533c
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Sep 25 16:24:11 2016 +0200
view: queue draw when the SpaceDrawer:matrix property changes
gtksourceview/gtksourceview.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index b17512b..16eb83a 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -1264,6 +1264,14 @@ gtk_source_view_get_property (GObject *object,
}
static void
+space_drawer_notify_matrix_cb (GtkSourceSpaceDrawer *space_drawer,
+ GParamSpec *pspec,
+ GtkSourceView *view)
+{
+ gtk_widget_queue_draw (GTK_WIDGET (view));
+}
+
+static void
notify_buffer_cb (GtkSourceView *view)
{
set_source_buffer (view, gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
@@ -1293,6 +1301,11 @@ gtk_source_view_init (GtkSourceView *view)
view->priv->right_margin_overlay_color = NULL;
view->priv->space_drawer = _gtk_source_space_drawer_new ();
+ g_signal_connect_object (view->priv->space_drawer,
+ "notify::matrix",
+ G_CALLBACK (space_drawer_notify_matrix_cb),
+ view,
+ 0);
view->priv->mark_categories = g_hash_table_new_full (g_str_hash,
g_str_equal,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]