[gtksourceview] Deprecate gtk_source_completion_info_{get, set}_widget()



commit 611ecb0a1d359434b75adb8d23c976c60bd56960
Author: SÃbastien Wilmet <swilmet gnome org>
Date:   Sat Jan 26 20:52:03 2013 +0100

    Deprecate gtk_source_completion_info_{get,set}_widget()
    
    If one day the CompletionInfo becomes more complex (like it was in the
    past, with a ScrolledWindow and a Viewport), it will still be possible
    to override gtk_container_add() and gtk_bin_get_child().

 gtksourceview/gtksourcecompletioninfo.c |   13 +++++++++----
 gtksourceview/gtksourcecompletioninfo.h |    2 ++
 2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletioninfo.c b/gtksourceview/gtksourcecompletioninfo.c
index 2274041..5ab3baa 100644
--- a/gtksourceview/gtksourcecompletioninfo.c
+++ b/gtksourceview/gtksourcecompletioninfo.c
@@ -30,9 +30,9 @@
  * current completion proposal.
  *
  * The info window has always the same size as the natural size of its child
- * widget, added with gtk_source_completion_info_set_widget().  If you want a
- * fixed size instead, a possibility is to use a scrolled window, as the
- * following example demonstrates.
+ * widget, added with gtk_container_add().  If you want a fixed size instead, a
+ * possibility is to use a scrolled window, as the following example
+ * demonstrates.
  *
  * <example>
  *   <title>Fixed size with a scrolled window.</title>
@@ -43,7 +43,7 @@
  *
  * gtk_widget_set_size_request (scrolled_window, 300, 200);
  * gtk_container_add (GTK_CONTAINER (scrolled_window), your_widget);
- * gtk_source_completion_info_set_widget (info, scrolled_window);
+ * gtk_container_add (GTK_CONTAINER (info), scrolled_window);
  *   </programlisting>
  * </example>
  */
@@ -315,6 +315,9 @@ gtk_source_completion_info_move_to_iter (GtkSourceCompletionInfo *info,
  * Sets the content widget of the info window. See that the previous widget will
  * lose a reference and it can be destroyed, so if you do not want this to
  * happen you must use g_object_ref() before calling this method.
+ *
+ * Deprecated: 3.8: Use gtk_container_add() instead. If there is already a child
+ * widget, remove it with gtk_container_remove().
  */
 void
 gtk_source_completion_info_set_widget (GtkSourceCompletionInfo *info,
@@ -350,6 +353,8 @@ gtk_source_completion_info_set_widget (GtkSourceCompletionInfo *info,
  * Get the current content widget.
  *
  * Returns: (transfer none): The current content widget.
+ *
+ * Deprecated: 3.8: Use gtk_bin_get_child() instead.
  */
 GtkWidget *
 gtk_source_completion_info_get_widget (GtkSourceCompletionInfo* info)
diff --git a/gtksourceview/gtksourcecompletioninfo.h b/gtksourceview/gtksourcecompletioninfo.h
index d12325b..ee0963b 100644
--- a/gtksourceview/gtksourcecompletioninfo.h
+++ b/gtksourceview/gtksourcecompletioninfo.h
@@ -62,9 +62,11 @@ void		 gtk_source_completion_info_move_to_iter	(GtkSourceCompletionInfo *info,
 								 GtkTextView             *view,
 								 GtkTextIter             *iter);
 
+G_DEPRECATED_FOR (gtk_container_add)
 void		 gtk_source_completion_info_set_widget		(GtkSourceCompletionInfo *info,
 								 GtkWidget               *widget);
 
+G_DEPRECATED_FOR (gtk_bin_get_child)
 GtkWidget	*gtk_source_completion_info_get_widget		(GtkSourceCompletionInfo *info);
 
 G_END_DECLS



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