[bijiben] ListStore - Do not rebuild the whole store at each insertion



commit f23241fa83b16b1815e9e2b171c86b4b4915ecc0
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Thu Feb 14 00:47:42 2013 +0100

    ListStore - Do not rebuild the whole store at each insertion
    
    Instead, fix libbiji book to emit a signal indicating which note changed.
    BjbController has to choose the right operation according to this signal.
    
    Marshallers list is easier to build with libbiji on its own Makefile.

 src/Makefile.am                         |   34 +------
 src/bjb-bijiben.c                       |    2 +-
 src/bjb-controller.c                    |  182 +++++++++++++++++++++++++++----
 src/bjb-controller.h                    |    2 +
 src/bjb-main-view.h                     |    4 +
 src/libbiji/Makefile.am                 |   73 ++++++++++++
 src/libbiji/biji-date-time.c            |    2 +-
 src/libbiji/biji-marshalers.list        |    1 +
 src/libbiji/biji-note-book.c            |   47 +++++---
 src/libbiji/biji-note-book.h            |   14 ++-
 src/libbiji/biji-tracker.h              |    2 +-
 src/libbiji/biji-zeitgeist.c            |    2 +-
 src/libbiji/editor/biji-webkit-editor.c |    1 +
 src/libbiji/libbiji.h                   |    2 +
 14 files changed, 289 insertions(+), 79 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 8d9cd68..a9360b0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,7 +20,7 @@ AM_CFLAGS =\
 
 INCLUDES = -DDATADIR=\""$(datadir)"\"
 
-LDADD = libbiji.la \
+LDADD = libbiji/libbiji.la \
        -lm \
        $(top_builddir)/libgd/libgd.la \
        $(BIJIBEN_LIBS)
@@ -111,38 +111,6 @@ EXTRA_DIST = \
        resources/thumbnail-frame.png \
        $(NULL)
 
-noinst_LTLIBRARIES = \
-       libbiji.la
-
-libbiji_la_SOURCES =  \
-       libbiji/libbiji.h \
-       libbiji/biji-date-time.c \
-       libbiji/biji-date-time.h \
-       libbiji/biji-note-id.c \
-       libbiji/biji-note-id.h \
-       libbiji/biji-note-obj.c \
-       libbiji/biji-note-obj.h \
-       libbiji/biji-note-book.c \
-       libbiji/biji-note-book.h \
-       libbiji/biji-string.c \
-       libbiji/biji-string.h \
-       libbiji/biji-timeout.c \
-       libbiji/biji-timeout.h \
-       libbiji/biji-tracker.c \
-       libbiji/biji-tracker.h \
-       libbiji/biji-zeitgeist.c \
-       libbiji/biji-zeitgeist.h \
-       libbiji/deserializer/biji-lazy-deserializer.c \
-       libbiji/deserializer/biji-lazy-deserializer.h \
-       libbiji/editor/biji-editor-selection.c \
-       libbiji/editor/biji-editor-selection.h \
-       libbiji/editor/biji-editor-utils.c \
-       libbiji/editor/biji-editor-utils.h \
-       libbiji/editor/biji-webkit-editor.c \
-       libbiji/editor/biji-webkit-editor.h \
-       libbiji/serializer/biji-lazy-serializer.c \
-       libbiji/serializer/biji-lazy-serializer.h
-
 CLEANFILES = \
        $(BUILT_SOURCES)        \
        $(NULL)
diff --git a/src/bjb-bijiben.c b/src/bjb-bijiben.c
index e565927..57d974b 100644
--- a/src/bjb-bijiben.c
+++ b/src/bjb-bijiben.c
@@ -217,7 +217,7 @@ go_through_notes_cb (GFileEnumerator *enumerator, GAsyncResult *res, Bijiben *se
 
   g_list_free_full (notes_info, g_object_unref);
   g_list_free (notes_proposal);
-  biji_note_book_notify_changed (self->priv->book);
+  biji_note_book_notify_changed (self->priv->book, BIJI_BOOK_MASS_CHANGE, NULL);
 }
 
 static void
