[tracker/direct-for-master] libtracker-data: Remove storing of local locale for no reason
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-for-master] libtracker-data: Remove storing of local locale for no reason
- Date: Tue, 20 Jul 2010 12:31:41 +0000 (UTC)
commit 2f03be8170e0e89ffb048b7f6209c127fa247524
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Jul 8 14:30:53 2010 +0200
libtracker-data: Remove storing of local locale for no reason
data/db/sqlite-tracker.sql | 1 -
src/libtracker-data/tracker-db-manager.c | 45 ------------------------------
2 files changed, 0 insertions(+), 46 deletions(-)
---
diff --git a/data/db/sqlite-tracker.sql b/data/db/sqlite-tracker.sql
index eb661db..42c2587 100644
--- a/data/db/sqlite-tracker.sql
+++ b/data/db/sqlite-tracker.sql
@@ -5,5 +5,4 @@ CREATE TABLE Options (
);
insert Into Options (OptionKey, OptionValue) values ('KMailLastModseq', '0');
-insert Into Options (OptionKey, OptionValue) values ('CollationLocale', '');
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 96ff040..6fe8cad 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -606,49 +606,6 @@ tracker_db_get_type (void)
}
static void
-tracker_db_manager_ensure_locale (void)
-{
- TrackerDBInterface *common;
- TrackerDBStatement *stmt;
- TrackerDBResultSet *result_set;
- const gchar *current_locale;
- gchar *stored_locale = NULL;
-
- current_locale = setlocale (LC_COLLATE, NULL);
-
- common = dbs[TRACKER_DB_METADATA].iface;
-
- stmt = tracker_db_interface_create_statement (common, NULL, "SELECT OptionValue FROM Options WHERE OptionKey = 'CollationLocale'");
-
- if (!stmt) {
- return;
- }
-
- result_set = tracker_db_statement_execute (stmt, NULL);
- g_object_unref (stmt);
-
- if (result_set) {
- tracker_db_result_set_get (result_set, 0, &stored_locale, -1);
- g_object_unref (result_set);
- }
-
- if (g_strcmp0 (current_locale, stored_locale) != 0) {
- /* Locales differ, update collate keys */
- g_message ("Updating DB locale dependent data to: %s\n", current_locale);
-
- stmt = tracker_db_interface_create_statement (common, NULL, "UPDATE Options SET OptionValue = ? WHERE OptionKey = 'CollationLocale'");
-
- if (stmt) {
- tracker_db_statement_bind_text (stmt, 0, current_locale);
- tracker_db_statement_execute (stmt, NULL);
- g_object_unref (stmt);
- }
- }
-
- g_free (stored_locale);
-}
-
-static void
db_recreate_all (void)
{
guint i;
@@ -1011,8 +968,6 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
g_free (in_use_filename);
- tracker_db_manager_ensure_locale ();
-
initialized = TRUE;
thread_ifaces = g_hash_table_new (NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]