anjuta r3568 - in trunk: . plugins/sourceview



Author: jhs
Date: Sat Feb  2 08:41:43 2008
New Revision: 3568
URL: http://svn.gnome.org/viewvc/anjuta?rev=3568&view=rev

Log:
2008-02-02  Johannes Schmid <jhs gnome org>

	* configure.in: Require GtkSourceView 2.1.2
	* plugins/sourceview/sourceview-prefs.c: (init_colors_and_fonts):
	* plugins/sourceview/sourceview.c: (mark_real), (imark_unmark),
	(imark_is_marker_set), (imark_delete_all_markers),
	(ibookmark_toggle), (goto_bookmark), (ibookmark_clear_all):
	
	Adapted to API changes in GtkSourceView

Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/plugins/sourceview/sourceview-prefs.c
   trunk/plugins/sourceview/sourceview.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Sat Feb  2 08:41:43 2008
@@ -46,7 +46,7 @@
 LIBGRAPHVIZ_REQUIRED=1.0
 NEON_REQUIRED=0.24.5
 SUBVERSION_REQUIRED=1.0.2
-GTKSOURCEVIEW_REQUIRED=2.1.0
+GTKSOURCEVIEW_REQUIRED=2.1.2
 GTKSOURCEVIEW_GNOME_REQUIRED=2.14
 GTKSOURCEVIEW_GTK_REQUIRED=2.10
 BINUTILS_REQUIRED=2.15.92

Modified: trunk/plugins/sourceview/sourceview-prefs.c
==============================================================================
--- trunk/plugins/sourceview/sourceview-prefs.c	(original)
+++ trunk/plugins/sourceview/sourceview-prefs.c	Sat Feb  2 08:41:43 2008
@@ -299,11 +299,10 @@
 		g_free (desktop_fixed_font);
 		g_object_unref (gclient);
 	}
-	
-	if (!color_theme)
-	{
-		on_gconf_notify_color(NULL, 0, NULL, sv);
-	}
+ 	if (!color_theme)
+  		on_gconf_notify_color (NULL, 0, NULL, sv);
+	else
+		anjuta_view_set_colors(sv->priv->view, TRUE, NULL, NULL, NULL, NULL);
 }
 
 static int
@@ -320,7 +319,7 @@
 	prefs = sv->priv->prefs;
 	
 	/* Init */
-		gtk_source_buffer_set_highlight_syntax(GTK_SOURCE_BUFFER(sv->priv->document), get_key(sv, HIGHLIGHT_SYNTAX));
+  gtk_source_buffer_set_highlight_syntax(GTK_SOURCE_BUFFER(sv->priv->document), get_key(sv, HIGHLIGHT_SYNTAX));
 	gtk_source_view_set_highlight_current_line(GTK_SOURCE_VIEW(sv->priv->view),
 																						 get_key(sv, HIGHLIGHT_CURRENT_LINE));
 	gtk_source_view_set_tab_width(GTK_SOURCE_VIEW(sv->priv->view), get_key(sv, TAB_SIZE));

Modified: trunk/plugins/sourceview/sourceview.c
==============================================================================
--- trunk/plugins/sourceview/sourceview.c	(original)
+++ trunk/plugins/sourceview/sourceview.c	Sat Feb  2 08:41:43 2008
@@ -1468,7 +1468,7 @@
 	name = CREATE_MARK_NAME (marker_count);
 	
 	
-	source_mark = gtk_source_buffer_create_mark(GTK_SOURCE_BUFFER(sv->priv->document), 
+	source_mark = gtk_source_buffer_create_source_mark(GTK_SOURCE_BUFFER(sv->priv->document), 
 												name, category, &iter);
 	
 	g_source_remove (svmark->source);
@@ -1513,7 +1513,7 @@
 	gtk_text_buffer_get_iter_at_line (GTK_TEXT_BUFFER (buffer), &begin, LOCATION_TO_LINE (location));
 	gtk_text_buffer_get_iter_at_line (GTK_TEXT_BUFFER (buffer), &end, LOCATION_TO_LINE (location));
 	
-	gtk_source_buffer_remove_marks (buffer, &begin, &end, marker_types[marker]);
+	gtk_source_buffer_remove_source_marks (buffer, &begin, &end, marker_types[marker]);
 	
 }
 
