[gtksourceview] CompletionContext: 'user requested' default activation

commit b10036c925e5876a5d6bdd1c907beb389bc79ecf
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Apr 12 15:50:58 2014 +0200

    CompletionContext: 'user requested' default activation
    A None activation currently doesn't match any provider. To match at
    least one provider, you have to change the activation to 'interactive'
    or 'user requested'. The 'user requested' activation is more useful
    outside of gsv (for example for another keybinding than Ctrl+space), so
    it is now the default value. It doesn't really break the API.
    With the None activation, there is also a possible ambiguity: does it
    mean "I don't care about activation", or does it mean "The completion is
    not activated"? Both make sense. With the 'user requested' activation,
    there is no ambiguity.
    And if the user of the API don't care about the activation, it will work
    as expected now, since the provider returns both activations by default.

 gtksourceview/gtksourcecompletioncontext.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gtksourceview/gtksourcecompletioncontext.c b/gtksourceview/gtksourcecompletioncontext.c
index 41e6b9d..3cd9345 100644
--- a/gtksourceview/gtksourcecompletioncontext.c
+++ b/gtksourceview/gtksourcecompletioncontext.c
@@ -299,8 +299,8 @@ gtk_source_completion_context_class_init (GtkSourceCompletionContextClass *klass
                                                             _("The type of activation"),
-                                                            GTK_SOURCE_COMPLETION_ACTIVATION_NONE,
-                                                            G_PARAM_READWRITE));
+                                                            GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED,
+                                                            G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 static void

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