[gtksourceview/wip/gsv-4] SearchContext: remove forward/backward/replace deprecated API



commit 641c91bb93ccc563879c5202d743c833b2663686
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Nov 4 21:38:58 2016 +0100

    SearchContext: remove forward/backward/replace deprecated API

 docs/reference/gtksourceview-4.0-sections.txt |    5 -
 gtksourceview/gtksourcesearchcontext.c        |  175 +------------------------
 gtksourceview/gtksourcesearchcontext.h        |   34 -----
 3 files changed, 4 insertions(+), 210 deletions(-)
---
diff --git a/docs/reference/gtksourceview-4.0-sections.txt b/docs/reference/gtksourceview-4.0-sections.txt
index 23db4be..ff81eec 100644
--- a/docs/reference/gtksourceview-4.0-sections.txt
+++ b/docs/reference/gtksourceview-4.0-sections.txt
@@ -683,17 +683,12 @@ gtk_source_search_context_get_match_style
 gtk_source_search_context_set_match_style
 gtk_source_search_context_get_occurrences_count
 gtk_source_search_context_get_occurrence_position
-gtk_source_search_context_forward
 gtk_source_search_context_forward2
 gtk_source_search_context_forward_async
-gtk_source_search_context_forward_finish
 gtk_source_search_context_forward_finish2
-gtk_source_search_context_backward
 gtk_source_search_context_backward2
 gtk_source_search_context_backward_async
-gtk_source_search_context_backward_finish
 gtk_source_search_context_backward_finish2
-gtk_source_search_context_replace
 gtk_source_search_context_replace2
 gtk_source_search_context_replace_all
 gtk_source_search_context_get_regex_error
diff --git a/gtksourceview/gtksourcesearchcontext.c b/gtksourceview/gtksourcesearchcontext.c
index 37aa447..e459885 100644
--- a/gtksourceview/gtksourcesearchcontext.c
+++ b/gtksourceview/gtksourcesearchcontext.c
@@ -59,10 +59,10 @@
  * For each search, the buffer is scanned at most once. After that, navigating
  * through the occurrences doesn't require to re-scan the buffer entirely.
  *
- * To search forward, use gtk_source_search_context_forward() or
+ * To search forward, use gtk_source_search_context_forward2() or
  * gtk_source_search_context_forward_async() for the asynchronous version.
  * The backward search is done similarly. To replace a search match, or all
- * matches, use gtk_source_search_context_replace() and
+ * matches, use gtk_source_search_context_replace2() and
  * gtk_source_search_context_replace_all().
  *
  * The search occurrences are highlighted by default. To disable it, use
