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-03-26 23:51:20 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 23:51:20 +0000
commit488bf5acd6459d69fcaead5769125e3c371098f8 (patch)
treea1fe15a9ebc16725ca17fe151dd7d468c8d1a0df /chrome/browser/gtk/download_shelf_gtk.cc
parent92b0417bd59b83f6a4908a6bb19ef833852faf08 (diff)
downloadchromium_src-488bf5acd6459d69fcaead5769125e3c371098f8.zip
chromium_src-488bf5acd6459d69fcaead5769125e3c371098f8.tar.gz
chromium_src-488bf5acd6459d69fcaead5769125e3c371098f8.tar.bz2
Gtk download shelf:
- show status text (when appropriate) - set text colors - limit the size of the download item view and elide text to fit - don't let download items spill over on the right (hide and show them as shelf grows and shrinks) Review URL: http://codereview.chromium.org/42672 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/download_shelf_gtk.cc')
-rw-r--r--chrome/browser/gtk/download_shelf_gtk.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/gtk/download_shelf_gtk.cc b/chrome/browser/gtk/download_shelf_gtk.cc
index 3d30e89..18ab1bc 100644
--- a/chrome/browser/gtk/download_shelf_gtk.cc
+++ b/chrome/browser/gtk/download_shelf_gtk.cc
@@ -159,10 +159,10 @@ DownloadShelfGtk::DownloadShelfGtk(TabContents* tab_contents)
gdk_pixbuf_unref(download_pixbuf);
// Pack the link and the icon in an hbox.
- GtkWidget* link_hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(link_hbox), download_image, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(link_hbox), link_box, FALSE, FALSE, 0);
- gtk_box_pack_end(GTK_BOX(hbox_), link_hbox, FALSE, FALSE, 0);
+ link_hbox_ = gtk_hbox_new(FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(link_hbox_), download_image, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(link_hbox_), link_box, FALSE, FALSE, 0);
+ gtk_box_pack_end(GTK_BOX(hbox_), link_hbox_, FALSE, FALSE, 0);
// Stick ourselves at the bottom of the parent tab contents.
GtkWidget* parent_contents = tab_contents->GetNativeView();
@@ -178,7 +178,8 @@ DownloadShelfGtk::~DownloadShelfGtk() {
void DownloadShelfGtk::AddDownload(BaseDownloadItemModel* download_model_) {
// TODO(estade): we need to delete these at some point. There's no explicit
// mass delete on windows, figure out where they do it.
- download_items_.push_back(new DownloadItemGtk(download_model_, hbox_));
+ download_items_.push_back(new DownloadItemGtk(download_model_, hbox_,
+ link_hbox_));
Show();
}