[gtksourceview] SearchContext: make the :settings property construct-only
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] SearchContext: make the :settings property construct-only
- Date: Wed, 16 Nov 2016 15:58:29 +0000 (UTC)
commit 46cdf68bacfb8aa962bb4d3f83be40cb50a3ef18
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Nov 16 16:46:12 2016 +0100
SearchContext: make the :settings property construct-only
set_settings() was deprecated in GSV 3 and has been removed in 3.99.1.
So now we do the real API break (other than removing deprecated APIs).
docs/reference/porting-guide.xml | 6 ++++++
gtksourceview/gtksourcesearchcontext.c | 16 ++++------------
2 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/docs/reference/porting-guide.xml b/docs/reference/porting-guide.xml
index c3e2584..ba6eaf7 100644
--- a/docs/reference/porting-guide.xml
+++ b/docs/reference/porting-guide.xml
@@ -118,6 +118,12 @@
<link linkend="gtk-source-search-context-replace">gtk_source_search_context_replace()</link>.
</para>
</listitem>
+ <listitem>
+ <para>
+ The <link linkend="GtkSourceSearchContext--settings">GtkSourceSearchContext:settings</link>
+ property is now construct-only.
+ </para>
+ </listitem>
</itemizedlist>
</refsect1>
</part>
diff --git a/gtksourceview/gtksourcesearchcontext.c b/gtksourceview/gtksourcesearchcontext.c
index 82de126..de96128 100644
--- a/gtksourceview/gtksourcesearchcontext.c
+++ b/gtksourceview/gtksourcesearchcontext.c
@@ -2592,17 +2592,7 @@ static void
set_settings (GtkSourceSearchContext *search,
GtkSourceSearchSettings *settings)
{
- if (search->priv->settings != NULL)
- {
- g_warning ("The GtkSourceSearchContext:settings property "
- "will become a construct-only property in a future version.");
-
- g_signal_handlers_disconnect_by_func (search->priv->settings,
- settings_notify_cb,
- search);
-
- g_object_unref (search->priv->settings);
- }
+ g_assert (search->priv->settings == NULL);
if (settings != NULL)
{
@@ -2782,6 +2772,8 @@ gtk_source_search_context_class_init (GtkSourceSearchContextClass *klass)
*
* The #GtkSourceSearchSettings associated to the search context.
*
+ * This property is construct-only since version 4.0.
+ *
* Since: 3.10
*/
g_object_class_install_property (object_class,
@@ -2791,7 +2783,7 @@ gtk_source_search_context_class_init (GtkSourceSearchContextClass *klass)
"The associated GtkSourceSearchSettings",
GTK_SOURCE_TYPE_SEARCH_SETTINGS,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT |
+ G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]