mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 02:32: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;
|
||||
}
|
||||
|
||||
klass = g_type_class_ref (type);
|
||||
klass = g_type_class_get (type);
|
||||
if (klass == NULL)
|
||||
{
|
||||
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);
|
||||
|
||||
out:
|
||||
if (klass != NULL)
|
||||
g_type_class_unref (klass);
|
||||
return icon;
|
||||
}
|
||||
|
||||
@ -494,11 +492,10 @@ g_icon_deserialize_emblem (GVariant *value)
|
||||
GEnumClass *origin_class;
|
||||
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);
|
||||
if (origin_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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user