[gtksourceview] Remove GtkSourceIter as now the insensitive search is in gtk+.



commit d83f64f08eeb9aff5815a8b27684625c679066bc
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Nov 1 13:20:41 2010 +0100

    Remove GtkSourceIter as now the insensitive search is in gtk+.

 docs/reference/gtksourceview-2.0-sections.txt |   10 -
 gtksourceview/Makefile.am                     |    2 -
 gtksourceview/gtksourcebuffer.c               |    1 -
 gtksourceview/gtksourceiter.c                 |  805 -------------------------
 gtksourceview/gtksourceiter.h                 |   54 --
 tests/test-widget.c                           |   25 +-
 tests/test-widget.py                          |   12 +-
 7 files changed, 18 insertions(+), 891 deletions(-)
---
diff --git a/docs/reference/gtksourceview-2.0-sections.txt b/docs/reference/gtksourceview-2.0-sections.txt
index dc3209a..119a381 100644
--- a/docs/reference/gtksourceview-2.0-sections.txt
+++ b/docs/reference/gtksourceview-2.0-sections.txt
@@ -285,16 +285,6 @@ gtk_source_style_scheme_get_type
 </SECTION>
 
 <SECTION>
-<FILE>iter</FILE>
-<TITLE>Searching in a GtkSourceBuffer</TITLE>
-<INCLUDE>gtksourceview/gtksourceiter.h</INCLUDE>
-GtkSourceSearchFlags
-gtk_source_iter_backward_search
-gtk_source_iter_forward_search
-<SUBSECTION Standard>
-</SECTION>
-
-<SECTION>
 <FILE>printcompositor</FILE>
 <TITLE>GtkSourcePrintCompositor</TITLE>
 <INCLUDE>gtksourceview/gtksourceprintcompositor.h</INCLUDE>
diff --git a/gtksourceview/Makefile.am b/gtksourceview/Makefile.am
index f330112..77710c0 100644
--- a/gtksourceview/Makefile.am
+++ b/gtksourceview/Makefile.am
@@ -29,7 +29,6 @@ libgtksourceview_headers =			\
 	gtksourcecompletionproposal.h		\
 	gtksourcecompletionprovider.h		\
 	gtksourcegutter.h			\
-	gtksourceiter.h				\
 	gtksourcelanguage.h			\
 	gtksourcelanguagemanager.h		\
 	gtksourcemark.h				\
@@ -68,7 +67,6 @@ libgtksourceview_c_files = \
 	gtksourcecontextengine.c	\
 	gtksourceengine.c		\
 	gtksourcegutter.c		\
-	gtksourceiter.c			\
 	gtksourcelanguage.c 		\
 	gtksourcelanguagemanager.c 	\
 	gtksourcelanguage-parser-1.c	\
diff --git a/gtksourceview/gtksourcebuffer.c b/gtksourceview/gtksourcebuffer.c
index e88aebd..ac97897 100644
--- a/gtksourceview/gtksourcebuffer.c
+++ b/gtksourceview/gtksourcebuffer.c
@@ -35,7 +35,6 @@
 #include "gtksourcebuffer.h"
 #include "gtksourceundomanager.h"
 #include "gtksourceview-marshal.h"
-#include "gtksourceiter.h"
 #include "gtksourcestyleschememanager.h"
 #include "gtksourcestyle-private.h"
 #include "gtksourceundomanagerdefault.h"
diff --git a/tests/test-widget.c b/tests/test-widget.c
index ba0b408..43709ec 100644
--- a/tests/test-widget.c
+++ b/tests/test-widget.c
@@ -35,7 +35,6 @@
 #include <gtksourceview/gtksourcelanguagemanager.h>
 #include <gtksourceview/gtksourcestyleschememanager.h>
 #include <gtksourceview/gtksourceprintcompositor.h>
-#include <gtksourceview/gtksourceiter.h>
 #include <gtksourceview/gtksourceview-typebuiltins.h>
 #ifdef TEST_XML_MEM
 #include <libxml/xmlreader.h>