diff --git a/src/bjb-controller.c b/src/bjb-controller.c
index f004c73..8e852b3 100644
--- a/src/bjb-controller.c
+++ b/src/bjb-controller.c
@@ -95,11 +95,11 @@ bjb_controller_init (BjbController *self)
                               G_TYPE_BOOLEAN);   // state
 
   priv->model = GTK_TREE_MODEL(store) ;
-  
-  completion  = gtk_list_store_new (1, G_TYPE_STRING);
-  
-  priv->completion = GTK_TREE_MODEL(completion);
+  priv->notes_to_show = NULL;
+  priv->needle = NULL;
 
+  completion  = gtk_list_store_new (1, G_TYPE_STRING);
+  priv->completion = GTK_TREE_MODEL (completion);
 }
 
 static void
@@ -119,6 +119,7 @@ bjb_controller_finalize (GObject *object)
   BjbControllerPrivate *priv = self->priv ;
 
   free_notes_store (self);
+  g_object_unref (priv->model);
 
   g_object_unref (priv->completion);
   g_free (priv->needle);
@@ -174,17 +175,23 @@ bjb_controller_set_property (GObject  *object,
   }
 }
 
-/* Implement model */
-
 static void
-bjb_controller_add_note ( BijiNoteObj *note, BjbController *self )
+bjb_controller_add_note (BjbController *self,
+                         BijiNoteObj   *note,
+                         gboolean       prepend)
 {
   GtkTreeIter    iter;
   GtkListStore  *store;
   GdkPixbuf     *pix = NULL;
-  gchar *path;
+  gchar         *path;
+
+  store = GTK_LIST_STORE (self->priv->model);
+
+  if (prepend)
+    gtk_list_store_insert (store, &iter, 0);
 
-  store = GTK_LIST_STORE(self->priv->model);
+  else
+    gtk_list_store_append (store, &iter);
 
   /* Only append notes which are not templates. Currently useless */
   if ( biji_note_obj_is_template (note) == FALSE)
@@ -208,7 +215,6 @@ bjb_controller_add_note ( BijiNoteObj *note, BjbController *self )
      * currently use the same model */
     path = biji_note_obj_get_path (note);
 
-    gtk_list_store_append (store,&iter);
     gtk_list_store_set (store, 
                         &iter,
                         COL_URN,    path,
@@ -224,19 +230,77 @@ bjb_controller_add_note ( BijiNoteObj *note, BjbController *self )
   }
 }
 
+/* If the user searches for notes, is the note searched? */
+static void
+bjb_controller_add_note_if_needed (BjbController *self,
+                                   BijiNoteObj   *note,
+                                   gboolean       prepend)
+{
+  gboolean need_to_add_note =FALSE;
+  gchar *title, *content;
+  GList *collections, *l;
+  BjbControllerPrivate *priv = self->priv;
+
+  /* No note... */
+  if (!note || !BIJI_IS_NOTE_OBJ (note))
+    return;
+
+  /* No search - we add the note */
+  if (!priv->needle || g_strcmp0 (priv->needle, "")==0)
+  {
+    need_to_add_note = TRUE;
+  }
+
+  /* a search.. we test...*/
+  else
+  {
+
+    title = biji_note_obj_get_title (note);
+    content = biji_note_get_raw_text (note);
+
+    /* matching title or content ... */
+    if (g_strrstr (title  , priv->needle) != NULL ||
+        g_strrstr (content, priv->needle) != NULL  )
+      need_to_add_note = TRUE;
+
+    /* last chance, matching collections... */
+    else
+    {
+      collections = biji_note_obj_get_collections (note);
+    
+      for (l = collections; l != NULL; l=l->next)
+      {
+        if (g_strrstr (l->data, title))
+        {
+          need_to_add_note = TRUE;
+          break;
+        }
+      }
+
+      g_list_free (collections);
+    }
+  }
+
+  if (need_to_add_note)
+    bjb_controller_add_note (self, note, prepend);
+}
+
 void
 bjb_controller_update_view (BjbController *self)
 {
-  GList *notes ;
+  GList *notes, *l;
 
   /* Do not update if nothing to show */
   if (!self->priv->cur)
     return;
 
   notes = self->priv->notes_to_show ;
+  free_notes_store (self);
 
-  free_notes_store(self);
-  g_list_foreach (notes,(GFunc)bjb_controller_add_note,self);
+  for (l = notes; l != NULL; l = l->next)
+  {
+    bjb_controller_add_note (self, l->data, FALSE);
+  }
 }
 
 static gint
