mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-13 12:37:46 +02:00
Fix binding test failures
This commit is contained in:
@@ -100,10 +100,24 @@
|
|||||||
* schema CDATA #REQUIRED >
|
* schema CDATA #REQUIRED >
|
||||||
* ]]>
|
* ]]>
|
||||||
* ]|
|
* ]|
|
||||||
*/
|
*
|
||||||
|
* <refsect2>
|
||||||
/* TODO:
|
* <title>Binding</title>
|
||||||
* Talk about schema naming conventions, explain child settings
|
* <para>
|
||||||
|
* A very convenient feature of GSettings lets you bind #GObject properties
|
||||||
|
* directly to settings, using g_settings_bind(). Once a GObject property
|
||||||
|
* has been bound to a setting, changes on either side are automatically
|
||||||
|
* propagated to the other side.
|
||||||
|
* </para>
|
||||||
|
* <para>
|
||||||
|
* This makes it very easy to hook up a preferences dialog to the
|
||||||
|
* underlying settings. To make this even more convenient, GSettings
|
||||||
|
* looks for a boolean property with the name "sensitivity" and
|
||||||
|
* automatically binds it to the writability of the bound setting.
|
||||||
|
* If this 'magic' gets in the way, it can be suppressed with the
|
||||||
|
* #G_SETTINGS_BIND_NO_SENSITIVITY flag.
|
||||||
|
* </para>
|
||||||
|
* </refsect2>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct _GSettingsPrivate
|
struct _GSettingsPrivate
|
||||||
@@ -1081,11 +1095,13 @@ g_settings_binding_free (gpointer data)
|
|||||||
|
|
||||||
g_assert (!binding->running);
|
g_assert (!binding->running);
|
||||||
|
|
||||||
if (binding->key_handler_id)
|
if (g_signal_handler_is_connected (binding->settings,
|
||||||
|
binding->key_handler_id))
|
||||||
g_signal_handler_disconnect (binding->settings,
|
g_signal_handler_disconnect (binding->settings,
|
||||||
binding->key_handler_id);
|
binding->key_handler_id);
|
||||||
|
|
||||||
if (binding->property_handler_id)
|
if (g_signal_handler_is_connected (binding->object,
|
||||||
|
binding->property_handler_id))
|
||||||
g_signal_handler_disconnect (binding->object,
|
g_signal_handler_disconnect (binding->object,
|
||||||
binding->property_handler_id);
|
binding->property_handler_id);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user