[anjuta] sourceview: Use LINE_TO_LOCATION macro instead of -1 debug-manager: Fixed a warning



commit 038bc0acaadfacd8afa24e4b309c48d1d1be99a1
Author: Johannes Schmid <jhs gnome org>
Date:   Sat May 1 11:43:42 2010 +0200

    sourceview: Use LINE_TO_LOCATION macro instead of -1
    debug-manager: Fixed a warning

 AUTHORS                             |    1 +
 plugins/debug-manager/breakpoints.c |    2 +-
 plugins/sourceview/sourceview.c     |    8 ++++----
 3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/AUTHORS b/AUTHORS
index 46dfb73..7d2393a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -108,6 +108,7 @@ Contributors:
 	Ross Golder  <ross golder org>
 	Roy Wood  <roy wood filogix com>
 	s|s  <supreet sethi gmail com>
+	Saleem Ansari <tuxdna gmail com>
 	Séastien Côé  <cots01 gel usherb ca>
 	Sylvain Defresne  <sdefrense gmail com>
 	Stanislav Brabec  <sbrabec suse cz>
diff --git a/plugins/debug-manager/breakpoints.c b/plugins/debug-manager/breakpoints.c
index 79a48fc..b27a6ef 100644
--- a/plugins/debug-manager/breakpoints.c
+++ b/plugins/debug-manager/breakpoints.c
@@ -1629,7 +1629,7 @@ update_breakpoint(BreakpointsDBase *bd, IAnjutaEditor *te, gchar *uri, guint lin
 	 * Try to find right mark (it could have moved) first */
 	BreakpointItem *bi;
 	bi = breakpoints_dbase_find_breakpoint_from_mark (bd, te, line_number);
-	DEBUG_PRINT("breakpoints db %p, editor %p, uri %s, line_number %p, BreakpointItem %p", bd, te, uri, line_number, bi);
+	DEBUG_PRINT("breakpoints db %p, editor %p, uri %s, line_number %d, BreakpointItem %p", bd, te, uri, line_number, bi);
 	if (bi == NULL)
 	{
 		bi = breakpoints_dbase_find_breakpoint_from_line (bd, uri, line_number);
diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c
index 1567c2f..5d482f3 100644
--- a/plugins/sourceview/sourceview.c
+++ b/plugins/sourceview/sourceview.c
@@ -321,9 +321,9 @@ static void on_backspace (GtkTextView* view,
 
 static void
 on_line_mark_activated(GtkTextView* view,
-								   GtkTextIter   *iter,
-								   GdkEventButton *event,
-								   Sourceview* sv)
+                       GtkTextIter   *iter,
+                       GdkEventButton *event,
+                       Sourceview* sv)
 {
 	/* proceed only if its a double click with left button*/
 	if( (event->button != 1) || (GDK_2BUTTON_PRESS != event->type) ) {
@@ -331,7 +331,7 @@ on_line_mark_activated(GtkTextView* view,
 	}
 
 	/* line number starts with 0, so add 1 */
-	gint line_number = gtk_text_iter_get_line(iter)+1;
+	gint line_number = LINE_TO_LOCATION(gtk_text_iter_get_line(iter));
 
 	if (!IANJUTA_IS_EDITOR(sv))
 	{



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