@@ -276,20 +340,20 @@ update_controller_callback (GObject *source_object,
   sort_and_update (self);
 }
 
-static void
+void
 bjb_controller_apply_needle ( BjbController *self )
 {
   gchar *needle ;
 
-  g_list_free(self->priv->notes_to_show);
-  self->priv->notes_to_show = NULL ;
+  if (self->priv->notes_to_show)
+    g_clear_pointer (&self->priv->notes_to_show, g_list_free);
   
-  needle = self->priv->needle ;
+  needle = self->priv->needle;
 
   /* Show all notes */
-  if ( needle == NULL || g_strcmp0 (needle,"") == 0)
+  if (needle == NULL || g_strcmp0 (needle,"") == 0)
   {
-    self->priv->notes_to_show = biji_note_book_get_notes(self->priv->book);
+    self->priv->notes_to_show = biji_note_book_get_notes (self->priv->book);
     sort_and_update (self);
     return;
   }
@@ -334,11 +398,80 @@ refresh_completion(BjbController *self)
   }
 }
 
+static gboolean
+bjb_controller_get_iter_at_note (BjbController *self, gchar *needle, GtkTreeIter **iter)
+{
+  BjbControllerPrivate *priv = self->priv;
+  gboolean retval = FALSE;
+  gboolean still = gtk_tree_model_get_iter_first (priv->model, *iter);
+
+  while (still)
+  {
+    gchar *note_path;
+
+    gtk_tree_model_get (priv->model, *iter, GD_MAIN_COLUMN_URI, &note_path,-1);
+
+    if (g_strcmp0 (note_path, needle)==0)
+      retval = TRUE;
+
+    g_free (note_path);
+
+    if (retval)
+      break;
+
+    else
+      still = gtk_tree_model_iter_next (priv->model, *iter);
+  }
+
+  return retval;
+}
+
+/* Depending on the change at data level,
+ * the view has to be totaly refreshed or just amended */
 static void
-on_book_changed ( BijiNoteBook *book, BjbController *self )
+on_book_changed (BijiNoteBook           *book,
+                 BijiNoteBookChangeFlag  flag,
+                 gchar                  *note_path,
+                 BjbController          *self)
 {
+  BjbControllerPrivate *priv = self->priv;
+  BijiNoteObj *note;
+  GtkTreeIter iter;
+  GtkTreeIter *p_iter = &iter;
+
+  switch (flag)
+  {
+    /* If this is a *new* note, per def prepend
+     * But do not add a new note to a search window */
+    case BIJI_BOOK_NOTE_ADDED:
+      note = note_book_get_note_at_path (book, note_path);
+      if (note)
+      {
+        bjb_controller_add_note_if_needed (self, note, TRUE);
+        priv->notes_to_show = g_list_prepend (priv->notes_to_show, note);
+      }
+      break;
+
+    /* If the note is *amended*, then per definition we prepend.
+     * but if we add other ordering this does not work */
+    case BIJI_BOOK_NOTE_AMENDED:
+      if (bjb_controller_get_iter_at_note (self, note_path, &p_iter))
+      {
+        gtk_list_store_remove (GTK_LIST_STORE (priv->model), p_iter);
+        note = note_book_get_note_at_path (book, note_path);
+        if (note)
+          bjb_controller_add_note_if_needed (self, note, TRUE);
+      }
+      break;
+
+    /* Trashed? rebuilding the whole model might be more simple */
+    case BIJI_BOOK_NOTE_TRASHED:
+    default:
+      bjb_controller_apply_needle (self);
+  }
+
+  /* we refresh the whole completion model each time */
   refresh_completion(self);
-  bjb_controller_apply_needle (self);
 }
 
 void
