[gnome-builder] connect search settings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] connect search settings
- Date: Tue, 24 Mar 2015 00:28:47 +0000 (UTC)
commit f52d39ae41836ac94f034618e992f652be81db38
Author: Christian Hergert <christian hergert me>
Date: Thu Mar 19 19:38:49 2015 -0700
connect search settings
src/editor/gb-editor-frame.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-frame.c b/src/editor/gb-editor-frame.c
index fbb7e12..0cb7a50 100644
--- a/src/editor/gb-editor-frame.c
+++ b/src/editor/gb-editor-frame.c
@@ -86,6 +86,8 @@ void
gb_editor_frame_set_document (GbEditorFrame *self,
GbEditorDocument *document)
{
+ GtkSourceSearchContext *search_context;
+ GtkSourceSearchSettings *search_settings;
GtkTextMark *mark;
GtkTextIter iter;
@@ -99,6 +101,15 @@ gb_editor_frame_set_document (GbEditorFrame *self,
mark = gtk_text_buffer_get_insert (GTK_TEXT_BUFFER (document));
gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (document), &iter, mark);
on_cursor_moved (document, &iter, self);
+
+ /*
+ * Sync search entry with the search settings.
+ */
+ search_context = ide_source_view_get_search_context (self->source_view);
+ search_settings = gtk_source_search_context_get_settings (search_context);
+ g_object_bind_property (self->search_entry, "text", search_settings, "search-text",
+ (G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL));
+
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]