[tracker] tracker-store: Improved the set of Idle in tracker-status
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-store: Improved the set of Idle in tracker-status
- Date: Tue, 30 Mar 2010 13:08:03 +0000 (UTC)
commit a8e4ee46c874b0d5e5960d6357332113b23dbfb8
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Mar 30 15:06:37 2010 +0200
tracker-store: Improved the set of Idle in tracker-status
src/tracker-store/tracker-status.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-store/tracker-status.c b/src/tracker-store/tracker-status.c
index 841fdf1..0578c2f 100644
--- a/src/tracker-store/tracker-status.c
+++ b/src/tracker-store/tracker-status.c
@@ -35,7 +35,7 @@
#define PROGRESS_TIMEOUT_S 5
typedef struct {
- gdouble progress;
+ gdouble progress, last;
gchar *status;
guint timer_id;
TrackerStatus *object;
@@ -124,6 +124,8 @@ busy_notification_timeout (gpointer user_data)
priv->status,
priv->progress);
+ priv->last = TRUE;
+
return FALSE;
}
@@ -132,10 +134,11 @@ busy_notification_destroy (gpointer user_data)
{
TrackerStatusPrivate *priv = user_data;
- if (priv->status) {
+ if (priv->last) {
g_free (priv->status);
+ priv->status = g_strdup ("Idle");
}
- priv->status = g_strdup ("Idle");
+
priv->progress = 1;
priv->timer_id = 0;
}
@@ -155,7 +158,9 @@ tracker_status_callback (const gchar *status,
{
static gboolean first_time = TRUE;
TrackerStatusPrivate *priv = user_data;
+
priv->progress = progress;
+ priv->last = FALSE;
if (g_strcmp0 (status, priv->status) != 0) {
g_free (priv->status);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]