@@ -440,8 +573,11 @@ bjb_controller_set_book (BjbController *self, BijiNoteBook  *book )
 void
 bjb_controller_set_needle (BjbController *self, const gchar *needle )
 {
-  self->priv->needle = g_strdup(needle);
-  on_needle_changed(self);
+  if (self->priv->needle)
+    g_free (self->priv->needle);
+
+  self->priv->needle = g_strdup (needle);
+  on_needle_changed (self);
 }
 
 gchar *
diff --git a/src/bjb-controller.h b/src/bjb-controller.h
index 450eeca..5091679 100644
--- a/src/bjb-controller.h
+++ b/src/bjb-controller.h
@@ -71,6 +71,8 @@ enum
 
 BjbController * bjb_controller_new ( BijiNoteBook *book, gchar *needle ) ;
 
+void bjb_controller_apply_needle (BjbController *self);
+
 void bjb_controller_update_view (BjbController *self);
 
 void bjb_controller_set_book (BjbController * self, BijiNoteBook * book ) ;
diff --git a/src/bjb-main-view.h b/src/bjb-main-view.h
index f91ed30..d891bc9 100644
--- a/src/bjb-main-view.h
+++ b/src/bjb-main-view.h
@@ -55,6 +55,10 @@ void action_tag_selected_notes (GtkWidget *w, BjbMainView *view);
 
 void action_delete_selected_notes(GtkWidget *w,BjbMainView *view);
 
+gboolean bjb_main_view_get_iter_at_note (BjbMainView  *view,
+                                         BijiNoteObj  *note,
+                                         GtkTreeIter  *retval);
+
 void update_notes_with_tag_search(BjbMainView *view, gchar *tag);
 
 void update_notes_with_string_search(BjbMainView *view, gchar *needle);
