[evolution-data-server/openismus-work-master: 37/37] EBookBackendFile: Implement EBookBackend->set_locale()



commit 6da4b0c2c137c18db3a22e181035d66988fb1ff3
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Thu May 23 16:26:26 2013 +0900

    EBookBackendFile: Implement EBookBackend->set_locale()

 addressbook/backends/file/e-book-backend-file.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 986d84f..75e794b 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -1605,6 +1605,22 @@ book_backend_file_sync (EBookBackend *backend)
        /* FIXME: Tell sqlite to dump NOW ! */
 }
 
+static void
+book_backend_file_set_locale (EBookBackend *backend,
+                             const gchar  *locale)
+{
+       EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
+       GError *error = NULL;
+
+       if (!e_book_backend_sqlitedb_set_locale (bf->priv->sqlitedb,
+                                                SQLITEDB_FOLDER_ID,
+                                                locale,
+                                                &error)) {
+               g_warning ("Failed to set locale on SQLiteDB: %s", error->message);
+               g_error_free (error);
+       }
+}
+
 static gboolean
 book_backend_file_initable_init (GInitable *initable,
                                  GCancellable *cancellable,
@@ -1766,6 +1782,7 @@ e_book_backend_file_class_init (EBookBackendFileClass *class)
        backend_class->get_direct_book = book_backend_file_get_direct_book;
        backend_class->configure_direct = book_backend_file_configure_direct;
        backend_class->sync = book_backend_file_sync;
+       backend_class->set_locale = book_backend_file_set_locale;
 }
 
 static void


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