[tracker/collation-gconf-locale: 16/31] tracker-store: Fix compilation with new set_active()
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/collation-gconf-locale: 16/31] tracker-store: Fix compilation with new set_active()
- Date: Wed, 17 Nov 2010 15:44:26 +0000 (UTC)
commit 5948bfe6dff39f923e132de7b8cb0292a94f0dbd
Author: Aleksander Morgado <aleksander lanedo com>
Date: Wed Nov 3 18:18:50 2010 +0200
tracker-store: Fix compilation with new set_active()
src/tracker-store/tracker-main.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/tracker-store/tracker-main.c b/src/tracker-store/tracker-main.c
index fbbf6fb..c21c2f3 100644
--- a/src/tracker-store/tracker-main.c
+++ b/src/tracker-store/tracker-main.c
@@ -264,15 +264,13 @@ shutdown_directories (void)
}
}
-static gboolean
-tracker_locale_change_process_cb (gpointer data)
+static void
+tracker_locale_change_process_cb (gpointer user_data)
{
TrackerStatus *notifier;
TrackerBusyCallback busy_callback;
gpointer busy_user_data;
- tracker_store_set_active (FALSE);
-
notifier = TRACKER_STATUS (tracker_dbus_get_object (TRACKER_TYPE_STATUS));
busy_callback = tracker_status_get_callback (notifier,
@@ -280,9 +278,17 @@ tracker_locale_change_process_cb (gpointer data)
tracker_data_manager_reload (NULL, NULL);
- tracker_store_set_active (TRUE);
+ tracker_store_set_active (TRUE, FALSE, NULL);
locale_change_notified = FALSE;
+}
+
+static gboolean
+tracker_locale_change_process_idle_cb (gpointer data)
+{
+ /* Note: Right now, the passed callback may be called instantly and not
+ * in an idle. */
+ tracker_store_set_active (FALSE, tracker_locale_change_process_cb, NULL);
return FALSE;
}
@@ -302,7 +308,7 @@ tracker_locale_notify_cb (TrackerLocaleID id,
* for locale changes, so we may end up waiting to acquire an
* already locked mutex.
*/
- g_idle_add (tracker_locale_change_process_cb, NULL);
+ g_idle_add (tracker_locale_change_process_idle_cb, NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]