[gtksourceview/wip/gutter-style: 4/6] Various small code clean-ups
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/gutter-style: 4/6] Various small code clean-ups
- Date: Fri, 15 Aug 2014 16:01:31 +0000 (UTC)
commit b51c1a3cbc46e103c823864836c3bfc2ab58d111
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Aug 13 17:36:25 2014 +0200
Various small code clean-ups
gtksourceview/gtksourcegutter.c | 3 +--
gtksourceview/gtksourcestylescheme.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutter.c b/gtksourceview/gtksourcegutter.c
index 90ea9d1..1cff5c7 100644
--- a/gtksourceview/gtksourcegutter.c
+++ b/gtksourceview/gtksourcegutter.c
@@ -968,8 +968,6 @@ on_view_draw (GtkSourceView *view,
gtk_cairo_transform_to_window (cr, GTK_WIDGET (view), window);
- text_view = GTK_TEXT_VIEW (view);
-
if (!gdk_cairo_get_clip_rectangle (cr, &clip))
{
return FALSE;
@@ -977,6 +975,7 @@ on_view_draw (GtkSourceView *view,
gutter->priv->is_drawing = TRUE;
+ text_view = GTK_TEXT_VIEW (view);
buffer = gtk_text_view_get_buffer (text_view);
y1 = clip.y;
diff --git a/gtksourceview/gtksourcestylescheme.c b/gtksourceview/gtksourcestylescheme.c
index 55a8725..357f0ad 100644
--- a/gtksourceview/gtksourcestylescheme.c
+++ b/gtksourceview/gtksourcestylescheme.c
@@ -792,7 +792,7 @@ get_css_color_style (GtkSourceStyle *style,
{
gchar *bg_color;
bg_color = gdk_rgba_to_string (&color);
- *bg = g_strdup_printf ("%s: %s;\n", "background-color", bg_color);
+ *bg = g_strdup_printf ("background-color: %s;\n", bg_color);
g_free (bg_color);
}
else
@@ -804,7 +804,7 @@ get_css_color_style (GtkSourceStyle *style,
{
gchar *text_color;
text_color = gdk_rgba_to_string (&color);
- *text = g_strdup_printf ("%s: %s;\n", "color", text_color);
+ *text = g_strdup_printf ("color: %s;\n", text_color);
g_free (text_color);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]