[gtksourceview/wip/gsv-4] CompletionInfo: remove the deprecated API



commit 98a83d7813dca3aee08925aac1a448a2c73dc009
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Nov 4 20:45:08 2016 +0100

    CompletionInfo: remove the deprecated API

 docs/reference/gtksourceview-4.0-sections.txt |    2 -
 gtksourceview/gtksourcecompletioninfo.c       |   86 -------------------------
 gtksourceview/gtksourcecompletioninfo.h       |    9 ---
 3 files changed, 0 insertions(+), 97 deletions(-)
---
diff --git a/docs/reference/gtksourceview-4.0-sections.txt b/docs/reference/gtksourceview-4.0-sections.txt
index 807c8b7..98c66e4 100644
--- a/docs/reference/gtksourceview-4.0-sections.txt
+++ b/docs/reference/gtksourceview-4.0-sections.txt
@@ -127,8 +127,6 @@ gtk_source_completion_activation_get_type
 GtkSourceCompletionInfo
 gtk_source_completion_info_new
 gtk_source_completion_info_move_to_iter
-gtk_source_completion_info_set_widget
-gtk_source_completion_info_get_widget
 <SUBSECTION Standard>
 GTK_SOURCE_IS_COMPLETION_INFO
 GTK_SOURCE_IS_COMPLETION_INFO_CLASS
diff --git a/gtksourceview/gtksourcecompletioninfo.c b/gtksourceview/gtksourcecompletioninfo.c
index 21d942d..91984fa 100644
--- a/gtksourceview/gtksourcecompletioninfo.c
+++ b/gtksourceview/gtksourcecompletioninfo.c
@@ -75,14 +75,6 @@ struct _GtkSourceCompletionInfoPrivate
        guint transient_set : 1;
 };
 
-enum
-{
-       BEFORE_SHOW,
-       N_SIGNALS
-};
-
-static guint signals[N_SIGNALS];
-
 G_DEFINE_TYPE_WITH_PRIVATE (GtkSourceCompletionInfo, gtk_source_completion_info, GTK_TYPE_WINDOW);
 
 /* Resize the window */
@@ -298,9 +290,6 @@ gtk_source_completion_info_show (GtkWidget *widget)
 {
        GtkSourceCompletionInfo *info = GTK_SOURCE_COMPLETION_INFO (widget);
 
-       /* First emit BEFORE_SHOW and then chain up */
-       g_signal_emit (info, signals[BEFORE_SHOW], 0);
-
        if (info->priv->attached_to != NULL && !info->priv->transient_set)
        {
                GtkWidget *toplevel;
@@ -348,24 +337,6 @@ gtk_source_completion_info_class_init (GtkSourceCompletionInfoClass *klass)
        widget_class->get_preferred_height = gtk_source_completion_info_get_preferred_height;
 
        container_class->check_resize = gtk_source_completion_info_check_resize;
-
-       /**
-        * GtkSourceCompletionInfo::before-show:
-        * @info: The #GtkSourceCompletionInfo who emits the signal
-        *
-        * This signal is emitted before any "show" management. You can connect
-        * to this signal if you want to change some properties or position
-        * before the real "show".
-        *
-        * Deprecated: 3.10: This signal should not be used.
-        */
-       signals[BEFORE_SHOW] =
-               g_signal_new ("before-show",
-                             G_TYPE_FROM_CLASS (klass),
-                             G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION | G_SIGNAL_DEPRECATED,
-                             0,
-                             NULL, NULL, NULL,
-                             G_TYPE_NONE, 0);
 }
 
 void
@@ -601,60 +572,3 @@ gtk_source_completion_info_move_to_iter (GtkSourceCompletionInfo *info,
                move_to_iter (info, view, iter);
        }
 }
-
-/**
- * gtk_source_completion_info_set_widget:
- * @info: a #GtkSourceCompletionInfo.
- * @widget: (nullable): a #GtkWidget.
- *
- * 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,
-                                       GtkWidget               *widget)
-{
-       GtkWidget *cur_child = NULL;
-
-       g_return_if_fail (GTK_SOURCE_IS_COMPLETION_INFO (info));
-       g_return_if_fail (widget == NULL || GTK_IS_WIDGET (widget));
-
-       cur_child = gtk_bin_get_child (GTK_BIN (info));
-
-       if (cur_child == widget)
-       {
-               return;
-       }
-
-       if (cur_child != NULL)
-       {
-               gtk_container_remove (GTK_CONTAINER (info), cur_child);
-       }
-
-       if (widget != NULL)
-       {
-               gtk_container_add (GTK_CONTAINER (info), widget);
-       }
-}
-
-/**
- * gtk_source_completion_info_get_widget:
- * @info: a #GtkSourceCompletionInfo.
- *
- * 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)
-{
-       g_return_val_if_fail (GTK_SOURCE_IS_COMPLETION_INFO (info), NULL);
-
-       return gtk_bin_get_child (GTK_BIN (info));
-}
diff --git a/gtksourceview/gtksourcecompletioninfo.h b/gtksourceview/gtksourcecompletioninfo.h
index 7ae9fc4..228cb30 100644
--- a/gtksourceview/gtksourcecompletioninfo.h
+++ b/gtksourceview/gtksourcecompletioninfo.h
@@ -57,8 +57,6 @@ typedef struct _GtkSourceCompletionInfoClass GtkSourceCompletionInfoClass;
 struct _GtkSourceCompletionInfoClass
 {
        GtkWindowClass parent_class;
-
-       void    (*before_show)          (GtkSourceCompletionInfo *info);
 };
 
 GTK_SOURCE_AVAILABLE_IN_ALL
@@ -73,13 +71,6 @@ void          gtk_source_completion_info_move_to_iter        (GtkSourceCompletionInfo 
*info,
                                                                 GtkTextView             *view,
                                                                 GtkTextIter             *iter);
 
-GTK_SOURCE_DEPRECATED_IN_3_8_FOR (gtk_container_add)
-void            gtk_source_completion_info_set_widget          (GtkSourceCompletionInfo *info,
-                                                                GtkWidget               *widget);
-
-GTK_SOURCE_DEPRECATED_IN_3_8_FOR (gtk_bin_get_child)
-GtkWidget      *gtk_source_completion_info_get_widget          (GtkSourceCompletionInfo *info);
-
 G_GNUC_INTERNAL
 void            _gtk_source_completion_info_set_xoffset        (GtkSourceCompletionInfo *info,
                                                                 gint                     xoffset);


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