[gtksourceview/wip/regex-search] More fixes



commit 3313fea54805314e14a3c730e85b1129703a321a
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Tue Jul 30 16:48:35 2013 +0200

    More fixes

 docs/reference/gtksourceview-3.0-sections.txt |   24 -------
 gtksourceview/gtksourcebuffer.c               |   13 +---
 gtksourceview/gtksourcebuffer.h               |   82 -------------------------
 gtksourceview/gtksourcesearchcontext.c        |    2 +-
 gtksourceview/gtksourcesearchcontext.h        |    5 --
 gtksourceview/gtksourcesearchsettings.c       |    4 +-
 6 files changed, 7 insertions(+), 123 deletions(-)
---
diff --git a/docs/reference/gtksourceview-3.0-sections.txt b/docs/reference/gtksourceview-3.0-sections.txt
index f30fb49..8c159c8 100644
--- a/docs/reference/gtksourceview-3.0-sections.txt
+++ b/docs/reference/gtksourceview-3.0-sections.txt
@@ -37,30 +37,6 @@ gtk_source_buffer_begin_not_undoable_action
 gtk_source_buffer_end_not_undoable_action
 gtk_source_buffer_get_undo_manager
 gtk_source_buffer_set_undo_manager
-<SUBSECTION>
-gtk_source_buffer_set_search_text
-gtk_source_buffer_get_search_text
-gtk_source_buffer_set_case_sensitive_search
-gtk_source_buffer_get_case_sensitive_search
-gtk_source_buffer_set_search_at_word_boundaries
-gtk_source_buffer_get_search_at_word_boundaries
-gtk_source_buffer_set_search_wrap_around
-gtk_source_buffer_get_search_wrap_around
-gtk_source_buffer_set_regex_search
-gtk_source_buffer_get_regex_search
-gtk_source_buffer_get_regex_search_error
-gtk_source_buffer_set_highlight_search
-gtk_source_buffer_get_highlight_search
-gtk_source_buffer_get_search_occurrences_count
-gtk_source_buffer_get_search_occurrence_position
-gtk_source_buffer_forward_search
-gtk_source_buffer_forward_search_async
-gtk_source_buffer_forward_search_finish
-gtk_source_buffer_backward_search
-gtk_source_buffer_backward_search_async
-gtk_source_buffer_backward_search_finish
-gtk_source_buffer_search_replace
-gtk_source_buffer_search_replace_all
 <SUBSECTION Standard>
 GtkSourceBufferClass
 GTK_SOURCE_IS_BUFFER
diff --git a/gtksourceview/gtksourcebuffer.c b/gtksourceview/gtksourcebuffer.c
index 969bcfa..e6cd89e 100644
--- a/gtksourceview/gtksourcebuffer.c
+++ b/gtksourceview/gtksourcebuffer.c
@@ -193,8 +193,6 @@ struct _GtkSourceBufferPrivate
        GtkSourceUndoManager  *undo_manager;
        gint                   max_undo_levels;
 
-       GtkSourceSearchContext *search;
-
        guint                  highlight_syntax : 1;
        guint                  highlight_brackets : 1;
        guint                  constructed : 1;
@@ -525,9 +523,9 @@ gtk_source_buffer_init (GtkSourceBuffer *buffer)
        priv->style_scheme = _gtk_source_style_scheme_get_default ();
 
        if (priv->style_scheme != NULL)
+       {
                g_object_ref (priv->style_scheme);
-
-       priv->search = gtk_source_search_context_new (buffer);
+       }
 }
 
 static void
@@ -570,7 +568,6 @@ gtk_source_buffer_dispose (GObject *object)
        g_clear_object (&buffer->priv->highlight_engine);
        g_clear_object (&buffer->priv->language);
        g_clear_object (&buffer->priv->style_scheme);
-       g_clear_object (&buffer->priv->search);
 
        G_OBJECT_CLASS (gtk_source_buffer_parent_class)->dispose (object);
 }
@@ -1592,10 +1589,8 @@ _gtk_source_buffer_update_highlight (GtkSourceBuffer   *buffer,
                                                     synchronous);
        }
 