diff --git a/src/libbiji/Makefile.am b/src/libbiji/Makefile.am
index e69de29..1fa49fe 100644
--- a/src/libbiji/Makefile.am
+++ b/src/libbiji/Makefile.am
@@ -0,0 +1,73 @@
+noinst_LTLIBRARIES = \
+       libbiji.la
+
+libbiji_la_SOURCES =  \
+       libbiji.h \
+       biji-date-time.c \
+       biji-date-time.h \
+       biji-marshalers.c \
+       biji-marshalers.h \
+       biji-note-id.c \
+       biji-note-id.h \
+       biji-note-obj.c \
+       biji-note-obj.h \
+       biji-note-book.c \
+       biji-note-book.h \
+       biji-string.c \
+       biji-string.h \
+       biji-timeout.c \
+       biji-timeout.h \
+       biji-tracker.c \
+       biji-tracker.h \
+       biji-zeitgeist.c \
+       biji-zeitgeist.h \
+       deserializer/biji-lazy-deserializer.c \
+       deserializer/biji-lazy-deserializer.h \
+       editor/biji-editor-selection.c \
+       editor/biji-editor-selection.h \
+       editor/biji-editor-utils.c \
+       editor/biji-editor-utils.h \
+       editor/biji-webkit-editor.c \
+       editor/biji-webkit-editor.h \
+       serializer/biji-lazy-serializer.c \
+       serializer/biji-lazy-serializer.h
+
+AM_CPPFLAGS = \
+       -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+       -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+       -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+       -I$(top_srcdir)/libgd \
+       -I$(top_srcdir)/src/ \
+       -I$(top_srcdir)/src/libiji \
+       $(BIJIBEN_CFLAGS)
+
+AM_CFLAGS =\
+        -Wall\
+        -g
+
+INCLUDES = -DDATADIR=\""$(datadir)"\"
+
+biji-marshalers.h: stamp-biji-marshalers.h
+       @true
+
+stamp-biji-marshalers.h: biji-marshalers.list Makefile
+       $(AM_V_GEN) ( \
+               ( glib-genmarshal \
+                       --prefix=_biji_marshal \
+                       --header $(srcdir)/biji-marshalers.list \
+               ) >> xgen-tmh \
+               && ( cmp -s xgen-tmh biji-marshalers.h || cp xgen-tmh biji-marshalers.h ) \
+               && rm -f xgen-tmh \
+               && echo timestamp > $(@F) \
+       )
+
+biji-marshalers.c: biji-marshalers.list biji-marshalers.h Makefile
+       $(AM_V_GEN) ( \
+               echo "#include \"biji-marshalers.h\"" > xgen-tmc \
+               && ( glib-genmarshal \
+                       --prefix=_biji_marshal \
+                       --body $(srcdir)/biji-marshalers.list \
+                  ) >> xgen-tmc \
+               && cp xgen-tmc biji-marshalers.c \
+               && rm -f xgen-tmc \
+       )
diff --git a/src/libbiji/biji-date-time.c b/src/libbiji/biji-date-time.c
index a049cd8..9403c85 100644
--- a/src/libbiji/biji-date-time.c
+++ b/src/libbiji/biji-date-time.c
@@ -16,7 +16,7 @@
 
 #include <glib/gi18n.h>
 
-#include "biji-date-time.h"
+#include "libbiji.h"
 
 gchar *
 biji_get_time_diff_with_time (glong sec_since_epoch)
diff --git a/src/libbiji/biji-marshalers.list b/src/libbiji/biji-marshalers.list
new file mode 100644
index 0000000..f8ebf72
--- /dev/null
+++ b/src/libbiji/biji-marshalers.list
@@ -0,0 +1 @@
+VOID:ENUM,STRING
diff --git a/src/libbiji/biji-note-book.c b/src/libbiji/biji-note-book.c
index 6aef3c9..281e1d0 100644
--- a/src/libbiji/biji-note-book.c
+++ b/src/libbiji/biji-note-book.c
@@ -19,8 +19,6 @@
 #include <uuid/uuid.h>
 
 #include "libbiji.h"
-#include "biji-note-book.h"
-#include "deserializer/biji-lazy-deserializer.h"
 
 
 struct _BijiNoteBookPrivate
@@ -171,12 +169,22 @@ biji_note_book_get_unique_title (BijiNoteBook *book, gchar *title)
 }
 
 gboolean
-biji_note_book_notify_changed (BijiNoteBook *book)
+biji_note_book_notify_changed (BijiNoteBook            *book,
+                               BijiNoteBookChangeFlag   flag,
+                               gchar                   *note)
 {
-  g_signal_emit ( G_OBJECT (book), biji_book_signals[BOOK_AMENDED],0);
+  g_signal_emit (G_OBJECT (book), biji_book_signals[BOOK_AMENDED], 0, flag, note);
   return FALSE;
 }
 