@@ -1526,7 +1526,7 @@
 	GSList* markers;
 	gboolean retval;
 	
-	markers = gtk_source_buffer_get_marks_at_line (buffer, 
+	markers = gtk_source_buffer_get_source_marks_at_line (buffer, 
 												   LOCATION_TO_LINE (location), 
 												   marker_types[marker]);	
 	
@@ -1572,7 +1572,7 @@
 	gtk_text_buffer_get_iter_at_offset (GTK_TEXT_BUFFER (buffer), &begin, 0);
 	gtk_text_buffer_get_iter_at_offset (GTK_TEXT_BUFFER (buffer), &end, -1);
 	
-	gtk_source_buffer_remove_marks (buffer, &begin, &end, marker_types[marker]);
+	gtk_source_buffer_remove_source_marks (buffer, &begin, &end, marker_types[marker]);
 }
 
 static void
@@ -1651,7 +1651,7 @@
 	
 	GSList* markers;
 	
-	markers = gtk_source_buffer_get_marks_at_line (buffer, LOCATION_TO_LINE (location),
+	markers = gtk_source_buffer_get_source_marks_at_line (buffer, LOCATION_TO_LINE (location),
 												   marker_types[IANJUTA_MARKABLE_BOOKMARK]);
 	if (markers != NULL)
 	{
@@ -1661,7 +1661,7 @@
 		gtk_text_buffer_get_iter_at_line (GTK_TEXT_BUFFER (buffer), &begin, LOCATION_TO_LINE (location));
 		gtk_text_buffer_get_iter_at_line (GTK_TEXT_BUFFER (buffer), &end, LOCATION_TO_LINE (location));
 		
-		gtk_source_buffer_remove_marks (buffer, &begin, &end, 
+		gtk_source_buffer_remove_source_marks (buffer, &begin, &end, 
 										marker_types[IANJUTA_MARKABLE_BOOKMARK]);
 	}
 	else
@@ -1672,7 +1672,7 @@
 															 &line, LOCATION_TO_LINE (location));
 		
 		bookmark = 
-			gtk_source_buffer_create_mark (buffer, NULL,
+			gtk_source_buffer_create_source_mark (buffer, NULL,
 											 marker_types [IANJUTA_MARKABLE_BOOKMARK],
 											 &line);
 	}
@@ -1685,10 +1685,10 @@
 	gboolean found = FALSE;
 	
 	if (backward)
-		found = gtk_source_buffer_backward_iter_to_mark (buffer, iter, 
+		found = gtk_source_buffer_backward_iter_to_source_mark (buffer, iter, 
 														 marker_types[IANJUTA_MARKABLE_BOOKMARK]);
 	else
-		found = gtk_source_buffer_forward_iter_to_mark (buffer, iter, 
+		found = gtk_source_buffer_forward_iter_to_source_mark (buffer, iter, 
 														marker_types[IANJUTA_MARKABLE_BOOKMARK]);
 	if (found)
 	{
@@ -1762,7 +1762,7 @@
 	gtk_text_buffer_get_iter_at_offset (GTK_TEXT_BUFFER (buffer), &begin, 0);
 	gtk_text_buffer_get_iter_at_offset (GTK_TEXT_BUFFER (buffer), &end, -1);
 	
-	gtk_source_buffer_remove_marks (buffer, &begin, &end, marker_types[IANJUTA_MARKABLE_BOOKMARK]);
+	gtk_source_buffer_remove_source_marks (buffer, &begin, &end, marker_types[IANJUTA_MARKABLE_BOOKMARK]);
 }
 
 static void



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