@@ -711,11 +710,11 @@ backward_string_cb (GtkAction *action,
 static struct {
 	char *what;
 	char *replacement;
-	GtkSourceSearchFlags flags;
+	GtkTextSearchFlags flags;
 } search_data = {
 	NULL,
 	NULL,
-	GTK_SOURCE_SEARCH_CASE_INSENSITIVE
+	GTK_TEXT_SEARCH_CASE_INSENSITIVE
 };
 
 static gboolean
@@ -723,7 +722,7 @@ search_dialog (GtkWidget            *widget,
 	       gboolean              replace,
 	       char                **what_p,
 	       char                **replacement_p,
-	       GtkSourceSearchFlags *flags_p)
+	       GtkTextSearchFlags   *flags_p)
 {
 	GtkWidget *dialog;
 	GtkEntry *entry1, *entry2;
@@ -757,7 +756,7 @@ search_dialog (GtkWidget            *widget,
 	case_sensitive = g_object_new (GTK_TYPE_CHECK_BUTTON,
 				       "visible", TRUE,
 				       "label", "Case sensitive",
-				       "active", !(search_data.flags & GTK_SOURCE_SEARCH_CASE_INSENSITIVE),
+				       "active", !(search_data.flags & GTK_TEXT_SEARCH_CASE_INSENSITIVE),
 				       NULL);
 	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
 			    GTK_WIDGET (case_sensitive), FALSE, FALSE, 0);
@@ -779,7 +778,7 @@ search_dialog (GtkWidget            *widget,
 	g_free (search_data.replacement);
 	*replacement_p = search_data.replacement = g_strdup (gtk_entry_get_text (entry2));
 	*flags_p = search_data.flags = gtk_toggle_button_get_active (case_sensitive) ?
-					0 : GTK_SOURCE_SEARCH_CASE_INSENSITIVE;
+					0 : GTK_TEXT_SEARCH_CASE_INSENSITIVE;
 
 	gtk_widget_destroy (dialog);
 	return TRUE;
@@ -792,7 +791,7 @@ do_search_replace (GtkTextView *view,
 	GtkTextBuffer *buffer = gtk_text_view_get_buffer (view);
 	GtkTextIter iter;
 	char *what, *replacement;
-	GtkSourceSearchFlags flags;
+	GtkTextSearchFlags flags;
 
 	if (!search_dialog (GTK_WIDGET (view), replace, &what, &replacement, &flags))
 		return;
@@ -805,10 +804,10 @@ do_search_replace (GtkTextView *view,
 		{
 			GtkTextIter match_start, match_end;
 
-			if (!gtk_source_iter_forward_search (&iter, what, flags,
-							     &match_start,
-							     &match_end,
-							     NULL))
+			if (!gtk_text_iter_forward_search (&iter, what, flags,
+							   &match_start,
+							   &match_end,
+							   NULL))
 			{
 				break;
 			}
@@ -824,7 +823,7 @@ do_search_replace (GtkTextView *view,
 
 		gtk_text_buffer_get_iter_at_mark (buffer, &iter, gtk_text_buffer_get_insert (buffer));
 
-		if (gtk_source_iter_forward_search (&iter, what, flags, &match_start, &match_end, NULL))
+		if (gtk_text_iter_forward_search (&iter, what, flags, &match_start, &match_end, NULL))
 		{
 			gtk_text_buffer_select_range (buffer, &match_start, &match_end);
 		}
@@ -832,7 +831,7 @@ do_search_replace (GtkTextView *view,
 		{
 			GtkTextIter insert = iter;
 			gtk_text_buffer_get_start_iter (buffer, &iter);
-			if (gtk_source_iter_forward_search (&iter, what, flags, &match_start, &match_end, &insert))
+			if (gtk_text_iter_forward_search (&iter, what, flags, &match_start, &match_end, &insert))
 				gtk_text_buffer_select_range (buffer, &match_start, &match_end);
 		}
 	}
diff --git a/tests/test-widget.py b/tests/test-widget.py
index 255e43e..e38aebd 100644
--- a/tests/test-widget.py
+++ b/tests/test-widget.py
@@ -376,16 +376,16 @@ class Window(Gtk.Window):
         if dialog.run_search():
             i = self._buf.get_iter_at_mark(self._buf.get_insert())
 
-            searched, start, end = GtkSource.iter_forward_search(i, dialog.get_search_text(),
-                                                                 search_flags, None)
+            searched, start, end = i.forward_search(dialog.get_search_text(),
+                                                    search_flags, None)
             if searched:
                 self._buf.select_range(start, end)
             else:
                 end = i
                 i = self._buf.get_start_iter()
 
-                searched, start, end = GtkSource.iter_forward_search(i, dialog.get_search_text(),
-                                                                     search_flags, end)
+                searched, start, end = i.forward_search(dialog.get_search_text(),
+                                                        search_flags, end)
                 if searched:
                     self._buf.select_range(start, end)
 
@@ -400,8 +400,8 @@ class Window(Gtk.Window):
         i = self._buf.get_start_iter()
 
         while True:
-            searched, start, end = GtkSource.iter_forward_search(i, dialog.get_search_text(),
-                                                                 search_flags, None)
+            searched, start, end = i.forward_search(dialog.get_search_text(),
+                                                    search_flags, None)
 
             if not searched:
                 break



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