+void
+book_on_note_changed_cb (BijiNoteObj *note, BijiNoteBook *book)
+{
+  gchar *path = biji_note_obj_get_path (note);
+  biji_note_book_notify_changed (book, BIJI_BOOK_NOTE_AMENDED, path);
+  g_free (path);
+}
+
 static void
 _biji_note_book_add_one_note(BijiNoteBook *book,BijiNoteObj *note)
 {
@@ -188,9 +196,8 @@ _biji_note_book_add_one_note(BijiNoteBook *book,BijiNoteObj *note)
   g_hash_table_insert (book->priv->notes,
                        biji_note_obj_get_path (note), note);
 
-  book->priv->note_renamed = g_signal_connect_swapped (note,"renamed",
-                                            G_CALLBACK(biji_note_book_notify_changed),book);
-  g_signal_connect_swapped (note,"changed", G_CALLBACK(biji_note_book_notify_changed),book);
+  g_signal_connect (note, "changed", G_CALLBACK (book_on_note_changed_cb), book);
+  g_signal_connect (note, "renamed", G_CALLBACK (book_on_note_changed_cb), book);
 }
 
 #define ATTRIBUTES_FOR_NOTEBOOK "standard::content-type,standard::name"
@@ -264,7 +271,7 @@ enumerate_next_files_ready_cb (GObject *source,
   g_free (base_path);
   g_list_free_full (files, g_object_unref);
 
-  biji_note_book_notify_changed (self);
+  biji_note_book_notify_changed (self, BIJI_BOOK_MASS_CHANGE, NULL);
 }
 
 static void
@@ -339,13 +346,12 @@ biji_note_book_class_init (BijiNoteBookClass *klass)
   object_class->set_property = biji_note_book_set_property;
   object_class->get_property = biji_note_book_get_property;
 
-  biji_book_signals[BOOK_AMENDED] = g_signal_new ( "changed" ,
-                                                   G_OBJECT_CLASS_TYPE (klass),
-                                                   G_SIGNAL_RUN_LAST,
-                                                   0, NULL, NULL,
-                                                   g_cclosure_marshal_VOID__VOID,
-                                                   G_TYPE_NONE,
-                                                   0);
+  biji_book_signals[BOOK_AMENDED] =
+    g_signal_new ("changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST,
+                  0, NULL, NULL,                         /* offset & accumulator */
+                  _biji_marshal_VOID__ENUM_STRING,
+                  G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_STRING);
+
   properties[PROP_LOCATION] =
     g_param_spec_object("location",
                         "The book location",
@@ -357,7 +363,7 @@ biji_note_book_class_init (BijiNoteBookClass *klass)
   g_type_class_add_private (klass, sizeof (BijiNoteBookPrivate));
 }
 
-gboolean 
+gboolean
 _note_book_remove_one_note(BijiNoteBook *book,BijiNoteObj *note)
 {
   BijiNoteObj *to_delete = NULL;
@@ -373,7 +379,7 @@ _note_book_remove_one_note(BijiNoteBook *book,BijiNoteObj *note)
     g_object_ref (to_delete);
     g_hash_table_remove (book->priv->notes, path);
     biji_note_obj_trash (note);
-    g_signal_emit ( G_OBJECT (book), biji_book_signals[BOOK_AMENDED],0);
+    biji_note_book_notify_changed (book, BIJI_BOOK_NOTE_TRASHED, path);
     retval = TRUE;
   }
 
@@ -389,8 +395,13 @@ biji_note_book_append_new_note (BijiNoteBook *book, BijiNoteObj *note, gboolean
   g_return_if_fail (BIJI_IS_NOTE_OBJ (note));
 
   _biji_note_book_add_one_note (book,note);
+
   if (notify)
-    biji_note_book_notify_changed (book);
+  {
+    gchar *path = biji_note_obj_get_path (note);
+    biji_note_book_notify_changed (book, BIJI_BOOK_NOTE_ADDED, path);
+    g_free (path);
+  }
 }
 
 gboolean 
diff --git a/src/libbiji/biji-note-book.h b/src/libbiji/biji-note-book.h
index 94729bf..0dfea72 100644
--- a/src/libbiji/biji-note-book.h
+++ b/src/libbiji/biji-note-book.h
@@ -9,6 +9,16 @@ G_BEGIN_DECLS
 
 #define DEFAULT_NOTE_TITLE "New Note"
 
