[anjuta] sourceview: fix handling of word completion provider in preferences. Added debug domain to



commit 857c7a8b1566902175a92471d82a0d6f75cb5be0
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Dec 1 17:33:12 2009 +0100

    sourceview: fix handling of word completion provider in preferences. Added debug domain to
    sourceview plugin

 plugins/sourceview/Makefile.am        |    3 ++-
 plugins/sourceview/sourceview-prefs.c |    6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/plugins/sourceview/Makefile.am b/plugins/sourceview/Makefile.am
index 3221d0c..b597cd7 100644
--- a/plugins/sourceview/Makefile.am
+++ b/plugins/sourceview/Makefile.am
@@ -26,7 +26,8 @@ AM_CPPFLAGS = \
 	$(DEPRECATED_FLAGS) \
 	$(GIO_CFLAGS) \
 	$(PLUGIN_SOURCEVIEW_CFLAGS) \
-	$(LIBANJUTA_CFLAGS)
+	$(LIBANJUTA_CFLAGS) \
+	-DG_LOG_DOMAIN=\"sourceview\"
 
 # Where to install the plugin
 plugindir = $(anjuta_plugin_dir)
diff --git a/plugins/sourceview/sourceview-prefs.c b/plugins/sourceview/sourceview-prefs.c
index 17abc9b..bd0c574 100644
--- a/plugins/sourceview/sourceview-prefs.c
+++ b/plugins/sourceview/sourceview-prefs.c
@@ -36,7 +36,7 @@
 #define HIGHLIGHT_BRACKETS         "sourceview.brackets.highlight"
 #define TAB_SIZE                   "tabsize"
 #define INDENT_SIZE                "indent.size"
-#define AUTOCOMPLETION             "sourceview.autocompletion"
+#define AUTOCOMPLETION             "sourceview.autocomplete"
 
 #define VIEW_LINENUMBERS           "margin.linenumber.visible"
 #define VIEW_MARKS                 "margin.marker.visible"
@@ -186,6 +186,7 @@ on_notify_autocompletion (AnjutaPreferences* prefs,
   
   if (autocomplete)
   {
+    DEBUG_PRINT ("Register word completion provider");
     GtkSourceCompletionWords *prov_words;
     prov_words = gtk_source_completion_words_new (NULL, NULL);
 
@@ -203,6 +204,9 @@ on_notify_autocompletion (AnjutaPreferences* prefs,
     {
       if (GTK_IS_SOURCE_COMPLETION_WORDS(node->data))
       {
+        DEBUG_PRINT ("Unregister word completion provider");
+        gtk_source_completion_words_unregister (GTK_SOURCE_COMPLETION_WORDS(node->data),
+                                                gtk_text_view_get_buffer (GTK_TEXT_VIEW (sv->priv->view)));
         gtk_source_completion_remove_provider(completion, GTK_SOURCE_COMPLETION_PROVIDER(node->data), NULL);
         break;
       }



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