[gnome-photos/wip/rishi/use-g-auto-00: 7/7] organize-collection-model: Simplify code
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/use-g-auto-00: 7/7] organize-collection-model: Simplify code
- Date: Sat, 27 Mar 2021 16:29:45 +0000 (UTC)
commit 3ad1506a4b627033f9e7c8c89fe8d8d6baf13fff
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Mar 27 16:59:17 2021 +0100
organize-collection-model: Simplify code
https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/201
src/photos-organize-collection-model.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-organize-collection-model.c b/src/photos-organize-collection-model.c
index aae3f95d..ee09bf5b 100644
--- a/src/photos-organize-collection-model.c
+++ b/src/photos-organize-collection-model.c
@@ -266,10 +266,7 @@ photos_organize_collection_model_get_placeholder (PhotosOrganizeCollectionModel
ret_val = gtk_tree_row_reference_get_path (self->placeholder_ref);
if (forget)
- {
- gtk_tree_row_reference_free (self->placeholder_ref);
- self->placeholder_ref = NULL;
- }
+ g_clear_pointer (&self->placeholder_ref, gtk_tree_row_reference_free);
return ret_val;
}
@@ -295,6 +292,5 @@ photos_organize_collection_model_remove_placeholder (PhotosOrganizeCollectionMod
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (self), &placeholder_iter, placeholder_path))
gtk_list_store_remove (GTK_LIST_STORE (self), &placeholder_iter);
- gtk_tree_row_reference_free (self->placeholder_ref);
- self->placeholder_ref = NULL;
+ g_clear_pointer (&self->placeholder_ref, gtk_tree_row_reference_free);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]