mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
icon: Stop using g_type_class_ref/unref
These are just wrappers for g_type_class_get/nothing now.
This commit is contained in:
parent
fc1f70d3e7
commit
55062da46a
@ -331,7 +331,7 @@ g_icon_new_from_tokens (char **tokens,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
klass = g_type_class_ref (type);
|
klass = g_type_class_get (type);
|
||||||
if (klass == NULL)
|
if (klass == NULL)
|
||||||
{
|
{
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
@ -382,8 +382,6 @@ g_icon_new_from_tokens (char **tokens,
|
|||||||
icon = icon_iface->from_tokens (tokens + 1, num_tokens - 1, version, error);
|
icon = icon_iface->from_tokens (tokens + 1, num_tokens - 1, version, error);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (klass != NULL)
|
|
||||||
g_type_class_unref (klass);
|
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -494,11 +492,10 @@ g_icon_deserialize_emblem (GVariant *value)
|
|||||||
GEnumClass *origin_class;
|
GEnumClass *origin_class;
|
||||||
GEnumValue *origin_value;
|
GEnumValue *origin_value;
|
||||||
|
|
||||||
origin_class = g_type_class_ref (G_TYPE_EMBLEM_ORIGIN);
|
origin_class = g_type_class_get (G_TYPE_EMBLEM_ORIGIN);
|
||||||
origin_value = g_enum_get_value_by_nick (origin_class, origin_nick);
|
origin_value = g_enum_get_value_by_nick (origin_class, origin_nick);
|
||||||
if (origin_value)
|
if (origin_value)
|
||||||
emblem = g_emblem_new_with_origin (emblem_icon, origin_value->value);
|
emblem = g_emblem_new_with_origin (emblem_icon, origin_value->value);
|
||||||
g_type_class_unref (origin_class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We didn't create it with an origin, so do it without. */
|
/* We didn't create it with an origin, so do it without. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user