mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
Use g_set_object() in a lot of places, and splrinkle some g_clear_object()
This commit is contained in:
parent
23ea457751
commit
1b7d63cce9
28 changed files with 129 additions and 413 deletions
|
@ -270,22 +270,16 @@ colorsel_cmyk_set_config (GimpColorSelector *selector,
|
|||
if (config != module->config)
|
||||
{
|
||||
if (module->config)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (module->config,
|
||||
colorsel_cmyk_config_changed,
|
||||
module);
|
||||
g_object_unref (module->config);
|
||||
}
|
||||
g_signal_handlers_disconnect_by_func (module->config,
|
||||
colorsel_cmyk_config_changed,
|
||||
module);
|
||||
|
||||
module->config = config;
|
||||
g_set_object (&module->config, config);
|
||||
|
||||
if (module->config)
|
||||
{
|
||||
g_object_ref (module->config);
|
||||
g_signal_connect_swapped (module->config, "notify",
|
||||
G_CALLBACK (colorsel_cmyk_config_changed),
|
||||
module);
|
||||
}
|
||||
g_signal_connect_swapped (module->config, "notify",
|
||||
G_CALLBACK (colorsel_cmyk_config_changed),
|
||||
module);
|
||||
|
||||
colorsel_cmyk_config_changed (module);
|
||||
}
|
||||
|
|
|
@ -235,17 +235,14 @@ colorsel_water_set_config (GimpColorSelector *selector,
|
|||
g_signal_handlers_disconnect_by_func (water->config,
|
||||
colorsel_water_destroy_transform,
|
||||
water);
|
||||
g_object_unref (water->config);
|
||||
|
||||
colorsel_water_destroy_transform (water);
|
||||
}
|
||||
|
||||
water->config = config;
|
||||
g_set_object (&water->config, config);
|
||||
|
||||
if (water->config)
|
||||
{
|
||||
g_object_ref (water->config);
|
||||
|
||||
g_signal_connect_swapped (water->config, "notify",
|
||||
G_CALLBACK (colorsel_water_destroy_transform),
|
||||
water);
|
||||
|
|
|
@ -1463,17 +1463,14 @@ gimp_color_wheel_set_color_config (GimpColorWheel *wheel,
|
|||
g_signal_handlers_disconnect_by_func (priv->config,
|
||||
gimp_color_wheel_destroy_transform,
|
||||
wheel);
|
||||
g_object_unref (priv->config);
|
||||
|
||||
gimp_color_wheel_destroy_transform (wheel);
|
||||
}
|
||||
|
||||
priv->config = config;
|
||||
g_set_object (&priv->config, config);
|
||||
|
||||
if (priv->config)
|
||||
{
|
||||
g_object_ref (priv->config);
|
||||
|
||||
g_signal_connect_swapped (priv->config, "notify",
|
||||
G_CALLBACK (gimp_color_wheel_destroy_transform),
|
||||
wheel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue