[gedit/wip/search-fixes] Bind the search-highlighting setting to the SearchContext



commit 1873c68b00ca9a7de8dc03f307e40d6b98fbbe57
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Aug 24 16:52:05 2013 +0200

    Bind the search-highlighting setting to the SearchContext

 gedit/gedit-document.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 2998f97..5e136b7 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -3081,14 +3081,11 @@ _gedit_document_set_search_context (GeditDocument          *doc,
 
        if (search_context != NULL)
        {
-               gboolean highlight;
-
                g_object_ref (search_context);
 
-               highlight = g_settings_get_boolean (doc->priv->editor_settings,
-                                                   GEDIT_SETTINGS_SEARCH_HIGHLIGHTING);
-
-               gtk_source_search_context_set_highlight (search_context, highlight);
+               g_settings_bind (doc->priv->editor_settings, GEDIT_SETTINGS_SEARCH_HIGHLIGHTING,
+                                search_context, "highlight",
+                                G_SETTINGS_BIND_GET);
 
                g_signal_connect_object (search_context,
                                         "notify::settings",


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