diff options
author | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 08:30:24 +0000 |
---|---|---|
committer | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 08:30:24 +0000 |
commit | 2278050814810fb79661792acff847fb2b806e17 (patch) | |
tree | e1a1c24e5f795a95a0671bf215d8dec613190395 /chrome/browser/gtk/bookmark_bar_gtk.cc | |
parent | 13c0fb1a4d5d83149dbccd2001f7828dbdb5473b (diff) | |
download | chromium_src-2278050814810fb79661792acff847fb2b806e17.zip chromium_src-2278050814810fb79661792acff847fb2b806e17.tar.gz chromium_src-2278050814810fb79661792acff847fb2b806e17.tar.bz2 |
[Linux] Make bookmark bar shrinkable when there is no bookmark.
BUG=none
TEST=Where there is no bookmark, an instruction will be displayed in the bookmark bar, which should be shrinkable when resizing the browser window.
Review URL: http://codereview.chromium.org/552211
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_bar_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/bookmark_bar_gtk.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index f2f6c73..cd82de8 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -213,7 +213,7 @@ void BookmarkBarGtk::Init(Profile* profile) { instructions_gtk_.reset(new BookmarkBarInstructionsGtk(this, profile)); gtk_container_add(GTK_CONTAINER(instructions_), instructions_gtk_->widget()); gtk_box_pack_start(GTK_BOX(bookmark_hbox_), instructions_, - FALSE, FALSE, 0); + TRUE, TRUE, 0); gtk_drag_dest_set(instructions_, GtkDestDefaults(GTK_DEST_DEFAULT_DROP | GTK_DEST_DEFAULT_MOTION), @@ -273,7 +273,7 @@ void BookmarkBarGtk::Init(Profile* profile) { ResourceBundle::GetSharedInstance().GetPixbufNamed(IDR_WARNING))); g_signal_connect(G_OBJECT(sync_error_button_), "button-press-event", G_CALLBACK(OnSyncErrorButtonPressed), this); - gtk_box_pack_start(GTK_BOX(bookmark_hbox_), sync_error_button_ , + gtk_box_pack_start(GTK_BOX(bookmark_hbox_), sync_error_button_, FALSE, FALSE, 0); gtk_widget_set_size_request(event_box_.get(), -1, kBookmarkBarMinimumHeight); @@ -313,9 +313,11 @@ void BookmarkBarGtk::Show(bool animate) { // Maybe show the instructions if (show_instructions_) { + gtk_widget_hide(bookmark_toolbar_.get()); gtk_widget_show(instructions_); } else { gtk_widget_hide(instructions_); + gtk_widget_show(bookmark_toolbar_.get()); } } @@ -497,9 +499,11 @@ void BookmarkBarGtk::CreateAllBookmarkButtons() { void BookmarkBarGtk::SetInstructionState() { show_instructions_ = (model_->GetBookmarkBarNode()->GetChildCount() == 0); if (show_instructions_) { - gtk_widget_show_all(instructions_); + gtk_widget_hide(bookmark_toolbar_.get()); + gtk_widget_show(instructions_); } else { gtk_widget_hide(instructions_); + gtk_widget_show(bookmark_toolbar_.get()); } } |