[gnome-photos/gnome-3-20] base-item: Simplify photos_base_item_can_edit
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-20] base-item: Simplify photos_base_item_can_edit
- Date: Mon, 27 Jun 2016 07:15:21 +0000 (UTC)
commit 1b2db97643101345354261b63e81ba6006fb23f5
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Jun 27 08:55:53 2016 +0200
base-item: Simplify photos_base_item_can_edit
Unless the Tracker metadata is corrupted, every BaseItem will now have
a valid filename. Therefore, there is no point in using it to determine
if a BaseItem can be edited or not. In case the metadata is corrupted,
it should be handled by the relevant g_return_if_fail* checks.
https://bugzilla.gnome.org/show_bug.cgi?id=766162
src/photos-base-item.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 28564d4..bef9dd0 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1678,9 +1678,7 @@ photos_base_item_can_edit (PhotosBaseItem *self)
g_return_val_if_fail (PHOTOS_IS_BASE_ITEM (self), FALSE);
priv = self->priv;
- return PHOTOS_BASE_ITEM_GET_CLASS (self)->create_pipeline_path != NULL
- && priv->filename != NULL
- && priv->filename[0] != '\0';
+ return PHOTOS_BASE_ITEM_GET_CLASS (self)->create_pipeline_path != NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]