[brasero] Fixed a runtime warning related to cancelling tracker searches
- From: Philippe Rouquier <philippr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero] Fixed a runtime warning related to cancelling tracker searches
- Date: Mon, 10 May 2010 20:23:04 +0000 (UTC)
commit 72dc7f9113a5860f699d9aab6f5ccdc2514f263f
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Mon May 10 22:57:27 2010 +0200
Fixed a runtime warning related to cancelling tracker searches
src/brasero-search-tracker.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/brasero-search-tracker.c b/src/brasero-search-tracker.c
index 4b65c9c..24ff29f 100644
--- a/src/brasero-search-tracker.c
+++ b/src/brasero-search-tracker.c
@@ -34,6 +34,8 @@ struct _BraseroSearchTrackerPrivate
gchar **mimes;
gchar *keywords;
+
+ guint current_call_id;
};
#define BRASERO_SEARCH_TRACKER_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BRASERO_TYPE_SEARCH_TRACKER, BraseroSearchTrackerPrivate))
@@ -228,10 +230,10 @@ brasero_search_tracker_query_start_real (BraseroSearchEngine *search,
"OFFSET 0 "
"LIMIT 10000");
- res = tracker_resources_sparql_query_async (priv->client,
- query->str,
- brasero_search_tracker_reply,
- search);
+ priv->current_call_id = tracker_resources_sparql_query_async (priv->client,
+ query->str,
+ brasero_search_tracker_reply,
+ search);
g_string_free (query, TRUE);
return res;
@@ -305,7 +307,8 @@ brasero_search_tracker_clean (BraseroSearchTracker *search)
priv = BRASERO_SEARCH_TRACKER_PRIVATE (search);
- tracker_cancel_last_call (priv->client);
+ if (priv->current_call_id)
+ tracker_cancel_call (priv->client, priv->current_call_id);
if (priv->results) {
g_ptr_array_foreach (priv->results, (GFunc) g_strfreev, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]