-       gtk_source_search_context_update_highlight (buffer->priv->search,
-                                                   start,
-                                                   end,
-                                                   synchronous);
+       /* TODO: update highlighting for the currently highlighted search
+        * context. */
 }
 
 /**
diff --git a/gtksourceview/gtksourcebuffer.h b/gtksourceview/gtksourcebuffer.h
index e6cf6ec..8fa90d7 100644
--- a/gtksourceview/gtksourcebuffer.h
+++ b/gtksourceview/gtksourcebuffer.h
@@ -180,88 +180,6 @@ GtkSourceUndoManager       *gtk_source_buffer_get_undo_manager                     
(GtkSourceBuffer        *buf
 void                    gtk_source_buffer_set_undo_manager                     (GtkSourceBuffer        
*buffer,
                                                                                 GtkSourceUndoManager   
*manager);
 
-void                    gtk_source_buffer_set_search_text                      (GtkSourceBuffer        
*buffer,
-                                                                                const gchar            
*text);
-
-const gchar            *gtk_source_buffer_get_search_text                      (GtkSourceBuffer        
*buffer);
-
-void                    gtk_source_buffer_set_case_sensitive_search            (GtkSourceBuffer        
*buffer,
-                                                                                gboolean                
case_sensitive);
-
-gboolean                gtk_source_buffer_get_case_sensitive_search            (GtkSourceBuffer        
*buffer);
-
-void                    gtk_source_buffer_set_search_at_word_boundaries        (GtkSourceBuffer        
*buffer,
-                                                                                gboolean                
at_word_boundaries);
-
-gboolean                gtk_source_buffer_get_search_at_word_boundaries        (GtkSourceBuffer        
*buffer);
-
-void                    gtk_source_buffer_set_search_wrap_around               (GtkSourceBuffer        
*buffer,
-                                                                                gboolean                
wrap_around);
-
-gboolean                gtk_source_buffer_get_search_wrap_around               (GtkSourceBuffer        
*buffer);
-
-void                    gtk_source_buffer_set_regex_search                     (GtkSourceBuffer        
*buffer,
-                                                                                gboolean                
regex);
-
-gboolean                gtk_source_buffer_get_regex_search                     (GtkSourceBuffer        
*buffer);
-
-GError                 *gtk_source_buffer_get_regex_search_error               (GtkSourceBuffer        
*buffer);
-
-void                    gtk_source_buffer_set_highlight_search                 (GtkSourceBuffer        
*buffer,
-                                                                                gboolean                
highlight);
-
-gboolean                gtk_source_buffer_get_highlight_search                 (GtkSourceBuffer        
*buffer);
-
-gint                    gtk_source_buffer_get_search_occurrences_count         (GtkSourceBuffer        
*buffer);
-
-gint                    gtk_source_buffer_get_search_occurrence_position       (GtkSourceBuffer        
*buffer,
-                                                                                const GtkTextIter      
*match_start,
-                                                                                const GtkTextIter      
*match_end);
-
-gboolean                gtk_source_buffer_forward_search                       (GtkSourceBuffer        
*buffer,
-                                                                                const GtkTextIter      *iter,
-                                                                                GtkTextIter            
*match_start,
-                                                                                GtkTextIter            
*match_end);
-
-void                    gtk_source_buffer_forward_search_async                 (GtkSourceBuffer        
*buffer,
-                                                                                const GtkTextIter      *iter,
-                                                                                GCancellable           
*cancellable,
-                                                                                GAsyncReadyCallback     
callback,
-                                                                                gpointer                
user_data);
-
-gboolean                gtk_source_buffer_forward_search_finish                (GtkSourceBuffer        
*buffer,
-                                                                                GAsyncResult           
*result,
-                                                                                GtkTextIter            
*match_start,
-                                                                                GtkTextIter            
*match_end,
-                                                                                GError                
**error);
-
-gboolean                gtk_source_buffer_backward_search                      (GtkSourceBuffer        
*buffer,
-                                                                                const GtkTextIter      *iter,
-                                                                                GtkTextIter            
*match_start,
-                                                                                GtkTextIter            
*match_end);
-
-void                    gtk_source_buffer_backward_search_async                (GtkSourceBuffer        
*buffer,
-                                                                                const GtkTextIter      *iter,
-                                                                                GCancellable           
*cancellable,
-                                                                                GAsyncReadyCallback     
callback,
-                                                                                gpointer                
user_data);
-
-gboolean                gtk_source_buffer_backward_search_finish               (GtkSourceBuffer        
*buffer,
-                                                                                GAsyncResult           
*result,
-                                                                                GtkTextIter            
*match_start,
-                                                                                GtkTextIter            
*match_end,
-                                                                                GError                
**error);
-
-gboolean                gtk_source_buffer_search_replace                       (GtkSourceBuffer        
*buffer,
-                                                                                const GtkTextIter      
*match_start,
-                                                                                const GtkTextIter      
*match_end,
-                                                                                const gchar            
*replace,
-                                                                                gint                    
replace_length);
-
-guint                   gtk_source_buffer_search_replace_all                   (GtkSourceBuffer        
*buffer,
-                                                                                const gchar            
*replace,
-                                                                                gint                    
replace_length);
-
 /* private */
 
 G_GNUC_INTERNAL
