[gtksourceview/wip/completion-item: 3/3] CompletionItem: add new2() constructor and setters



commit 26f0ee7546ef3071f7c0b26489cbaf38fb559412
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Oct 20 06:16:11 2016 +0200

    CompletionItem: add new2() constructor and setters
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753649

 docs/reference/gtksourceview-3.0-sections.txt |    1 +
 gtksourceview/gtksourcecompletionitem.c       |   15 +++++++++++++++
 gtksourceview/gtksourcecompletionitem.h       |    4 ++++
 3 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtksourceview-3.0-sections.txt b/docs/reference/gtksourceview-3.0-sections.txt
index 2a04388..b4146ed 100644
--- a/docs/reference/gtksourceview-3.0-sections.txt
+++ b/docs/reference/gtksourceview-3.0-sections.txt
@@ -149,6 +149,7 @@ GtkSourceCompletionItem
 gtk_source_completion_item_new
 gtk_source_completion_item_new_with_markup
 gtk_source_completion_item_new_from_stock
+gtk_source_completion_item_new2
 <SUBSECTION Standard>
 GTK_SOURCE_IS_COMPLETION_ITEM
 GTK_SOURCE_IS_COMPLETION_ITEM_CLASS
diff --git a/gtksourceview/gtksourcecompletionitem.c b/gtksourceview/gtksourcecompletionitem.c
index c7bf3df..239fdda 100644
--- a/gtksourceview/gtksourcecompletionitem.c
+++ b/gtksourceview/gtksourcecompletionitem.c
@@ -3,6 +3,7 @@
  * This file is part of GtkSourceView
  *
  * Copyright (C) 2009 - Jesse van den Kieboom <jessevdk gnome org>
+ * Copyright (C) 2016 - Sébastien Wilmet <swilmet gnome org>
  *
  * GtkSourceView is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -500,3 +501,17 @@ gtk_source_completion_item_new_from_stock (const gchar *label,
 }
 
 G_GNUC_END_IGNORE_DEPRECATIONS;
+
+/**
+ * gtk_source_completion_item_new2:
+ *
+ * Creates a new #GtkSourceCompletionItem. The desired properties need to be set
+ * afterwards.
+ *
+ * Returns: (transfer full): a new #GtkSourceCompletionItem.
+ */
+GtkSourceCompletionItem *
+gtk_source_completion_item_new2 (void)
+{
+       return g_object_new (GTK_SOURCE_TYPE_COMPLETION_ITEM, NULL);
+}
diff --git a/gtksourceview/gtksourcecompletionitem.h b/gtksourceview/gtksourcecompletionitem.h
index 5ccd425..48e4d41 100644
--- a/gtksourceview/gtksourcecompletionitem.h
+++ b/gtksourceview/gtksourcecompletionitem.h
@@ -3,6 +3,7 @@
  * This file is part of GtkSourceView
  *
  * Copyright (C) 2009 - Jesse van den Kieboom <jessevdk gnome org>
+ * Copyright (C) 2016 - Sébastien Wilmet <swilmet gnome org>
  *
  * GtkSourceView is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -76,6 +77,9 @@ GtkSourceCompletionItem *gtk_source_completion_item_new_from_stock    (const gchar
                                                                         const gchar *stock,
                                                                         const gchar *info);
 
+GTK_SOURCE_AVAILABLE_IN_3_24
+GtkSourceCompletionItem *gtk_source_completion_item_new2               (void);
+
 G_END_DECLS
 
 #endif /* GTK_SOURCE_COMPLETION_ITEM_H */


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