Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5928)

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 10889052: Display action box menu on Linux/gtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removes spurious \n Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index edf23a6f18569438412fed5d2dcad216732ba0d0..9fae3668192433a7c0d81f69e45b1445707e6753 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -559,7 +559,9 @@ void LocationBarViewGtk::Init(bool popup_window_mode) {
gtk_box_pack_end(GTK_BOX(hbox_.get()), alignment,
FALSE, FALSE, 0);
- } else if (browser_defaults::bookmarks_enabled && !ShouldOnlyShowLocation()) {
+ }
+
+ if (browser_defaults::bookmarks_enabled && !ShouldOnlyShowLocation()) {
// Hide the star and Chrome To Mobile icons in popups, app windows, etc.
CreateStarButton();
gtk_box_pack_end(GTK_BOX(hbox_.get()), star_.get(), FALSE, FALSE, 0);
@@ -1569,12 +1571,16 @@ void LocationBarViewGtk::UpdateStarIcon() {
bool star_enabled = !toolbar_model_->input_in_progress() &&
edit_bookmarks_enabled_.GetValue();
command_updater_->UpdateCommandEnabled(IDC_BOOKMARK_PAGE, star_enabled);
- if (star_enabled) {
- gtk_widget_show_all(star_.get());
+
+ bool visible = star_enabled;
msw 2012/08/30 03:39:22 nit: mutate |star_enabled| (after UpdateCommandEna
beaudoin 2012/08/30 20:55:05 Done.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableActionBox) &&
+ !starred_)
+ visible = false;
+ if (visible) {
int id = starred_ ? IDR_STAR_LIT : IDR_STAR;
- gtk_image_set_from_pixbuf(
- GTK_IMAGE(star_image_),
- theme_service_->GetImageNamed(id)->ToGdkPixbuf());
+ gtk_image_set_from_pixbuf(GTK_IMAGE(star_image_),
+ theme_service_->GetImageNamed(id)->ToGdkPixbuf());
+ gtk_widget_show_all(star_.get());
msw 2012/08/30 03:39:22 nit: any reason to re-order this after the two pre
beaudoin 2012/08/30 20:55:05 Probably left-over from my experimentations. :) D
} else {
gtk_widget_hide_all(star_.get());
}

Powered by Google App Engine
This is Rietveld 408576698