[anjuta/gnome-3-0] language-support-vala: trivial fixes for glade dnd (bgo#645199)



commit 7876660a49f3e41a460566c271ae89a988a07760
Author: Abderrahim Kitouni <akitouni src gnome org>
Date:   Sat Apr 9 21:29:28 2011 +0100

    language-support-vala: trivial fixes for glade dnd (bgo#645199)

 plugins/language-support-vala/plugin.vala |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/language-support-vala/plugin.vala b/plugins/language-support-vala/plugin.vala
index 5e95a13..6ce701f 100644
--- a/plugins/language-support-vala/plugin.vala
+++ b/plugins/language-support-vala/plugin.vala
@@ -343,7 +343,7 @@ public class ValaPlugin : Plugin {
 			return;
 		Vala.Signal sig = (Vala.Signal) sigs.data;
 
-		builder.append_printf ("void %s (", handler_name);
+		builder.append_printf ("public void %s (", handler_name);
 
 		if (swapped) {
 			builder.append_printf ("%s sender", widget.get_full_name ());
@@ -366,7 +366,8 @@ public class ValaPlugin : Plugin {
 		var indenter = shell.get_object ("IAnjutaIndenter") as IAnjuta.Indenter;
 		if (indenter != null) {
 			var end = position.clone ();
-			end.set_position (end.get_position () + builder.str.char_count ());
+			/* -1 so we don't count the last newline (as that would indent the line after) */
+			end.set_position (end.get_position () + builder.str.char_count () - 1);
 			indenter.indent (position, end);
 		}
 



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