[bijiben] import gnote and tomboy standard folders at first startup



commit 3db1acbe25087eecc069173989a9baf7a8d36a50
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Mon Oct 7 23:08:17 2013 +0200

    import gnote and tomboy standard folders at first startup
    
    See 709024

 src/bjb-bijiben.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/src/bjb-bijiben.c b/src/bjb-bijiben.c
index 0fc0bd4..e3e534a 100644
--- a/src/bjb-bijiben.c
+++ b/src/bjb-bijiben.c
@@ -35,7 +35,7 @@ struct _BijibenPriv
 
 
 
-  /* Controls. 1st run is not used yet. to_open is for startup */
+  /* Controls. to_open is for startup */
 
   gboolean     first_run;
   gboolean     is_loaded;
@@ -293,6 +293,7 @@ bijiben_startup (GApplication *application)
   gchar          *storage_path, *default_color;
   GFile          *storage;
   GError         *error;
+  gchar          *path; 
   GdkRGBA         color = {0,0,0,0};
 
 
@@ -347,6 +348,19 @@ bijiben_startup (GApplication *application)
   /* Goa */
   goa_client_new  (NULL, on_client_got, self); // cancellable
 
+
+  /* Automatic imports on startup */
+  if (self->priv->first_run == TRUE)
+  {
+    path = g_build_filename (g_get_user_data_dir (), "tomboy", NULL);
+    bijiben_import_notes (self, path);
+    g_free (path);
+
+    path = g_build_filename (g_get_user_data_dir (), "gnote", NULL);
+    bijiben_import_notes (self, path);
+    g_free (path);
+  }
+
   /* Create the first window */
   out:
   bijiben_new_window_internal (BIJIBEN_APPLICATION (application), NULL, NULL, error);


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