mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
sortlistmodel: Cosmetics
Make the set_[section]_sorter functions a bit more symmetric.
This commit is contained in:
parent
54ec750238
commit
c80a0c0e85
@ -1195,11 +1195,7 @@ gtk_sort_list_model_set_sorter (GtkSortListModel *self,
|
||||
return;
|
||||
|
||||
gtk_sort_list_model_clear_real_sorter (self);
|
||||
g_clear_object (&self->sorter);
|
||||
|
||||
if (sorter)
|
||||
self->sorter = g_object_ref (sorter);
|
||||
|
||||
g_set_object (&self->sorter, sorter);
|
||||
gtk_sort_list_model_ensure_real_sorter (self);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SORTER]);
|
||||
@ -1241,11 +1237,7 @@ gtk_sort_list_model_set_section_sorter (GtkSortListModel *self,
|
||||
return;
|
||||
|
||||
gtk_sort_list_model_clear_real_sorter (self);
|
||||
g_clear_object (&self->section_sorter);
|
||||
|
||||
if (sorter)
|
||||
self->section_sorter = g_object_ref (sorter);
|
||||
|
||||
g_set_object (&self->section_sorter, sorter);
|
||||
gtk_sort_list_model_ensure_real_sorter (self);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SECTION_SORTER]);
|
||||
|
Loading…
Reference in New Issue
Block a user