@@ -3205,34 +3205,6 @@ gtk_source_search_context_get_occurrence_position (GtkSourceSearchContext *searc
 }
 
 /**
- * gtk_source_search_context_forward:
- * @search: a #GtkSourceSearchContext.
- * @iter: start of search.
- * @match_start: (out) (optional): return location for start of match, or %NULL.
- * @match_end: (out) (optional): return location for end of match, or %NULL.
- *
- * Synchronous forward search. It is recommended to use the asynchronous
- * functions instead, to not block the user interface. However, if you are sure
- * that the @buffer is small, this function is more convenient to use.
- *
- * Returns: whether a match was found.
- * Since: 3.10
- * Deprecated: 3.22: Use gtk_source_search_context_forward2() instead.
- */
-gboolean
-gtk_source_search_context_forward (GtkSourceSearchContext *search,
-                                  const GtkTextIter      *iter,
-                                  GtkTextIter            *match_start,
-                                  GtkTextIter            *match_end)
-{
-       return gtk_source_search_context_forward2 (search,
-                                                  iter,
-                                                  match_start,
-                                                  match_end,
-                                                  NULL);
-}
-
-/**
  * gtk_source_search_context_forward2:
  * @search: a #GtkSourceSearchContext.
  * @iter: start of search.
@@ -3245,9 +3217,6 @@ gtk_source_search_context_forward (GtkSourceSearchContext *search,
  * functions instead, to not block the user interface. However, if you are sure
  * that the @buffer is small, this function is more convenient to use.
  *
- * The difference with gtk_source_search_context_forward() is that the
- * @has_wrapped_around out parameter has been added for convenience.
- *
  * If the #GtkSourceSearchSettings:wrap-around property is %FALSE, this function
  * doesn't try to wrap around.
  *
@@ -3353,36 +3322,6 @@ gtk_source_search_context_forward_async (GtkSourceSearchContext *search,
 }
 
 /**
- * gtk_source_search_context_forward_finish:
- * @search: a #GtkSourceSearchContext.
- * @result: a #GAsyncResult.
- * @match_start: (out) (optional): return location for start of match, or %NULL.
- * @match_end: (out) (optional): return location for end of match, or %NULL.
- * @error: a #GError, or %NULL.
- *
- * Finishes a forward search started with
- * gtk_source_search_context_forward_async().
- *
- * Returns: whether a match was found.
- * Since: 3.10
- * Deprecated: 3.22: Use gtk_source_search_context_forward_finish2() instead.
- */
-gboolean
-gtk_source_search_context_forward_finish (GtkSourceSearchContext  *search,
-                                         GAsyncResult            *result,
-                                         GtkTextIter             *match_start,
-                                         GtkTextIter             *match_end,
-                                         GError                 **error)
-{
-       return gtk_source_search_context_forward_finish2 (search,
-                                                         result,
-                                                         match_start,
-                                                         match_end,
-                                                         NULL,
-                                                         error);
-}
-
-/**
  * gtk_source_search_context_forward_finish2:
  * @search: a #GtkSourceSearchContext.
  * @result: a #GAsyncResult.
@@ -3458,34 +3397,6 @@ gtk_source_search_context_forward_finish2 (GtkSourceSearchContext  *search,
 }
 
 /**
- * gtk_source_search_context_backward:
- * @search: a #GtkSourceSearchContext.
- * @iter: start of search.
- * @match_start: (out) (optional): return location for start of match, or %NULL.
- * @match_end: (out) (optional): return location for end of match, or %NULL.
- *
- * Synchronous backward search. It is recommended to use the asynchronous
- * functions instead, to not block the user interface. However, if you are sure
- * that the @buffer is small, this function is more convenient to use.
- *
- * Returns: whether a match was found.
- * Since: 3.10
- * Deprecated: 3.22: Use gtk_source_search_context_backward2() instead.
- */
-gboolean
-gtk_source_search_context_backward (GtkSourceSearchContext *search,
-                                   const GtkTextIter      *iter,
-                                   GtkTextIter            *match_start,
-                                   GtkTextIter            *match_end)
-{
-       return gtk_source_search_context_backward2 (search,
-                                                   iter,
-                                                   match_start,
-                                                   match_end,
-                                                   NULL);
-}
-
-/**
  * gtk_source_search_context_backward2:
  * @search: a #GtkSourceSearchContext.
  * @iter: start of search.
@@ -3498,9 +3409,6 @@ gtk_source_search_context_backward (GtkSourceSearchContext *search,
  * functions instead, to not block the user interface. However, if you are sure
  * that the @buffer is small, this function is more convenient to use.
  *
- * The difference with gtk_source_search_context_backward() is that the
- * @has_wrapped_around out parameter has been added for convenience.
- *
  * If the #GtkSourceSearchSettings:wrap-around property is %FALSE, this function
  * doesn't try to wrap around.
  *
@@ -3607,36 +3515,6 @@ gtk_source_search_context_backward_async (GtkSourceSearchContext *search,
 }
 
 /**
- * gtk_source_search_context_backward_finish:
- * @search: a #GtkSourceSearchContext.
- * @result: a #GAsyncResult.
- * @match_start: (out) (optional): return location for start of match, or %NULL.
- * @match_end: (out) (optional): return location for end of match, or %NULL.
- * @error: a #GError, or %NULL.
- *
- * Finishes a backward search started with
- * gtk_source_search_context_backward_async().
- *
- * Returns: whether a match was found.
- * Since: 3.10
- * Deprecated: 3.22: Use gtk_source_search_context_backward_finish2() instead.
- */
-gboolean
-gtk_source_search_context_backward_finish (GtkSourceSearchContext  *search,
-                                          GAsyncResult            *result,
-                                          GtkTextIter             *match_start,
-                                          GtkTextIter             *match_end,
-                                          GError                 **error)
-{
-       return gtk_source_search_context_forward_finish2 (search,
-                                                         result,
-                                                         match_start,
-                                                         match_end,
-                                                         NULL,
-                                                         error);
-}
-
-/**
  * gtk_source_search_context_backward_finish2:
  * @search: a #GtkSourceSearchContext.
  * @result: a #GAsyncResult.
@@ -3769,51 +3647,6 @@ end:
 }
 
 /**
- * gtk_source_search_context_replace:
- * @search: a #GtkSourceSearchContext.
- * @match_start: the start of the match to replace.
- * @match_end: the end of the match to replace.
- * @replace: the replacement text.
- * @replace_length: the length of @replace in bytes, or -1.
- * @error: location to a #GError, or %NULL to ignore errors.
- *
- * Replaces a search match by another text. If @match_start and @match_end
- * doesn't correspond to a search match, %FALSE is returned.
- *
- * For a regular expression replacement, you can check if @replace is valid by
- * calling g_regex_check_replacement(). The @replace text can contain
- * backreferences; read the g_regex_replace() documentation for more details.
- *
- * Returns: whether the match has been replaced.
- * Since: 3.10
- * Deprecated: 3.22: Use gtk_source_search_context_replace2() instead.
- */
-gboolean
-gtk_source_search_context_replace (GtkSourceSearchContext  *search,
-                                  const GtkTextIter       *match_start,
-                                  const GtkTextIter       *match_end,
-                                  const gchar             *replace,
-                                  gint                     replace_length,
-                                  GError                 **error)
-{
-       GtkTextIter start;
-       GtkTextIter end;
-
-       g_return_val_if_fail (match_start != NULL, FALSE);
-       g_return_val_if_fail (match_end != NULL, FALSE);
-
-       start = *match_start;
-       end = *match_end;
-
-       return gtk_source_search_context_replace2 (search,
-                                                  &start,
-                                                  &end,
-                                                  replace,
-                                                  replace_length,
-                                                  error);
-}
-
-/**
  * gtk_source_search_context_replace2:
  * @search: a #GtkSourceSearchContext.
  * @match_start: the start of the match to replace.
@@ -3825,8 +3658,8 @@ gtk_source_search_context_replace (GtkSourceSearchContext  *search,
  * Replaces a search match by another text. If @match_start and @match_end
  * doesn't correspond to a search match, %FALSE is returned.
  *
- * Unlike with gtk_source_search_context_replace(), the @match_start and
- * @match_end iters are revalidated to point to the replacement text boundaries.
+ * @match_start and @match_end iters are revalidated to point to the replacement
+ * text boundaries.
  *
  * For a regular expression replacement, you can check if @replace is valid by
  * calling g_regex_check_replacement(). The @replace text can contain
diff --git a/gtksourceview/gtksourcesearchcontext.h b/gtksourceview/gtksourcesearchcontext.h
index f88799c..dcafa13 100644
--- a/gtksourceview/gtksourcesearchcontext.h
+++ b/gtksourceview/gtksourcesearchcontext.h
@@ -101,12 +101,6 @@ gint                        gtk_source_search_context_get_occurrence_position      
(GtkSourceSearchContex
                                                                                 const GtkTextIter       
*match_start,
                                                                                 const GtkTextIter       
*match_end);
 
-GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_forward2)
-gboolean                gtk_source_search_context_forward                      (GtkSourceSearchContext  
*search,
-                                                                                const GtkTextIter       
*iter,
-                                                                                GtkTextIter             
*match_start,
-                                                                                GtkTextIter             
*match_end);
-
 GTK_SOURCE_AVAILABLE_IN_3_22
 gboolean                gtk_source_search_context_forward2                     (GtkSourceSearchContext 
*search,
                                                                                 const GtkTextIter      *iter,
@@ -121,13 +115,6 @@ void                        gtk_source_search_context_forward_async                
(GtkSourceSearchContext  *searc
                                                                                 GAsyncReadyCallback      
callback,
                                                                                 gpointer                 
user_data);
 
-GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_forward_finish2)
-gboolean                gtk_source_search_context_forward_finish               (GtkSourceSearchContext  
*search,
-                                                                                GAsyncResult            
*result,
-                                                                                GtkTextIter             
*match_start,
-                                                                                GtkTextIter             
*match_end,
-                                                                                GError                 
**error);
-
 GTK_SOURCE_AVAILABLE_IN_3_22
 gboolean                gtk_source_search_context_forward_finish2              (GtkSourceSearchContext  
*search,
                                                                                 GAsyncResult            
*result,
@@ -136,12 +123,6 @@ gboolean            gtk_source_search_context_forward_finish2              
(GtkSourceSearchContext  *
                                                                                 gboolean                
*has_wrapped_around,
                                                                                 GError                 
**error);
 
-GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_backward2)
-gboolean                gtk_source_search_context_backward                     (GtkSourceSearchContext  
*search,
-                                                                                const GtkTextIter       
*iter,
-                                                                                GtkTextIter             
*match_start,
-                                                                                GtkTextIter             
*match_end);
-
 GTK_SOURCE_AVAILABLE_IN_3_22
 gboolean                gtk_source_search_context_backward2                    (GtkSourceSearchContext 
*search,
                                                                                 const GtkTextIter      *iter,
@@ -156,13 +137,6 @@ void                        gtk_source_search_context_backward_async               
(GtkSourceSearchContext  *sear
                                                                                 GAsyncReadyCallback      
callback,
                                                                                 gpointer                 
user_data);
 
-GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_backward_finish2)
-gboolean                gtk_source_search_context_backward_finish              (GtkSourceSearchContext  
*search,
-                                                                                GAsyncResult            
*result,
-                                                                                GtkTextIter             
*match_start,
-                                                                                GtkTextIter             
*match_end,
-                                                                                GError                 
**error);
-
 GTK_SOURCE_AVAILABLE_IN_3_22
 gboolean                gtk_source_search_context_backward_finish2             (GtkSourceSearchContext  
*search,
                                                                                 GAsyncResult            
*result,
@@ -171,14 +145,6 @@ gboolean            gtk_source_search_context_backward_finish2             
(GtkSourceSearchContext
                                                                                 gboolean                
*has_wrapped_around,
                                                                                 GError                 
**error);
 
-GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_replace2)
-gboolean                gtk_source_search_context_replace                      (GtkSourceSearchContext  
*search,
-                                                                                const GtkTextIter       
*match_start,
-                                                                                const GtkTextIter       
*match_end,
-                                                                                const gchar             
*replace,
-                                                                                gint                     
replace_length,
-                                                                                GError                 
**error);
-
 GTK_SOURCE_AVAILABLE_IN_3_22
 gboolean                gtk_source_search_context_replace2                     (GtkSourceSearchContext  
*search,
                                                                                 GtkTextIter             
*match_start,


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