+/* The flag tells if view should reload the whole model or not */
+typedef enum
+{
+  BIJI_BOOK_CHANGE_FLAG,
+  BIJI_BOOK_MASS_CHANGE,   // Startup, mass import.. rather rebuild the whole.
+  BIJI_BOOK_NOTE_ADDED,    // Single note added
+  BIJI_BOOK_NOTE_AMENDED,  // Single note amended (title, color,...)
+  BIJI_BOOK_NOTE_TRASHED,  // Single note trashed
+} BijiNoteBookChangeFlag;
+
 #define BIJI_TYPE_NOTE_BOOK             (biji_note_book_get_type ())
 #define BIJI_NOTE_BOOK(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), BIJI_TYPE_NOTE_BOOK, 
BijiNoteBook))
 #define BIJI_NOTE_BOOK_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), BIJI_TYPE_NOTE_BOOK, 
BijiNoteBookClass))
@@ -44,7 +54,9 @@ void _biji_note_book_add_note_to_tag_book(BijiNoteBook *book,BijiNoteObj *note,g
 
 void biji_note_book_append_new_note (BijiNoteBook *book, BijiNoteObj *note, gboolean notify);
 
-gboolean biji_note_book_notify_changed (BijiNoteBook *book);
+gboolean biji_note_book_notify_changed (BijiNoteBook           *book,
+                                        BijiNoteBookChangeFlag  flag,
+                                        gchar                  *note);
 
 gboolean biji_note_book_remove_note(BijiNoteBook *book,BijiNoteObj *note);
 
diff --git a/src/libbiji/biji-tracker.h b/src/libbiji/biji-tracker.h
index eb84a99..41b3f5a 100644
--- a/src/libbiji/biji-tracker.h
+++ b/src/libbiji/biji-tracker.h
@@ -22,7 +22,7 @@
 #include <gtk/gtk.h>
 #include <tracker-sparql.h>
 
-#include <libbiji/libbiji.h>
+#include "libbiji.h"
 
 /* todo : find this on glib */
 typedef void (*BijiFunc) (gpointer user_data);
diff --git a/src/libbiji/biji-zeitgeist.c b/src/libbiji/biji-zeitgeist.c
index d7a7d20..9b31467 100644
--- a/src/libbiji/biji-zeitgeist.c
+++ b/src/libbiji/biji-zeitgeist.c
@@ -16,7 +16,7 @@
 
 #include "biji-zeitgeist.h"
 
-#include <libbiji/libbiji.h>
+#include <libbiji.h>
 #include "biji-zeitgeist.h"
 
 static ZeitgeistLog *global_log;
diff --git a/src/libbiji/editor/biji-webkit-editor.c b/src/libbiji/editor/biji-webkit-editor.c
index 584fe49..d1eb731 100644
--- a/src/libbiji/editor/biji-webkit-editor.c
+++ b/src/libbiji/editor/biji-webkit-editor.c
@@ -17,6 +17,7 @@
 
 #include <libxml/xmlwriter.h>
 
+#include "config.h"
 #include "../biji-string.h"
 #include "../biji-note-book.h"
 #include "biji-webkit-editor.h"
diff --git a/src/libbiji/libbiji.h b/src/libbiji/libbiji.h
index 708fa1b..2b0432e 100644
--- a/src/libbiji/libbiji.h
+++ b/src/libbiji/libbiji.h
@@ -21,11 +21,13 @@
 #define _LIBBIJI_INSIDE_H
 
 #include "biji-date-time.h"
+#include "biji-marshalers.h"
 #include "biji-note-book.h"
 #include "biji-note-obj.h"
 #include "biji-string.h"
 #include "biji-tracker.h"
 #include "biji-zeitgeist.h"
+#include "deserializer/biji-lazy-deserializer.h"
 #include "editor/biji-webkit-editor.h"
 
 #undef _LIBBIJI_INSIDE_H


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