[gnome-photos] base-item: Simplify photos_base_item_can_edit
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: Simplify photos_base_item_can_edit
- Date: Mon, 27 Jun 2016 07:15:03 +0000 (UTC)
commit d60684b9009b517218863e0b927b3439d3da9481
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 a961b02..cfc7f8a 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1773,9 +1773,7 @@ photos_base_item_can_edit (PhotosBaseItem *self)
g_return_val_if_fail (!priv->collection, FALSE);
- 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]