summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-25 18:23:51 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-25 18:23:51 +0000
commit5c82dde9897b026ec46b3106d295ba3f992ba79e (patch)
tree22787a893d0b3afdc6ebf7fe8577582085ea18e6
parent89845e2e9a1052a1bb3f3f3f42abfe07ee1a8ae0 (diff)
downloadchromium_src-5c82dde9897b026ec46b3106d295ba3f992ba79e.zip
chromium_src-5c82dde9897b026ec46b3106d295ba3f992ba79e.tar.gz
chromium_src-5c82dde9897b026ec46b3106d295ba3f992ba79e.tar.bz2
GTK: Make the progress area go away when a download item is cancelled.
BUG=20158 Review URL: http://codereview.chromium.org/174365 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24255 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/download_item_gtk.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc
index ac95fee..0822a16 100644
--- a/chrome/browser/gtk/download_item_gtk.cc
+++ b/chrome/browser/gtk/download_item_gtk.cc
@@ -372,6 +372,7 @@ void DownloadItemGtk::OnDownloadUpdated(DownloadItem* download) {
return;
case DownloadItem::CANCELLED:
StopDownloadProgress();
+ gtk_widget_queue_draw(progress_area_.get());
break;
case DownloadItem::COMPLETE:
StopDownloadProgress();
@@ -777,7 +778,8 @@ gboolean DownloadItemGtk::OnProgressAreaExpose(GtkWidget* widget,
download_item->complete_animation_->GetCurrentValue(),
download_util::SMALL);
}
- } else {
+ } else if (download_item->get_download()->state() !=
+ DownloadItem::CANCELLED) {
download_util::PaintDownloadProgress(&canvas,
widget->allocation.x, widget->allocation.y,
download_item->progress_angle_,