[gtksourceview] Redraw when style is updated
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Redraw when style is updated
- Date: Thu, 13 Jan 2011 21:09:19 +0000 (UTC)
commit 699a044e4851f19999ebcb390658277563ea9dae
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Thu Jan 13 22:08:32 2011 +0100
Redraw when style is updated
gtksourceview/gtksourcegutter.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutter.c b/gtksourceview/gtksourcegutter.c
index c628d10..63ff6f6 100644
--- a/gtksourceview/gtksourcegutter.c
+++ b/gtksourceview/gtksourcegutter.c
@@ -83,6 +83,7 @@ enum
LEAVE_NOTIFY_EVENT,
QUERY_TOOLTIP_EVENT,
REALIZE,
+ STYLE_UPDATED,
LAST_EXTERNAL_SIGNAL
};
@@ -132,6 +133,9 @@ static gboolean on_view_query_tooltip (GtkSourceView *view,
GtkTooltip *tooltip,
GtkSourceGutter *gutter);
+static void on_view_style_updated (GtkSourceView *view,
+ GtkSourceGutter *gutter);
+
static void do_redraw (GtkSourceGutter *gutter);
static void update_gutter_size (GtkSourceGutter *gutter);
@@ -334,6 +338,12 @@ set_view (GtkSourceGutter *gutter,
"realize",
G_CALLBACK (on_view_realize),
gutter);
+
+ gutter->priv->signals[STYLE_UPDATED] =
+ g_signal_connect (view,
+ "style-updated",
+ G_CALLBACK (on_view_style_updated),
+ gutter);
}
static void
@@ -1536,6 +1546,13 @@ on_view_query_tooltip (GtkSourceView *view,
tooltip);
}
+static void
+on_view_style_updated (GtkSourceView *view,
+ GtkSourceGutter *gutter)
+{
+ gtk_source_gutter_queue_draw (gutter);
+}
+
void
gtk_source_gutter_set_padding (GtkSourceGutter *gutter,
gint xpad,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]