[bijiben] localNote: update "location" when note is trashed



commit 61494a4c4054630eb91bc7e0e262e1ce9ca3e631
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Sun Mar 2 22:17:03 2014 +0100

    localNote: update "location" when note is trashed
    
    So we can restore it without first closing application...

 src/libbiji/biji-local-note.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/libbiji/biji-local-note.c b/src/libbiji/biji-local-note.c
index 7d997d7..617b03d 100644
--- a/src/libbiji/biji-local-note.c
+++ b/src/libbiji/biji-local-note.c
@@ -184,6 +184,13 @@ local_note_archive (BijiNoteObj *note)
     g_message ("%s", error->message);
     g_error_free (error);
     error = NULL;
+    g_object_unref (archive);
+  }
+
+  else
+  {
+    g_object_unref (self->priv->location);
+    self->priv->location = archive;
   }
 
 
@@ -192,7 +199,6 @@ local_note_archive (BijiNoteObj *note)
   g_free (trash_path);
   g_object_unref (trash);
   g_free (backup_path);
-  g_object_unref (archive);
 
   return result;
 }


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