[gtksourceview] Completion: rename show() -> start()



commit c37730e7fbccc958e9ef34f85c67f4f8aab94714
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Oct 27 09:39:07 2017 +0200

    Completion: rename show() -> start()
    
    The goal is to have less metadata to generate the *.vapi for Vala, and
    have a better *.gir file.
    
    gtk_source_completion_show() was in conflict with the ::show signal,
    they don't have the same signature.

 docs/reference/gtksourceview-4.0-sections.txt |    2 +-
 docs/reference/porting-guide-3-to-4.xml       |   25 +++++++++++++++++++++++++
 gtksourceview/GtkSource.metadata.in           |    2 --
 gtksourceview/gtksourcecompletion.c           |   10 +++++-----
 gtksourceview/gtksourcecompletion.h           |    2 +-
 gtksourceview/gtksourceview.c                 |    6 +++---
 6 files changed, 35 insertions(+), 12 deletions(-)
---
diff --git a/docs/reference/gtksourceview-4.0-sections.txt b/docs/reference/gtksourceview-4.0-sections.txt
index 5b9e7f8..3386b52 100644
--- a/docs/reference/gtksourceview-4.0-sections.txt
+++ b/docs/reference/gtksourceview-4.0-sections.txt
@@ -75,7 +75,7 @@ GtkSourceCompletionError
 gtk_source_completion_add_provider
 gtk_source_completion_remove_provider
 gtk_source_completion_get_providers
-gtk_source_completion_show
+gtk_source_completion_start
 gtk_source_completion_hide
 gtk_source_completion_get_info_window
 gtk_source_completion_get_view
diff --git a/docs/reference/porting-guide-3-to-4.xml b/docs/reference/porting-guide-3-to-4.xml
index 0729ed7..4e7d8e0 100644
--- a/docs/reference/porting-guide-3-to-4.xml
+++ b/docs/reference/porting-guide-3-to-4.xml
@@ -146,4 +146,29 @@
       </listitem>
     </itemizedlist>
   </refsect1>
+
+  <refsect1>
+    <title>GtkSourceView 3.99.5 and 3.99.6</title>
+    <para>No API changes.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>GtkSourceView 3.99.7</title>
+    <para>
+      In order to have a better *.gir file and have less metadata to generate
+      the *.vapi for Vala, the following change has been made:
+    </para>
+    <itemizedlist>
+      <listitem>
+        <para>
+          <code>gtk_source_completion_show()</code> has been renamed to
+          <link linkend="gtk-source-completion-start">gtk_source_completion_start()</link>.
+          The function conflicted with the
+          <link linkend="GtkSourceCompletion-show">GtkSourceCompletion::show</link> signal.
+          Note that in Vala this doesn't require code changes because the method
+          was already renamed to <code>start()</code> in GtkSourceView&nbsp;3.
+        </para>
+      </listitem>
+    </itemizedlist>
+  </refsect1>
 </chapter>
diff --git a/gtksourceview/GtkSource.metadata.in b/gtksourceview/GtkSource.metadata.in
index 1c5c57b..3b8f9f0 100644
--- a/gtksourceview/GtkSource.metadata.in
+++ b/gtksourceview/GtkSource.metadata.in
@@ -1,8 +1,6 @@
 * name="(.+)/Source\\1"
 utils_* name="utils_(.+)" parent="Gtk.SourceUtils"
 GtkSource name="Gtk" cprefix="Gtk" lower_case_cprefix="gtk_"
-Completion
-        .show#method name="start"
 CompletionProvider
         .*#virtual_method virtual
 CompletionProposal
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 5580dd1..15243ed 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2753,7 +2753,7 @@ _gtk_source_completion_add_proposals (GtkSourceCompletion         *completion,
 }
 
 /**
- * gtk_source_completion_show:
+ * gtk_source_completion_start:
  * @completion: a #GtkSourceCompletion.
  * @providers: (element-type GtkSource.CompletionProvider) (nullable):
  * a list of #GtkSourceCompletionProvider, or %NULL.
@@ -2773,9 +2773,9 @@ _gtk_source_completion_add_proposals (GtkSourceCompletion         *completion,
  * Returns: %TRUE if it was possible to the show completion window.
  */
 gboolean
-gtk_source_completion_show (GtkSourceCompletion        *completion,
-                            GList                      *providers,
-                            GtkSourceCompletionContext *context)
+gtk_source_completion_start (GtkSourceCompletion        *completion,
+                            GList                      *providers,
+                            GtkSourceCompletionContext *context)
 {
        GList *selected_providers;
 
@@ -3028,7 +3028,7 @@ gtk_source_completion_get_view (GtkSourceCompletion *completion)
  *
  * Returns: (transfer floating): a new #GtkSourceCompletionContext.
  * The reference being returned is a 'floating' reference,
- * so if you invoke gtk_source_completion_show() with this context
+ * so if you invoke gtk_source_completion_start() with this context
  * you don't need to unref it.
  */
 GtkSourceCompletionContext *
diff --git a/gtksourceview/gtksourcecompletion.h b/gtksourceview/gtksourcecompletion.h
index 37a852e..a5dfd92 100644
--- a/gtksourceview/gtksourcecompletion.h
+++ b/gtksourceview/gtksourcecompletion.h
@@ -120,7 +120,7 @@ GTK_SOURCE_AVAILABLE_IN_ALL
 GList          *gtk_source_completion_get_providers            (GtkSourceCompletion           *completion);
 
 GTK_SOURCE_AVAILABLE_IN_ALL
-gboolean        gtk_source_completion_show                     (GtkSourceCompletion           *completion,
+gboolean        gtk_source_completion_start                    (GtkSourceCompletion           *completion,
                                                                 GList                         *providers,
                                                                 GtkSourceCompletionContext    *context);
 
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index 5734b58..21424be 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -1656,9 +1656,9 @@ gtk_source_view_show_completion_real (GtkSourceView *view)
        completion = gtk_source_view_get_completion (view);
        context = gtk_source_completion_create_context (completion, NULL);
 
-       gtk_source_completion_show (completion,
-                                   gtk_source_completion_get_providers (completion),
-                                   context);
+       gtk_source_completion_start (completion,
+                                    gtk_source_completion_get_providers (completion),
+                                    context);
 }
 
 static void


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