[gtksourceview/wip/completion-fix: 1/2] completion: a few minor improvements



commit 5d074139e0b2ad9ba771e075b9317d4981028360
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Sep 26 21:50:57 2014 +0200

    completion: a few minor improvements

 gtksourceview/gtksourcecompletion.c        |    5 +++--
 gtksourceview/gtksourcecompletioncontext.c |    6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 4bb8f05..8f1e435 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2873,10 +2873,11 @@ gtk_source_completion_get_info_window (GtkSourceCompletion *completion)
  * gtk_source_completion_get_view:
  * @completion: a #GtkSourceCompletion.
  *
- * The #GtkSourceView associated with @completion.
+ * The #GtkSourceView associated with @completion, or %NULL if the view has been
+ * destroyed.
  *
  * Returns: (type GtkSource.View) (transfer none):
- * The #GtkSourceView associated with @completion.
+ * The #GtkSourceView associated with @completion, or %NULL.
  */
 GtkSourceView *
 gtk_source_completion_get_view (GtkSourceCompletion *completion)
diff --git a/gtksourceview/gtksourcecompletioncontext.c b/gtksourceview/gtksourcecompletioncontext.c
index 778d805..202bd9b 100644
--- a/gtksourceview/gtksourcecompletioncontext.c
+++ b/gtksourceview/gtksourcecompletioncontext.c
@@ -379,7 +379,8 @@ gtk_source_completion_context_get_iter (GtkSourceCompletionContext *context,
 GtkSourceCompletionActivation
 gtk_source_completion_context_get_activation (GtkSourceCompletionContext *context)
 {
-       g_return_val_if_fail (GTK_SOURCE_IS_COMPLETION_CONTEXT (context), FALSE);
+       g_return_val_if_fail (GTK_SOURCE_IS_COMPLETION_CONTEXT (context),
+                             GTK_SOURCE_COMPLETION_ACTIVATION_NONE);
 
        return context->priv->activation;
 }
@@ -393,7 +394,8 @@ _gtk_source_completion_context_cancel (GtkSourceCompletionContext *context)
 }
 
 GtkSourceCompletionContext *
-_gtk_source_completion_context_new (GtkSourceCompletion *completion, GtkTextIter *position)
+_gtk_source_completion_context_new (GtkSourceCompletion *completion,
+                                   GtkTextIter         *position)
 {
        g_return_val_if_fail (GTK_SOURCE_IS_COMPLETION (completion), NULL);
        g_return_val_if_fail (position != NULL, NULL);


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