summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/download_shelf_gtk.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 23:52:32 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 23:52:32 +0000
commita0a9577b170540cf58981def1c1616070afbd06f (patch)
tree15ae29176225715048d6fc98dd0598717ae9c78a /chrome/browser/gtk/download_shelf_gtk.cc
parent9d4d1e4dff1bb10542adbdf568b3920f2ba47a4a (diff)
downloadchromium_src-a0a9577b170540cf58981def1c1616070afbd06f.zip
chromium_src-a0a9577b170540cf58981def1c1616070afbd06f.tar.gz
chromium_src-a0a9577b170540cf58981def1c1616070afbd06f.tar.bz2
Dangerous download dialog for linux.
BUG=11780 TEST=go to cygwin.com, click "install or update now". The download shelf should appear with a dangerous download dialog, which should animate properly and without undue jank. Clicking "cancel" should delete the item and hide the shelf (since it's the only thing in the shelf). Clicking "save" should make it become a normal download item. Review URL: http://codereview.chromium.org/113920 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17041 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/download_shelf_gtk.cc')
-rw-r--r--chrome/browser/gtk/download_shelf_gtk.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/gtk/download_shelf_gtk.cc b/chrome/browser/gtk/download_shelf_gtk.cc
index 00e81c8..999ab27 100644
--- a/chrome/browser/gtk/download_shelf_gtk.cc
+++ b/chrome/browser/gtk/download_shelf_gtk.cc
@@ -37,13 +37,13 @@ const int kLeftPadding = 2;
const int kRightPadding = 10;
// The background color of the shelf.
-static GdkColor kBackgroundColor = GDK_COLOR_RGB(230, 237, 244);
+const GdkColor kBackgroundColor = GDK_COLOR_RGB(230, 237, 244);
// Border color (the top pixel of the shelf).
-static GdkColor kBorderColor = GDK_COLOR_RGB(214, 214, 214);
+const GdkColor kBorderColor = GDK_COLOR_RGB(214, 214, 214);
// Speed of the shelf show/hide animation.
-static const int kShelfAnimationDurationMs = 120;
+const int kShelfAnimationDurationMs = 120;
} // namespace
@@ -117,6 +117,7 @@ DownloadShelfGtk::DownloadShelfGtk(TabContents* tab_contents)
SlideAnimatorGtk::UP,
kShelfAnimationDurationMs,
false, NULL));
+ gtk_widget_show_all(shelf_.get());
// Stick ourselves at the bottom of the parent tab contents.
GtkWidget* parent_contents = tab_contents->GetNativeView();
gtk_box_pack_end(GTK_BOX(parent_contents), slide_widget_->widget(),
@@ -127,7 +128,7 @@ DownloadShelfGtk::DownloadShelfGtk(TabContents* tab_contents)
DownloadShelfGtk::~DownloadShelfGtk() {
for (std::vector<DownloadItemGtk*>::iterator iter = download_items_.begin();
iter != download_items_.end(); ++iter) {
- delete *iter;
+ delete *iter;
}
shelf_.Destroy();