[bijiben] Add zeitgeist LEAVE and DELETE event
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] Add zeitgeist LEAVE and DELETE event
- Date: Wed, 10 Jul 2013 22:41:15 +0000 (UTC)
commit 78759e50cc44deb20831e4402d5f9bbbaa954517
Author: Manish Sinha <manishsinha ubuntu com>
Date: Thu Jul 11 00:36:12 2013 +0200
Add zeitgeist LEAVE and DELETE event
See 703703
src/libbiji/biji-note-obj.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/libbiji/biji-note-obj.c b/src/libbiji/biji-note-obj.c
index 7c2f987..a08aab3 100644
--- a/src/libbiji/biji-note-obj.c
+++ b/src/libbiji/biji-note-obj.c
@@ -240,6 +240,9 @@ biji_note_obj_trash (BijiItem *item)
note_to_kill = BIJI_NOTE_OBJ (item);
priv = note_to_kill->priv;
+ /* The event has to be logged before the note is actually deleted */
+ insert_zeitgeist (note_to_kill, ZEITGEIST_ZG_DELETE_EVENT);
+
priv->needs_save = FALSE;
biji_timeout_cancel (priv->timeout);
biji_note_delete_from_tracker (note_to_kill);
@@ -251,7 +254,6 @@ biji_note_obj_trash (BijiItem *item)
icon = g_file_new_for_path (icon_path);
g_file_delete (icon, NULL, NULL);
- /* TODO : zeitgeist */
g_signal_emit (G_OBJECT (note_to_kill), biji_obj_signals[NOTE_DELETED], 0);
//g_clear_object (¬e_to_kill);
@@ -854,6 +856,8 @@ _biji_note_obj_close (BijiNoteObj *note)
book = biji_item_get_book (BIJI_ITEM (note));
priv->editor = NULL;
+ insert_zeitgeist (note, ZEITGEIST_ZG_LEAVE_EVENT);
+
/* Delete if note is totaly blank
* Actually we just need to remove it from book
* since no change could trigger save */
@@ -890,7 +894,7 @@ biji_note_obj_open (BijiNoteObj *note)
g_signal_connect_swapped (note->priv->editor, "destroy",
G_CALLBACK (_biji_note_obj_close), note);
- insert_zeitgeist (note, ZEITGEIST_ZG_ACCESS_EVENT) ;
+ insert_zeitgeist (note, ZEITGEIST_ZG_ACCESS_EVENT);
return GTK_WIDGET (note->priv->editor);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]