[bijiben] manager : save restored items for tracker



commit 065ac94a585179b9badaf7148aa0fe794724bbaa
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Thu Mar 6 22:29:44 2014 +0100

    manager : save restored items for tracker
    
    We need to push the note back to database

 src/libbiji/biji-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libbiji/biji-manager.c b/src/libbiji/biji-manager.c
index 6ad010b..0149f78 100644
--- a/src/libbiji/biji-manager.c
+++ b/src/libbiji/biji-manager.c
@@ -319,6 +319,9 @@ on_item_deleted_cb (BijiItem *item, BijiManager *manager)
  * old uuid : we need this because local provider uses
  * file name as uuid. Now this proves this is not right.
  *
+ * save : in order to restore the note inside tracker
+ *
+ *
  * notify... BIJI_ARCHIVED_ITEM
  * well, works currently : we assume Archives change.
  * but we might double-ping as well
@@ -327,6 +330,9 @@ on_item_deleted_cb (BijiItem *item, BijiManager *manager)
 static void
 on_item_restored_cb (BijiItem *item, gchar *old_uuid, BijiManager *manager)
 {
+  if (BIJI_IS_NOTE_OBJ (item))
+    biji_note_obj_save_note (BIJI_NOTE_OBJ (item));
+
   g_hash_table_insert (manager->priv->items,
                        (gpointer) biji_item_get_uuid (item), item);
   g_hash_table_remove (manager->priv->archives, old_uuid);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]