diff options
author | Alexander Larsson <alexl@redhat.com> | 2007-12-04 14:05:50 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2007-12-04 14:05:50 +0000 |
commit | a39cea2661e59ff43593607c104e13defb294964 (patch) | |
tree | e8ceae22f8050266b5a32c4d4673d084223c0e4e /libnautilus-private/nautilus-progress-info.c | |
parent | de68805a3673f96ecc97bfae8a7f8da8acaee60a (diff) | |
download | nautilus-a39cea2661e59ff43593607c104e13defb294964.tar.gz |
Implement trash with CommonJob
2007-12-04 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
Implement trash with CommonJob
* libnautilus-private/nautilus-progress-info.c:
(nautilus_progress_info_set_progress):
Ensure progress always is inside 0.0 - 1.0
svn path=/trunk/; revision=13485
Diffstat (limited to 'libnautilus-private/nautilus-progress-info.c')
-rw-r--r-- | libnautilus-private/nautilus-progress-info.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-progress-info.c b/libnautilus-private/nautilus-progress-info.c index 47f57f7e8..606a73fde 100644 --- a/libnautilus-private/nautilus-progress-info.c +++ b/libnautilus-private/nautilus-progress-info.c @@ -787,6 +787,14 @@ nautilus_progress_info_set_progress (NautilusProgressInfo *info, double current_percent) { G_LOCK (progress_info); + + if (current_percent < 0) { + current_percent = 0; + } + + if (current_percent > 1.0) { + current_percent = 1.0; + } if (info->activity_mode || /* emit on switch from activity mode */ fabs (current_percent - info->progress) > 0.005 /* Emit on change of 0.5 percent */ |