summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/download_shelf_gtk.h
diff options
context:
space:
mode:
authorsuzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-09 10:49:08 +0000
committersuzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-09 10:49:08 +0000
commit73eb3057281572bd09b864ec10a6a2efd8bea539 (patch)
tree6271f53d7b354b307c5c0756d774294f871b63eb /chrome/browser/gtk/download_shelf_gtk.h
parente802e94eeb7176f1bbbbeef5fd859ecce4f6d2fc (diff)
downloadchromium_src-73eb3057281572bd09b864ec10a6a2efd8bea539.zip
chromium_src-73eb3057281572bd09b864ec10a6a2efd8bea539.tar.gz
chromium_src-73eb3057281572bd09b864ec10a6a2efd8bea539.tar.bz2
[Linux] Improve DownloadShelfGtk to use GtkShrinkableHBox, and fix a label wrap issue.
This CL depends on CL 661364. BUG=37293 With RTL UI, items in download shelf can't be hidden correctly when shrinking the browser window. BUG=37392 Chinese dangerous warning message of download items overflows its boundary. TEST=See bug report. Review URL: http://codereview.chromium.org/668053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41017 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/download_shelf_gtk.h')
-rw-r--r--chrome/browser/gtk/download_shelf_gtk.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/chrome/browser/gtk/download_shelf_gtk.h b/chrome/browser/gtk/download_shelf_gtk.h
index 8530a2b..df2c4b0 100644
--- a/chrome/browser/gtk/download_shelf_gtk.h
+++ b/chrome/browser/gtk/download_shelf_gtk.h
@@ -55,12 +55,14 @@ class DownloadShelfGtk : public DownloadShelf,
// Remove |download_item| from the download shelf and delete it.
void RemoveDownloadItem(DownloadItemGtk* download_item);
- // Get the leftmost non-download item widget on the shelf.
- GtkWidget* GetRightBoundingWidget() const;
-
// Get the hbox download items ought to pack themselves into.
GtkWidget* GetHBox() const;
+ // Show more hidden download items if there is enough space in the shelf.
+ // It's called when a download item is removed from the shelf or an item's
+ // size is changed.
+ void MaybeShowMoreDownloadItems();
+
static void OnButtonClick(GtkWidget* button, DownloadShelfGtk* toolbar);
// The browser that owns this download shelf.
@@ -69,8 +71,8 @@ class DownloadShelfGtk : public DownloadShelf,
// The top level widget of the shelf.
scoped_ptr<SlideAnimatorGtk> slide_widget_;
- // |hbox_| holds the download items and buttons of the shelf.
- OwnedWidgetGtk hbox_;
+ // |items_hbox_| holds the download items.
+ OwnedWidgetGtk items_hbox_;
// |shelf_| is the second highest level widget. See the constructor
// for an explanation of the widget layout.
@@ -82,10 +84,6 @@ class DownloadShelfGtk : public DownloadShelf,
// A GtkEventBox which we color.
GtkWidget* padding_bg_;
- // This hbox holds the link text and download icon. It also holds the
- // distinction of being the leftmost non-download item widget on the shelf.
- GtkWidget* link_hbox_;
-
// The "Show all downloads..." link.
GtkWidget* link_button_;