[gedit-code-assistance] Ensure the tags



commit 97ec876195699cb05c2cd65648119f99c4b7a40b
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date:   Mon Feb 4 12:18:37 2013 +0100

    Ensure the tags

 src/gcp-diagnostic-tags.vala |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/src/gcp-diagnostic-tags.vala b/src/gcp-diagnostic-tags.vala
index ec2f6c4..ad2fcd2 100644
--- a/src/gcp-diagnostic-tags.vala
+++ b/src/gcp-diagnostic-tags.vala
@@ -96,17 +96,11 @@ namespace Gcp
 			           "Gcp.Error",
 			           colors.error_color);
 
-			if (d_locationTag == null)
-			{
-				d_locationTag = d_buffer.create_tag("Gcp.Location",
-				                                    weight: Pango.Weight.BOLD);
-			}
+			ensure_tag(ref d_locationTag, "Gcp.Location");
+			d_locationTag.weight = Pango.Weight.BOLD;
 
-			if (d_fixitTag == null)
-			{
-				d_fixitTag = d_buffer.create_tag("Gcp.Fixit",
-				                                 strikethrough: true);
-			}
+			ensure_tag(ref d_fixitTag, "Gcp.Fixit");
+			d_fixitTag.strikethrough = true;
 		}
 
 		public TextTag? error_tag



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]