[gnome-photos] selection-toolbar: Make the favorite button work
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] selection-toolbar: Make the favorite button work
- Date: Thu, 16 Aug 2012 18:07:33 +0000 (UTC)
commit 1683575e8cf07ab9c26604f6553cbbddaac66a6f
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Aug 15 01:06:35 2012 +0200
selection-toolbar: Make the favorite button work
src/photos-selection-toolbar.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-selection-toolbar.c b/src/photos-selection-toolbar.c
index 8edfc4b..5e7d006 100644
--- a/src/photos-selection-toolbar.c
+++ b/src/photos-selection-toolbar.c
@@ -145,7 +145,13 @@ photos_selection_toolbar_favorite_clicked (GtkButton *button, gpointer user_data
selection = photos_selection_controller_get_selection (priv->sel_cntrlr);
for (l = selection; l != NULL; l = l->next)
{
- /* TODO: fave the doc */
+ const gchar *urn = (gchar *) l->data;
+ PhotosBaseItem *item;
+ gboolean favorite;
+
+ item = PHOTOS_BASE_ITEM (photos_base_manager_get_object_by_id (priv->item_mngr, urn));
+ favorite = photos_base_item_is_favorite (item);
+ photos_base_item_set_favorite (item, !favorite);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]