[gedit] Bind the search-highlighting setting to the SearchContext
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Bind the search-highlighting setting to the SearchContext
- Date: Wed, 28 Aug 2013 09:58:36 +0000 (UTC)
commit f437450a1cb852b16a5a94f06b7a5fe3acf9a31a
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]