diff --git a/gtksourceview/gtksourcesearchcontext.c b/gtksourceview/gtksourcesearchcontext.c
index c8e67f1..25f99bd 100644
--- a/gtksourceview/gtksourcesearchcontext.c
+++ b/gtksourceview/gtksourcesearchcontext.c
@@ -2638,7 +2638,7 @@ gtk_source_search_context_class_init (GtkSourceSearchContextClass *klass)
                                                              _("Buffer"),
                                                              _("The associated GtkSourceBuffer"),
                                                              GTK_SOURCE_TYPE_BUFFER,
-                                                             G_PARAM_READABLE | G_PARAM_CONSTRUCT_ONLY));
+                                                             G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
        /**
         * GtkSourceSearchContext:settings:
diff --git a/gtksourceview/gtksourcesearchcontext.h b/gtksourceview/gtksourcesearchcontext.h
index 6c0c60a..6ad38ae 100644
--- a/gtksourceview/gtksourcesearchcontext.h
+++ b/gtksourceview/gtksourcesearchcontext.h
@@ -63,11 +63,6 @@ void                  gtk_source_search_context_set_settings                 
(GtkSourceSearchContext  *searc
 
 GError                 *gtk_source_search_context_get_regex_error              (GtkSourceSearchContext  
*search);
 
-void                    gtk_source_search_context_set_highlight                (GtkSourceSearchContext  
*search,
-                                                                                gboolean                 
highlight);
-
-gboolean                gtk_source_search_context_get_highlight                (GtkSourceSearchContext  
*search);
-
 gint                    gtk_source_search_context_get_occurrences_count        (GtkSourceSearchContext  
*search);
 
 gint                    gtk_source_search_context_get_occurrence_position      (GtkSourceSearchContext  
*search,
diff --git a/gtksourceview/gtksourcesearchsettings.c b/gtksourceview/gtksourcesearchsettings.c
index 14b7729..9a66a90 100644
--- a/gtksourceview/gtksourcesearchsettings.c
+++ b/gtksourceview/gtksourcesearchsettings.c
@@ -248,7 +248,7 @@ gtk_source_search_settings_new (void)
 /**
  * gtk_source_search_settings_set_search_text:
  * @settings: a #GtkSourceSearchSettings.
- * @text: (allow-none): the nul-terminated text to search, or %NULL to disable the search.
+ * @search_text: (allow-none): the nul-terminated text to search, or %NULL to disable the search.
  *
  * Sets the text to search. If @text is %NULL or is empty, the search will be
  * disabled. A copy of @text will be made, so you can safely free @text after
@@ -433,7 +433,7 @@ gtk_source_search_settings_get_wrap_around (GtkSourceSearchSettings *settings)
 /**
  * gtk_source_search_settings_set_regex_enabled:
  * @settings: a #GtkSourceSearchSettings.
- * @regex: the setting.
+ * @regex_enabled: the setting.
  *
  * Enables or disables whether to search by regular expressions.
  * If enabled, the #GtkSourceSearchSettings:search-text property contains the


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